diff options
author | Caolán McNamara <caolanm@redhat.com> | 2014-06-26 17:44:58 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2014-06-27 08:55:56 +0100 |
commit | 7af733d9ef65fddd12ef5fae82808ba2f7f608df (patch) | |
tree | 360afc7f8c5b7963730885255f631c9896f683b4 /unoidl | |
parent | 05f5c4d4d6addf5321a40595f598e55dce376f6f (diff) |
tweak assert so comment appears in abort message
Change-Id: Ibf78e5cd1620f0b61cae030e3870be4a6f87e71d
Diffstat (limited to 'unoidl')
-rw-r--r-- | unoidl/source/sourceprovider-parser.y | 20 | ||||
-rw-r--r-- | unoidl/source/unoidl-check.cxx | 4 | ||||
-rw-r--r-- | unoidl/source/unoidl-read.cxx | 4 |
3 files changed, 14 insertions, 14 deletions
diff --git a/unoidl/source/sourceprovider-parser.y b/unoidl/source/sourceprovider-parser.y index dba0b2947213..133f131590c8 100644 --- a/unoidl/source/sourceprovider-parser.y +++ b/unoidl/source/sourceprovider-parser.y @@ -100,7 +100,7 @@ OUString flagName(unoidl::detail::SourceProviderFlags flag) { case unoidl::detail::FLAG_TRANSIENT: return OUString("transient"); default: - assert(false); for (;;) { std::abort(); } // this cannot happen + assert(false && "this cannot happen"); for (;;) { std::abort(); } } } @@ -480,7 +480,7 @@ Found findEntity( argT = unoidl::detail::SourceProviderType::TYPE_INTERFACE; break; case unoidl::detail::SourceProviderEntity::KIND_MODULE: - assert(false); // this cannot happen + assert(false && "this cannot happen"); } argType = unoidl::detail::SourceProviderType( @@ -725,7 +725,7 @@ Found findEntity( n, e); break; case unoidl::detail::SourceProviderEntity::KIND_MODULE: - assert(false); // this cannot happen + assert(false && "this cannot happen"); } } } else { @@ -789,7 +789,7 @@ Found findEntity( + " that is not a polymorphic struct type template")); return FOUND_ERROR; case unoidl::detail::SourceProviderEntity::KIND_MODULE: - assert(false); // this cannot happen + assert(false && "this cannot happen"); } } if (typedefedType != 0) { @@ -1954,7 +1954,7 @@ typedefDefn: case unoidl::detail::SourceProviderEntity::KIND_PUBLISHED_INTERFACE_DECL: break; case unoidl::detail::SourceProviderEntity::KIND_MODULE: - assert(false); // this cannot happen + assert(false && "this cannot happen"); default: assert(t.entity->entity.is() || t.entity->pad.is()); unpub @@ -1973,7 +1973,7 @@ typedefDefn: } break; case unoidl::detail::SourceProviderType::TYPE_PARAMETER: - assert(false); // this cannot happen + assert(false && "this cannot happen"); default: break; } @@ -3924,7 +3924,7 @@ type: ok = true; break; case unoidl::Entity::SORT_TYPEDEF: - assert(false); // this cannot happen + assert(false && "this cannot happen"); // fall through default: break; @@ -3946,7 +3946,7 @@ type: ok = true; break; case unoidl::detail::SourceProviderEntity::KIND_MODULE: - assert(false); // this cannot happen + assert(false && "this cannot happen"); } if (!ok) { error(@1, yyscanner, "non-type entity " + name); @@ -4020,7 +4020,7 @@ type: case unoidl::detail::SourceProviderEntity::KIND_PUBLISHED_INTERFACE_DECL: break; case unoidl::detail::SourceProviderEntity::KIND_MODULE: - assert(false); // this cannot happen + assert(false && "this cannot happen"); } if (!ok) { error(@1, yyscanner, "non-type entity " + name); @@ -4110,7 +4110,7 @@ OUString SourceProviderType::getName() const { return n + ">"; } default: - assert(false); for (;;) { std::abort(); } // this cannot happen + assert(false && "this cannot happen"); for (;;) { std::abort(); } } } diff --git a/unoidl/source/unoidl-check.cxx b/unoidl/source/unoidl-check.cxx index 688a62ce64ba..3cf9bcc6b6d3 100644 --- a/unoidl/source/unoidl-check.cxx +++ b/unoidl/source/unoidl-check.cxx @@ -135,7 +135,7 @@ OUString showDirection( case unoidl::InterfaceTypeEntity::Method::Parameter::DIRECTION_IN_OUT: return OUString("[inout]"); default: - assert(false); for (;;) { std::abort(); } // this cannot happen + assert(false && "this cannot happen"); for (;;) { std::abort(); } } } @@ -193,7 +193,7 @@ void checkMap( } switch (entA->getSort()) { case unoidl::Entity::SORT_MODULE: - assert(false); // this cannot happen + assert(false && "this cannot happen"); case unoidl::Entity::SORT_ENUM_TYPE: { rtl::Reference<unoidl::EnumTypeEntity> ent2A( diff --git a/unoidl/source/unoidl-read.cxx b/unoidl/source/unoidl-read.cxx index 1deb4d75f376..ea995d68fc8c 100644 --- a/unoidl/source/unoidl-read.cxx +++ b/unoidl/source/unoidl-read.cxx @@ -248,7 +248,7 @@ void scanMap( .first); switch (ent->getSort()) { case unoidl::Entity::SORT_MODULE: - assert(false); // this cannot happen + assert(false && "this cannot happen"); case unoidl::Entity::SORT_ENUM_TYPE: case unoidl::Entity::SORT_CONSTANT_GROUP: break; @@ -609,7 +609,7 @@ void writeEntity( static_cast<unoidl::PublishableEntity *>(i->second.entity.get())); switch (ent->getSort()) { case unoidl::Entity::SORT_MODULE: - assert(false); // this cannot happen + assert(false && "this cannot happen"); case unoidl::Entity::SORT_ENUM_TYPE: { rtl::Reference<unoidl::EnumTypeEntity> ent2( |