[PATCH] D56354: [AST] Replace asserts with if() in SourceLocation accessors
Stephen Kelly via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Jan 7 14:22:41 PST 2019
steveire marked an inline comment as done.
steveire added inline comments.
================
Comment at: lib/AST/NestedNameSpecifier.cpp:465
TypeLoc NestedNameSpecifierLoc::getTypeLoc() const {
- assert((Qualifier->getKind() == NestedNameSpecifier::TypeSpec ||
- Qualifier->getKind() == NestedNameSpecifier::TypeSpecWithTemplate) &&
- "Nested-name-specifier location is not a type");
+ if ((Qualifier->getKind() != NestedNameSpecifier::TypeSpec &&
+ Qualifier->getKind() != NestedNameSpecifier::TypeSpecWithTemplate))
----------------
aaron.ballman wrote:
> aaron.ballman wrote:
> > Remove spurious parens.
> Formatting is still off here for the second line of the if statement (one too many spaces on the indentation).
Fixed, thanks. I ran c-f before fixing the parens.
Repository:
rL LLVM
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D56354/new/
https://reviews.llvm.org/D56354
More information about the cfe-commits
mailing list