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/Sema/SemaChecking.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/Sema/SemaChecking.cpp')
| -rw-r--r-- | clang/lib/Sema/SemaChecking.cpp | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/clang/lib/Sema/SemaChecking.cpp b/clang/lib/Sema/SemaChecking.cpp index cdb6e9584e95..254c272b8093 100644 --- a/clang/lib/Sema/SemaChecking.cpp +++ b/clang/lib/Sema/SemaChecking.cpp @@ -1219,7 +1219,7 @@ void Sema::checkFortifiedBuiltinMemoryFunction(FunctionDecl *FD, if (IsChkVariant) { FunctionName = FunctionName.drop_front(std::strlen("__builtin___")); FunctionName = FunctionName.drop_back(std::strlen("_chk")); - } else if (FunctionName.startswith("__builtin_")) { + } else if (FunctionName.starts_with("__builtin_")) { FunctionName = FunctionName.drop_front(std::strlen("__builtin_")); } return FunctionName; @@ -18270,15 +18270,14 @@ static bool isSetterLikeSelector(Selector sel) { StringRef str = sel.getNameForSlot(0); while (!str.empty() && str.front() == '_') str = str.substr(1); - if (str.startswith("set")) + if (str.starts_with("set")) str = str.substr(3); - else if (str.startswith("add")) { + else if (str.starts_with("add")) { // Specially allow 'addOperationWithBlock:'. - if (sel.getNumArgs() == 1 && str.startswith("addOperationWithBlock")) + if (sel.getNumArgs() == 1 && str.starts_with("addOperationWithBlock")) return false; str = str.substr(3); - } - else + } else return false; if (str.empty()) return true; |
