r341877 - clang-check: rename the local FixItAction
Saleem Abdulrasool via cfe-commits
cfe-commits at lists.llvm.org
Mon Sep 10 15:57:26 PDT 2018
Author: compnerd
Date: Mon Sep 10 15:57:26 2018
New Revision: 341877
URL: http://llvm.org/viewvc/llvm-project?rev=341877&view=rev
Log:
clang-check: rename the local FixItAction
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>();
^
Modified:
cfe/trunk/tools/clang-check/ClangCheck.cpp
Modified: cfe/trunk/tools/clang-check/ClangCheck.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/tools/clang-check/ClangCheck.cpp?rev=341877&r1=341876&r2=341877&view=diff
==============================================================================
--- cfe/trunk/tools/clang-check/ClangCheck.cpp (original)
+++ cfe/trunk/tools/clang-check/ClangCheck.cpp Mon Sep 10 15:57:26 2018
@@ -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);
More information about the cfe-commits
mailing list