diff options
Diffstat (limited to 'contrib/llvm-project/clang/lib/Frontend/LayoutOverrideSource.cpp')
| -rw-r--r-- | contrib/llvm-project/clang/lib/Frontend/LayoutOverrideSource.cpp | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/contrib/llvm-project/clang/lib/Frontend/LayoutOverrideSource.cpp b/contrib/llvm-project/clang/lib/Frontend/LayoutOverrideSource.cpp index f474d4fe8fdc..a1866ec09c9d 100644 --- a/contrib/llvm-project/clang/lib/Frontend/LayoutOverrideSource.cpp +++ b/contrib/llvm-project/clang/lib/Frontend/LayoutOverrideSource.cpp @@ -147,8 +147,7 @@ LayoutOverrideSource::LayoutOverrideSource(StringRef Filename) { // Skip over this offset, the following comma, and any spaces. LineStr = LineStr.substr(1); - while (!LineStr.empty() && isWhitespace(LineStr[0])) - LineStr = LineStr.substr(1); + LineStr = LineStr.drop_while(isWhitespace); } } @@ -163,8 +162,7 @@ LayoutOverrideSource::LayoutOverrideSource(StringRef Filename) { // Skip over this offset, the following comma, and any spaces. LineStr = LineStr.substr(1); - while (!LineStr.empty() && isWhitespace(LineStr[0])) - LineStr = LineStr.substr(1); + LineStr = LineStr.drop_while(isWhitespace); } continue; } @@ -180,8 +178,7 @@ LayoutOverrideSource::LayoutOverrideSource(StringRef Filename) { // Skip over this offset, the following comma, and any spaces. LineStr = LineStr.substr(1); - while (!LineStr.empty() && isWhitespace(LineStr[0])) - LineStr = LineStr.substr(1); + LineStr = LineStr.drop_while(isWhitespace); } } } |
