diff options
author | Jorge Gorbe Moya <jgorbe@google.com> | 2022-03-31 14:54:41 -0700 |
---|---|---|
committer | Jorge Gorbe Moya <jgorbe@google.com> | 2022-03-31 14:54:41 -0700 |
commit | fc7573f29c79a4bbcfc0d6d001b7c7ae9f1344c7 (patch) | |
tree | f0edf12cddc46c91583f81ac6c0cbd412fd0256e /clang/lib/Frontend/CompilerInvocation.cpp | |
parent | de4bcdc2baccc0ce478f2f34e201079102983a5b (diff) | |
download | llvm-fc7573f29c79a4bbcfc0d6d001b7c7ae9f1344c7.zip llvm-fc7573f29c79a4bbcfc0d6d001b7c7ae9f1344c7.tar.gz llvm-fc7573f29c79a4bbcfc0d6d001b7c7ae9f1344c7.tar.bz2 |
Revert "[misexpect] Re-implement MisExpect Diagnostics"
This reverts commit 46774df307159444d65083c2fd82f8574f0ab1d9.
Diffstat (limited to 'clang/lib/Frontend/CompilerInvocation.cpp')
-rw-r--r-- | clang/lib/Frontend/CompilerInvocation.cpp | 41 |
1 files changed, 0 insertions, 41 deletions
diff --git a/clang/lib/Frontend/CompilerInvocation.cpp b/clang/lib/Frontend/CompilerInvocation.cpp index 714660f..f8fd3a29 100644 --- a/clang/lib/Frontend/CompilerInvocation.cpp +++ b/clang/lib/Frontend/CompilerInvocation.cpp @@ -107,20 +107,6 @@ using namespace options; using namespace llvm::opt; //===----------------------------------------------------------------------===// -// Helpers. -//===----------------------------------------------------------------------===// - -// Parse misexpect tolerance argument value. -// Valid option values are integers in the range [0, 100) -inline Expected<Optional<uint64_t>> parseToleranceOption(StringRef Arg) { - int64_t Val; - if (Arg.getAsInteger(10, Val)) - return llvm::createStringError(llvm::inconvertibleErrorCode(), - "Not an integer: %s", Arg.data()); - return Val; -} - -//===----------------------------------------------------------------------===// // Initialization. //===----------------------------------------------------------------------===// @@ -1549,9 +1535,6 @@ void CompilerInvocation::GenerateCodeGenArgs( : "auto", SA); - GenerateArg(Args, OPT_fdiagnostics_misexpect_tolerance_EQ, - Twine(*Opts.DiagnosticsMisExpectTolerance), SA); - for (StringRef Sanitizer : serializeSanitizerKinds(Opts.SanitizeRecover)) GenerateArg(Args, OPT_fsanitize_recover_EQ, Sanitizer, SA); @@ -1969,23 +1952,6 @@ bool CompilerInvocation::ParseCodeGenArgs(CodeGenOptions &Opts, ArgList &Args, } } - if (auto *arg = - Args.getLastArg(options::OPT_fdiagnostics_misexpect_tolerance_EQ)) { - auto ResultOrErr = parseToleranceOption(arg->getValue()); - - if (!ResultOrErr) { - Diags.Report(diag::err_drv_invalid_diagnotics_misexpect_tolerance) - << "-fdiagnostics-misexpect-tolerance="; - } else { - Opts.DiagnosticsMisExpectTolerance = *ResultOrErr; - if ((!Opts.DiagnosticsMisExpectTolerance.hasValue() || - Opts.DiagnosticsMisExpectTolerance.getValue() > 0) && - !UsingProfile) - Diags.Report(diag::warn_drv_diagnostics_misexpect_requires_pgo) - << "-fdiagnostics-misexpect-tolerance="; - } - } - // If the user requested to use a sample profile for PGO, then the // backend will need to track source location information so the profile // can be incorporated into the IR. @@ -4611,13 +4577,6 @@ bool CompilerInvocation::CreateFromArgsImpl( if (Res.getFrontendOpts().ProgramAction == frontend::RewriteObjC) LangOpts.ObjCExceptions = 1; - for (auto Warning : Res.getDiagnosticOpts().Warnings) { - if (Warning == "misexpect" && - !Diags.isIgnored(diag::warn_profile_data_misexpect, SourceLocation())) { - Res.getCodeGenOpts().MisExpect = true; - } - } - if (LangOpts.CUDA) { // During CUDA device-side compilation, the aux triple is the // triple used for host compilation. |