aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Frontend/CompilerInvocation.cpp
diff options
context:
space:
mode:
authorNick Lewycky <nicholas@mxc.ca>2010-08-13 17:31:00 +0000
committerNick Lewycky <nicholas@mxc.ca>2010-08-13 17:31:00 +0000
commit078a5e26fdc2ba4123bdca349139fde083d3c08e (patch)
treebc902e50a119f235cfc8a324cced06109d9de66a /clang/lib/Frontend/CompilerInvocation.cpp
parentd1f4465df01bc40899ebb428546a734050930dac (diff)
downloadllvm-078a5e26fdc2ba4123bdca349139fde083d3c08e.zip
llvm-078a5e26fdc2ba4123bdca349139fde083d3c08e.tar.gz
llvm-078a5e26fdc2ba4123bdca349139fde083d3c08e.tar.bz2
Add a new cc1 option -fix-what-you-can which when combined with the fix-it mode
will apply all fixes even when there were other errors in the file. llvm-svn: 111020
Diffstat (limited to 'clang/lib/Frontend/CompilerInvocation.cpp')
-rw-r--r--clang/lib/Frontend/CompilerInvocation.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/clang/lib/Frontend/CompilerInvocation.cpp b/clang/lib/Frontend/CompilerInvocation.cpp
index 4ed4b07..aa6888b 100644
--- a/clang/lib/Frontend/CompilerInvocation.cpp
+++ b/clang/lib/Frontend/CompilerInvocation.cpp
@@ -369,6 +369,8 @@ static void FrontendOptsToArgs(const FrontendOptions &Opts,
Res.push_back("-ftime-report");
if (Opts.ShowVersion)
Res.push_back("-version");
+ if (Opts.FixWhatYouCan)
+ Res.push_back("-fix-what-you-can");
bool NeedLang = false;
for (unsigned i = 0, e = Opts.Inputs.size(); i != e; ++i)
@@ -1051,6 +1053,7 @@ static InputKind ParseFrontendArgs(FrontendOptions &Opts, ArgList &Args,
Opts.ViewClassInheritance = Args.getLastArgValue(OPT_cxx_inheritance_view);
Opts.ASTMergeFiles = Args.getAllArgValues(OPT_ast_merge);
Opts.LLVMArgs = Args.getAllArgValues(OPT_mllvm);
+ Opts.FixWhatYouCan = Args.hasArg(OPT_fix_what_you_can);
InputKind DashX = IK_None;
if (const Arg *A = Args.getLastArg(OPT_x)) {