diff options
author | Paul Kirth <paulkirth@google.com> | 2022-03-18 00:21:33 +0000 |
---|---|---|
committer | Paul Kirth <paulkirth@google.com> | 2022-03-18 00:21:33 +0000 |
commit | 964398ccb1168e4ff5b921739dda4141df211f0c (patch) | |
tree | 925189b00b0e74132fedfbbdd5e06beec6a15650 /clang/lib/Frontend/CompilerInvocation.cpp | |
parent | 5f4a334ded90f80ca16ceb2bf784c62806ee23d1 (diff) | |
download | llvm-964398ccb1168e4ff5b921739dda4141df211f0c.zip llvm-964398ccb1168e4ff5b921739dda4141df211f0c.tar.gz llvm-964398ccb1168e4ff5b921739dda4141df211f0c.tar.bz2 |
Revert "Revert "Revert "[misexpect] Re-implement MisExpect Diagnostics"""
This reverts commit 6cf560d69a222bff4af4e1d092437fd77f0f981c.
Diffstat (limited to 'clang/lib/Frontend/CompilerInvocation.cpp')
-rw-r--r-- | clang/lib/Frontend/CompilerInvocation.cpp | 36 |
1 files changed, 0 insertions, 36 deletions
diff --git a/clang/lib/Frontend/CompilerInvocation.cpp b/clang/lib/Frontend/CompilerInvocation.cpp index 7577029..cac443d 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. //===----------------------------------------------------------------------===// @@ -1966,21 +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 (!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. @@ -4526,13 +4497,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. |