From 1450f265fcc84a7ca64dd9f3b8d4492c5bd55e23 Mon Sep 17 00:00:00 2001 From: Nick Lewycky Date: Fri, 13 Aug 2010 17:31:00 +0000 Subject: 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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111020 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Frontend/CompilerInvocation.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'lib/Frontend/CompilerInvocation.cpp') diff --git a/lib/Frontend/CompilerInvocation.cpp b/lib/Frontend/CompilerInvocation.cpp index 4ed4b07565..aa6888bd1d 100644 --- a/lib/Frontend/CompilerInvocation.cpp +++ b/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)) { -- cgit v1.2.3