summaryrefslogtreecommitdiff
path: root/clang/lib/Frontend/CompilerInvocation.cpp
diff options
context:
space:
mode:
authorVitaly Buka <vitalybuka@google.com>2023-12-13 11:24:19 -0800
committerVitaly Buka <vitalybuka@google.com>2023-12-13 11:24:19 -0800
commitbb8c48999b0361efd053f842566c727b5fbfe96d (patch)
tree909da3ecfa7ef50a847f35b817b7fece7d9e1a6f /clang/lib/Frontend/CompilerInvocation.cpp
parent2d98fe9115e37c60fd568008c27038015f28c7e3 (diff)
parent64fa90bf8966cb886463840e5c85b9602cbbdc52 (diff)
[𝘀𝗽𝗿] changes introduced through rebaseusers/vitalybuka/spr/main.asan-install-pthread_atfork
Created using spr 1.3.4 [skip ci]
Diffstat (limited to 'clang/lib/Frontend/CompilerInvocation.cpp')
-rw-r--r--clang/lib/Frontend/CompilerInvocation.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/clang/lib/Frontend/CompilerInvocation.cpp b/clang/lib/Frontend/CompilerInvocation.cpp
index b33bdad2ad81..11f3f2c2d642 100644
--- a/clang/lib/Frontend/CompilerInvocation.cpp
+++ b/clang/lib/Frontend/CompilerInvocation.cpp
@@ -2829,7 +2829,7 @@ static bool ParseFrontendArgs(FrontendOptions &Opts, ArgList &Args,
"-interface-stub-version=ifs-v1"
<< ErrorMessage;
ProgramAction = frontend::ParseSyntaxOnly;
- } else if (!ArgStr.startswith("ifs-")) {
+ } else if (!ArgStr.starts_with("ifs-")) {
std::string ErrorMessage =
"Invalid interface stub format: " + ArgStr.str() + ".";
Diags.Report(diag::err_drv_invalid_value)
@@ -4106,13 +4106,13 @@ bool CompilerInvocation::ParseLangArgs(LangOptions &Opts, ArgList &Args,
// Check the version number is valid: either 3.x (0 <= x <= 9) or
// y or y.0 (4 <= y <= current version).
- if (!VerParts.first.startswith("0") &&
- !VerParts.first.getAsInteger(10, Major) &&
- 3 <= Major && Major <= CLANG_VERSION_MAJOR &&
- (Major == 3 ? VerParts.second.size() == 1 &&
- !VerParts.second.getAsInteger(10, Minor)
- : VerParts.first.size() == Ver.size() ||
- VerParts.second == "0")) {
+ if (!VerParts.first.starts_with("0") &&
+ !VerParts.first.getAsInteger(10, Major) && 3 <= Major &&
+ Major <= CLANG_VERSION_MAJOR &&
+ (Major == 3
+ ? VerParts.second.size() == 1 &&
+ !VerParts.second.getAsInteger(10, Minor)
+ : VerParts.first.size() == Ver.size() || VerParts.second == "0")) {
// Got a valid version number.
if (Major == 3 && Minor <= 8)
Opts.setClangABICompat(LangOptions::ClangABI::Ver3_8);