]> granicus.if.org Git - clang/commitdiff
clang-check: rename the local FixItAction
authorSaleem Abdulrasool <compnerd@compnerd.org>
Mon, 10 Sep 2018 22:57:26 +0000 (22:57 +0000)
committerSaleem Abdulrasool <compnerd@compnerd.org>
Mon, 10 Sep 2018 22:57:26 +0000 (22:57 +0000)
Resolve the ambiguity in the FixItAction definition by renaming the type.  With
Xcode 9.2, you would fail to build this with:

  llvm/tools/clang/tools/clang-check/ClangCheck.cpp:183:48: error: reference to 'FixItAction' is ambiguous
      FrontendFactory = newFrontendActionFactory<FixItAction>();
                                                 ^

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

tools/clang-check/ClangCheck.cpp

index f00e9a3df0ade0f57e56b1e507822dcb93c8df8b..3e3d6763c183f605b016868b7c93f953a6f3d048 100644 (file)
@@ -122,7 +122,7 @@ public:
 
 /// Subclasses \c clang::FixItAction so that we can install the custom
 /// \c FixItRewriter.
-class FixItAction : public clang::FixItAction {
+class ClangCheckFixItAction : public clang::FixItAction {
 public:
   bool BeginSourceFileAction(clang::CompilerInstance& CI) override {
     FixItOpts.reset(new FixItOptions);
@@ -180,7 +180,7 @@ int main(int argc, const char **argv) {
   if (Analyze)
     FrontendFactory = newFrontendActionFactory<clang::ento::AnalysisAction>();
   else if (Fixit)
-    FrontendFactory = newFrontendActionFactory<FixItAction>();
+    FrontendFactory = newFrontendActionFactory<ClangCheckFixItAction>();
   else
     FrontendFactory = newFrontendActionFactory(&CheckFactory);