]> granicus.if.org Git - clang/commitdiff
Fix parens warning in assert in ASTMatchFinder
authorErich Keane <erich.keane@intel.com>
Thu, 15 Nov 2018 21:35:35 +0000 (21:35 +0000)
committerErich Keane <erich.keane@intel.com>
Thu, 15 Nov 2018 21:35:35 +0000 (21:35 +0000)
Change-Id: Ie34f9c6846b98fba87449e73299519fc2346bac1

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@346996 91177308-0d34-0410-b5e6-96231b3b80d8

lib/ASTMatchers/ASTMatchFinder.cpp

index 8d65714317d45f971973e60821a6250acf2be4f5..32d8282f6df62b13cda33aa246872ff2b897ed2f 100644 (file)
@@ -676,13 +676,13 @@ private:
       //  c) there is a bug in the AST, and the node is not reachable
       // Usually the traversal scope is the whole AST, which precludes b.
       // Bugs are common enough that it's worthwhile asserting when we can.
-      assert(Node.get<TranslationUnitDecl>() ||
-             /* Traversal scope is limited if none of the bounds are the TU */
-             llvm::none_of(ActiveASTContext->getTraversalScope(),
-                           [](Decl *D) {
-                             return D->getKind() == Decl::TranslationUnit;
-                           }) &&
-                 "Found node that is not in the complete parent map!");
+      assert((Node.get<TranslationUnitDecl>() ||
+              /* Traversal scope is limited if none of the bounds are the TU */
+              llvm::none_of(ActiveASTContext->getTraversalScope(),
+                            [](Decl *D) {
+                              return D->getKind() == Decl::TranslationUnit;
+                            })) &&
+             "Found node that is not in the complete parent map!");
       return false;
     }
     if (Parents.size() == 1) {