diff options
author | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2012-01-26 02:40:48 +0000 |
---|---|---|
committer | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2012-01-26 02:40:48 +0000 |
commit | 24e9afff4345b331c8eab721741c3d6cf6600bbf (patch) | |
tree | 448a5967ebb13639c601d69768120328419d6702 /clang/lib/FrontendTool | |
parent | 7b878febf1bb8bec97f0ed55d5c09298b329ad12 (diff) | |
download | bcm5719-llvm-24e9afff4345b331c8eab721741c3d6cf6600bbf.tar.gz bcm5719-llvm-24e9afff4345b331c8eab721741c3d6cf6600bbf.zip |
Introduce 3 new fixit options:
-fixit-recompile
applies fixits and recompiles the result
-fixit-to-temporary
applies fixits to temporary files
-fix-only-warnings">,
applies fixits for warnings only, not errors
Combining "-fixit-recompile -fixit-to-temporary" allows testing the result of fixits
without touching the original sources.
llvm-svn: 149027
Diffstat (limited to 'clang/lib/FrontendTool')
-rw-r--r-- | clang/lib/FrontendTool/ExecuteCompilerInvocation.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/clang/lib/FrontendTool/ExecuteCompilerInvocation.cpp b/clang/lib/FrontendTool/ExecuteCompilerInvocation.cpp index 2782a85beb6..9f2bdf25be5 100644 --- a/clang/lib/FrontendTool/ExecuteCompilerInvocation.cpp +++ b/clang/lib/FrontendTool/ExecuteCompilerInvocation.cpp @@ -87,6 +87,10 @@ static FrontendAction *CreateFrontendAction(CompilerInstance &CI) { if (!Act) return 0; + if (CI.getFrontendOpts().FixAndRecompile) { + Act = new FixItRecompile(Act); + } + // Potentially wrap the base FE action in an ARC Migrate Tool action. switch (CI.getFrontendOpts().ARCMTAction) { case FrontendOptions::ARCMT_None: |