diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2022-03-20 11:40:34 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2022-05-14 11:43:05 +0000 |
commit | 349cc55c9796c4596a5b9904cd3281af295f878f (patch) | |
tree | 410c5a785075730a35f1272ca6a7adf72222ad03 /contrib/llvm-project/clang/lib/Frontend/LayoutOverrideSource.cpp | |
parent | cb2ae6163174b90e999326ecec3699ee093a5d43 (diff) | |
parent | c0981da47d5696fe36474fcf86b4ce03ae3ff818 (diff) |
Diffstat (limited to 'contrib/llvm-project/clang/lib/Frontend/LayoutOverrideSource.cpp')
-rw-r--r-- | contrib/llvm-project/clang/lib/Frontend/LayoutOverrideSource.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/contrib/llvm-project/clang/lib/Frontend/LayoutOverrideSource.cpp b/contrib/llvm-project/clang/lib/Frontend/LayoutOverrideSource.cpp index 76762d58fe25..0d288db0632f 100644 --- a/contrib/llvm-project/clang/lib/Frontend/LayoutOverrideSource.cpp +++ b/contrib/llvm-project/clang/lib/Frontend/LayoutOverrideSource.cpp @@ -16,11 +16,11 @@ using namespace clang; /// Parse a simple identifier. static std::string parseName(StringRef S) { - if (S.empty() || !isIdentifierHead(S[0])) + if (S.empty() || !isAsciiIdentifierStart(S[0])) return ""; unsigned Offset = 1; - while (Offset < S.size() && isIdentifierBody(S[Offset])) + while (Offset < S.size() && isAsciiIdentifierContinue(S[Offset])) ++Offset; return S.substr(0, Offset).str(); @@ -43,7 +43,7 @@ LayoutOverrideSource::LayoutOverrideSource(StringRef Filename) { StringRef LineStr(Line); // Determine whether the following line will start a - if (LineStr.find("*** Dumping AST Record Layout") != StringRef::npos) { + if (LineStr.contains("*** Dumping AST Record Layout")) { // Flush the last type/layout, if there is one. if (!CurrentType.empty()) Layouts[CurrentType] = CurrentLayout; |