diff options
author | Kazu Hirata <kazu@google.com> | 2023-12-25 12:54:35 -0800 |
---|---|---|
committer | Kazu Hirata <kazu@google.com> | 2023-12-25 12:54:35 -0800 |
commit | 68f832f56da1af0e5fc77003f640648ec7d901ad (patch) | |
tree | 6dbeb4136ae804a4aba66c94a778456344f3ec13 /clang/lib/Sema/SemaChecking.cpp | |
parent | 9e98f8d7ac11c63768b1ed69c11ea75c8b794063 (diff) | |
download | llvm-68f832f56da1af0e5fc77003f640648ec7d901ad.zip llvm-68f832f56da1af0e5fc77003f640648ec7d901ad.tar.gz llvm-68f832f56da1af0e5fc77003f640648ec7d901ad.tar.bz2 |
[clang] Use StringRef::consume_front (NFC)
Diffstat (limited to 'clang/lib/Sema/SemaChecking.cpp')
-rw-r--r-- | clang/lib/Sema/SemaChecking.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/clang/lib/Sema/SemaChecking.cpp b/clang/lib/Sema/SemaChecking.cpp index 2a69325..66dac99 100644 --- a/clang/lib/Sema/SemaChecking.cpp +++ b/clang/lib/Sema/SemaChecking.cpp @@ -1219,8 +1219,8 @@ void Sema::checkFortifiedBuiltinMemoryFunction(FunctionDecl *FD, if (IsChkVariant) { FunctionName = FunctionName.drop_front(std::strlen("__builtin___")); FunctionName = FunctionName.drop_back(std::strlen("_chk")); - } else if (FunctionName.starts_with("__builtin_")) { - FunctionName = FunctionName.drop_front(std::strlen("__builtin_")); + } else { + FunctionName.consume_front("__builtin_"); } return FunctionName; }; |