Skip to content

Commit

Permalink
clang-check: rename the local FixItAction
Browse files Browse the repository at this point in the history
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
  • Loading branch information
compnerd committed Sep 10, 2018
1 parent 04c9c69 commit 7e7b13d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tools/clang-check/ClangCheck.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ class FixItRewriter : public clang::FixItRewriter {

/// 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);
Expand Down Expand Up @@ -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);

Expand Down

0 comments on commit 7e7b13d

Please sign in to comment.