diff options
| author | Vitaly Buka <vitalybuka@google.com> | 2023-12-13 11:24:19 -0800 |
|---|---|---|
| committer | Vitaly Buka <vitalybuka@google.com> | 2023-12-13 11:24:19 -0800 |
| commit | bb8c48999b0361efd053f842566c727b5fbfe96d (patch) | |
| tree | 909da3ecfa7ef50a847f35b817b7fece7d9e1a6f /clang/lib/Basic/Attributes.cpp | |
| parent | 2d98fe9115e37c60fd568008c27038015f28c7e3 (diff) | |
| parent | 64fa90bf8966cb886463840e5c85b9602cbbdc52 (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/Basic/Attributes.cpp')
| -rw-r--r-- | clang/lib/Basic/Attributes.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/clang/lib/Basic/Attributes.cpp b/clang/lib/Basic/Attributes.cpp index bb495216ca93..44a4f1890d39 100644 --- a/clang/lib/Basic/Attributes.cpp +++ b/clang/lib/Basic/Attributes.cpp @@ -33,7 +33,7 @@ int clang::hasAttribute(AttributeCommonInfo::Syntax Syntax, const TargetInfo &Target, const LangOptions &LangOpts) { StringRef Name = Attr->getName(); // Normalize the attribute name, __foo__ becomes foo. - if (Name.size() >= 4 && Name.startswith("__") && Name.endswith("__")) + if (Name.size() >= 4 && Name.starts_with("__") && Name.ends_with("__")) Name = Name.substr(2, Name.size() - 4); // Normalize the scope name, but only for gnu and clang attributes. @@ -103,8 +103,8 @@ static StringRef normalizeAttrName(const IdentifierInfo *Name, (NormalizedScopeName.empty() || NormalizedScopeName == "gnu" || NormalizedScopeName == "clang")); StringRef AttrName = Name->getName(); - if (ShouldNormalize && AttrName.size() >= 4 && AttrName.startswith("__") && - AttrName.endswith("__")) + if (ShouldNormalize && AttrName.size() >= 4 && AttrName.starts_with("__") && + AttrName.ends_with("__")) AttrName = AttrName.slice(2, AttrName.size() - 2); return AttrName; |
