[PATCH] D19877: [clang-tidy] Speedup misc-static-assert.

Samuel Benzaquen via cfe-commits cfe-commits at lists.llvm.org
Tue May 3 13:17:06 PDT 2016


This revision was automatically updated to reflect the committed changes.
Closed by commit rL268430: [clang-tidy] Speedup misc-static-assert. (authored by sbenza).

Changed prior to commit:
  http://reviews.llvm.org/D19877?vs=56028&id=56053#toc

Repository:
  rL LLVM

http://reviews.llvm.org/D19877

Files:
  clang-tools-extra/trunk/clang-tidy/misc/StaticAssertCheck.cpp

Index: clang-tools-extra/trunk/clang-tidy/misc/StaticAssertCheck.cpp
===================================================================
--- clang-tools-extra/trunk/clang-tidy/misc/StaticAssertCheck.cpp
+++ clang-tools-extra/trunk/clang-tidy/misc/StaticAssertCheck.cpp
@@ -63,11 +63,15 @@
                 hasArgument(0, AssertCondition))),
             AssertCondition);
 
-  Finder->addMatcher(stmt(anyOf(conditionalOperator(hasCondition(Condition)),
-                                ifStmt(hasCondition(Condition))),
-                          unless(isInTemplateInstantiation()))
+  Finder->addMatcher(conditionalOperator(hasCondition(Condition),
+                                         unless(isInTemplateInstantiation()))
                          .bind("condStmt"),
                      this);
+
+  Finder->addMatcher(
+      ifStmt(hasCondition(Condition), unless(isInTemplateInstantiation()))
+          .bind("condStmt"),
+      this);
 }
 
 void StaticAssertCheck::check(const MatchFinder::MatchResult &Result) {


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D19877.56053.patch
Type: text/x-patch
Size: 1027 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20160503/5cf55f89/attachment.bin>


More information about the cfe-commits mailing list