diff options
Diffstat (limited to 'contrib/llvm-project/clang/lib/Basic/Warnings.cpp')
| -rw-r--r-- | contrib/llvm-project/clang/lib/Basic/Warnings.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/contrib/llvm-project/clang/lib/Basic/Warnings.cpp b/contrib/llvm-project/clang/lib/Basic/Warnings.cpp index 92954cab6fb0..5a5ac5556338 100644 --- a/contrib/llvm-project/clang/lib/Basic/Warnings.cpp +++ b/contrib/llvm-project/clang/lib/Basic/Warnings.cpp @@ -199,8 +199,7 @@ void clang::ProcessWarningOptions(DiagnosticsEngine &Diags, // Check to see if this warning starts with "no-", if so, this is a // negative form of the option. - bool IsPositive = !Opt.starts_with("no-"); - if (!IsPositive) Opt = Opt.substr(3); + bool IsPositive = !Opt.consume_front("no-"); auto Severity = IsPositive ? diag::Severity::Remark : diag::Severity::Ignored; |
