]> granicus.if.org Git - clang/commitdiff
[ASTMatchers] Sprinkle some constexpr on the global matcher constructors.
authorBenjamin Kramer <benny.kra@googlemail.com>
Mon, 30 Jan 2017 18:20:00 +0000 (18:20 +0000)
committerBenjamin Kramer <benny.kra@googlemail.com>
Mon, 30 Jan 2017 18:20:00 +0000 (18:20 +0000)
This dramatically reduces the size of the global constructors we emit
for those variables in debug mode.

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

include/clang/ASTMatchers/ASTMatchersInternal.h

index bc75e807ced98dfb63944d9e723b095088e4e6df..895e0b42e40ceb194063f0202453b08dd52cf160 100644 (file)
@@ -1459,7 +1459,7 @@ class VariadicDynCastAllOfMatcher
     : public VariadicFunction<BindableMatcher<SourceT>, Matcher<TargetT>,
                               makeDynCastAllOfComposite<SourceT, TargetT>> {
 public:
-  VariadicDynCastAllOfMatcher() {}
+  constexpr VariadicDynCastAllOfMatcher() {}
 };
 
 /// \brief A \c VariadicAllOfMatcher<T> object is a variadic functor that takes
@@ -1477,7 +1477,7 @@ class VariadicAllOfMatcher
     : public VariadicFunction<BindableMatcher<T>, Matcher<T>,
                               makeAllOfComposite<T>> {
 public:
-  VariadicAllOfMatcher() {}
+  constexpr VariadicAllOfMatcher() {}
 };
 
 /// \brief Matches nodes of type \c TLoc for which the inner
@@ -1598,7 +1598,7 @@ public:
 
   struct Func
       : public VariadicFunction<Self, Matcher<InnerTBase>, &Self::create> {
-    Func() {}
+    constexpr Func() {}
   };
 
 private: