aboutsummaryrefslogtreecommitdiff
path: root/contrib/llvm-project/clang/lib/Frontend/LayoutOverrideSource.cpp
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2024-01-03 18:04:11 +0000
committerDimitry Andric <dim@FreeBSD.org>2024-04-06 20:13:16 +0000
commit647cbc5de815c5651677bf8582797f716ec7b48d (patch)
tree0a57db146d82068137e0fe0109ca612aaef5afb6 /contrib/llvm-project/clang/lib/Frontend/LayoutOverrideSource.cpp
parentedc2dc17b1f2dfe45dc85e6cc0ff54bca1ac8214 (diff)
parent77dbea07356e1ab2f37a777d4d1ddc5dd3e301c2 (diff)
Diffstat (limited to 'contrib/llvm-project/clang/lib/Frontend/LayoutOverrideSource.cpp')
-rw-r--r--contrib/llvm-project/clang/lib/Frontend/LayoutOverrideSource.cpp9
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);
}
}
}