This revision was automatically updated to reflect the committed changes.
Closed by commit rL260948: [clang-tidy] Enhance modernize-redundant-void-arg 
check to apply fixes to… (authored by alexfh).

Changed prior to commit:
  http://reviews.llvm.org/D16953?vs=47319&id=48054#toc

Repository:
  rL LLVM

http://reviews.llvm.org/D16953

Files:
  clang-tools-extra/trunk/clang-tidy/modernize/RedundantVoidArgCheck.cpp

Index: clang-tools-extra/trunk/clang-tidy/modernize/RedundantVoidArgCheck.cpp
===================================================================
--- clang-tools-extra/trunk/clang-tidy/modernize/RedundantVoidArgCheck.cpp
+++ clang-tools-extra/trunk/clang-tidy/modernize/RedundantVoidArgCheck.cpp
@@ -46,42 +46,30 @@
 namespace modernize {
 
 void RedundantVoidArgCheck::registerMatchers(MatchFinder *Finder) {
-  Finder->addMatcher(functionDecl(isExpansionInMainFile(), parameterCountIs(0),
-                                  unless(isImplicit()), unless(isExternC()))
+  Finder->addMatcher(functionDecl(parameterCountIs(0), unless(isImplicit()),
+                                  unless(isExternC()))
                          .bind(FunctionId),
                      this);
-  Finder->addMatcher(typedefDecl(isExpansionInMainFile()).bind(TypedefId),
-                     this);
+  Finder->addMatcher(typedefDecl().bind(TypedefId), this);
   auto ParenFunctionType = parenType(innerType(functionType()));
   auto PointerToFunctionType = pointee(ParenFunctionType);
   auto FunctionOrMemberPointer =
       anyOf(hasType(pointerType(PointerToFunctionType)),
             hasType(memberPointerType(PointerToFunctionType)));
-  Finder->addMatcher(
-      fieldDecl(isExpansionInMainFile(), 
FunctionOrMemberPointer).bind(FieldId),
-      this);
-  Finder->addMatcher(
-      varDecl(isExpansionInMainFile(), FunctionOrMemberPointer).bind(VarId),
-      this);
+  Finder->addMatcher(fieldDecl(FunctionOrMemberPointer).bind(FieldId), this);
+  Finder->addMatcher(varDecl(FunctionOrMemberPointer).bind(VarId), this);
   auto CastDestinationIsFunction =
       hasDestinationType(pointsTo(ParenFunctionType));
   Finder->addMatcher(
-      cStyleCastExpr(isExpansionInMainFile(), CastDestinationIsFunction)
-          .bind(CStyleCastId),
-      this);
+      cStyleCastExpr(CastDestinationIsFunction).bind(CStyleCastId), this);
   Finder->addMatcher(
-      cxxStaticCastExpr(isExpansionInMainFile(), CastDestinationIsFunction)
-          .bind(NamedCastId),
-      this);
+      cxxStaticCastExpr(CastDestinationIsFunction).bind(NamedCastId), this);
   Finder->addMatcher(
-      cxxReinterpretCastExpr(isExpansionInMainFile(), 
CastDestinationIsFunction)
-          .bind(NamedCastId),
+      cxxReinterpretCastExpr(CastDestinationIsFunction).bind(NamedCastId),
       this);
   Finder->addMatcher(
-      cxxConstCastExpr(isExpansionInMainFile(), CastDestinationIsFunction)
-          .bind(NamedCastId),
-      this);
-  Finder->addMatcher(lambdaExpr(isExpansionInMainFile()).bind(LambdaId), this);
+      cxxConstCastExpr(CastDestinationIsFunction).bind(NamedCastId), this);
+  Finder->addMatcher(lambdaExpr().bind(LambdaId), this);
 }
 
 void RedundantVoidArgCheck::check(const MatchFinder::MatchResult &Result) {


Index: clang-tools-extra/trunk/clang-tidy/modernize/RedundantVoidArgCheck.cpp
===================================================================
--- clang-tools-extra/trunk/clang-tidy/modernize/RedundantVoidArgCheck.cpp
+++ clang-tools-extra/trunk/clang-tidy/modernize/RedundantVoidArgCheck.cpp
@@ -46,42 +46,30 @@
 namespace modernize {
 
 void RedundantVoidArgCheck::registerMatchers(MatchFinder *Finder) {
-  Finder->addMatcher(functionDecl(isExpansionInMainFile(), parameterCountIs(0),
-                                  unless(isImplicit()), unless(isExternC()))
+  Finder->addMatcher(functionDecl(parameterCountIs(0), unless(isImplicit()),
+                                  unless(isExternC()))
                          .bind(FunctionId),
                      this);
-  Finder->addMatcher(typedefDecl(isExpansionInMainFile()).bind(TypedefId),
-                     this);
+  Finder->addMatcher(typedefDecl().bind(TypedefId), this);
   auto ParenFunctionType = parenType(innerType(functionType()));
   auto PointerToFunctionType = pointee(ParenFunctionType);
   auto FunctionOrMemberPointer =
       anyOf(hasType(pointerType(PointerToFunctionType)),
             hasType(memberPointerType(PointerToFunctionType)));
-  Finder->addMatcher(
-      fieldDecl(isExpansionInMainFile(), FunctionOrMemberPointer).bind(FieldId),
-      this);
-  Finder->addMatcher(
-      varDecl(isExpansionInMainFile(), FunctionOrMemberPointer).bind(VarId),
-      this);
+  Finder->addMatcher(fieldDecl(FunctionOrMemberPointer).bind(FieldId), this);
+  Finder->addMatcher(varDecl(FunctionOrMemberPointer).bind(VarId), this);
   auto CastDestinationIsFunction =
       hasDestinationType(pointsTo(ParenFunctionType));
   Finder->addMatcher(
-      cStyleCastExpr(isExpansionInMainFile(), CastDestinationIsFunction)
-          .bind(CStyleCastId),
-      this);
+      cStyleCastExpr(CastDestinationIsFunction).bind(CStyleCastId), this);
   Finder->addMatcher(
-      cxxStaticCastExpr(isExpansionInMainFile(), CastDestinationIsFunction)
-          .bind(NamedCastId),
-      this);
+      cxxStaticCastExpr(CastDestinationIsFunction).bind(NamedCastId), this);
   Finder->addMatcher(
-      cxxReinterpretCastExpr(isExpansionInMainFile(), CastDestinationIsFunction)
-          .bind(NamedCastId),
+      cxxReinterpretCastExpr(CastDestinationIsFunction).bind(NamedCastId),
       this);
   Finder->addMatcher(
-      cxxConstCastExpr(isExpansionInMainFile(), CastDestinationIsFunction)
-          .bind(NamedCastId),
-      this);
-  Finder->addMatcher(lambdaExpr(isExpansionInMainFile()).bind(LambdaId), this);
+      cxxConstCastExpr(CastDestinationIsFunction).bind(NamedCastId), this);
+  Finder->addMatcher(lambdaExpr().bind(LambdaId), this);
 }
 
 void RedundantVoidArgCheck::check(const MatchFinder::MatchResult &Result) {
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to