diff options
author | Jan Svoboda <jan_svoboda@apple.com> | 2021-02-08 10:18:15 +0100 |
---|---|---|
committer | Jan Svoboda <jan_svoboda@apple.com> | 2021-02-08 10:18:15 +0100 |
commit | 6039f821456fffa24fa36132f2022880fa9128df (patch) | |
tree | 9e5a8ed0df34b516cbb7f16e090d5899841bb0e6 /clang/lib/Frontend/CompilerInvocation.cpp | |
parent | 63623982e1adb4b7e85f21d00d04dd2f555b79b6 (diff) | |
download | llvm-6039f821456fffa24fa36132f2022880fa9128df.zip llvm-6039f821456fffa24fa36132f2022880fa9128df.tar.gz llvm-6039f821456fffa24fa36132f2022880fa9128df.tar.bz2 |
Revert "[clang][cli] Report result of ParseLangArgs"
This reverts commit bff6d9bb
The change causes failure of Clang's Index/implicit-attrs.m test.
Diffstat (limited to 'clang/lib/Frontend/CompilerInvocation.cpp')
-rw-r--r-- | clang/lib/Frontend/CompilerInvocation.cpp | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/clang/lib/Frontend/CompilerInvocation.cpp b/clang/lib/Frontend/CompilerInvocation.cpp index e131804..f4104a3 100644 --- a/clang/lib/Frontend/CompilerInvocation.cpp +++ b/clang/lib/Frontend/CompilerInvocation.cpp @@ -2642,12 +2642,10 @@ static void GenerateLangArgs(const LangOptions &Opts, GenerateArg(Args, OPT_fdeclare_opencl_builtins, SA); } -bool CompilerInvocation::ParseLangArgs(LangOptions &Opts, ArgList &Args, +void CompilerInvocation::ParseLangArgs(LangOptions &Opts, ArgList &Args, InputKind IK, const llvm::Triple &T, std::vector<std::string> &Includes, DiagnosticsEngine &Diags) { - unsigned NumErrorsBefore = Diags.getNumErrors(); - // FIXME: Cleanup per-file based stuff. LangStandard::Kind LangStd = LangStandard::lang_unspecified; if (const Arg *A = Args.getLastArg(OPT_std_EQ)) { @@ -3078,8 +3076,6 @@ bool CompilerInvocation::ParseLangArgs(LangOptions &Opts, ArgList &Args, } } } - - return Success && Diags.getNumErrors() == NumErrorsBefore; } static bool isStrictlyPreprocessorAction(frontend::ActionKind Action) { @@ -3420,8 +3416,8 @@ bool CompilerInvocation::CreateFromArgs(CompilerInvocation &Res, } else { // Other LangOpts are only initialized when the input is not AST or LLVM IR. // FIXME: Should we really be calling this for an Language::Asm input? - Success &= ParseLangArgs(LangOpts, Args, DashX, T, - Res.getPreprocessorOpts().Includes, Diags); + ParseLangArgs(LangOpts, Args, DashX, T, Res.getPreprocessorOpts().Includes, + Diags); if (Res.getFrontendOpts().ProgramAction == frontend::RewriteObjC) LangOpts.ObjCExceptions = 1; if (T.isOSDarwin() && DashX.isPreprocessed()) { |