Skip to content

Commit 0f97cd8

Browse files
[Frontend] Use StringRef::ends_with (NFC) (#135988)
1 parent c4e9901 commit 0f97cd8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Diff for: clang/lib/Frontend/InitPreprocessor.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ using namespace clang;
3232
static bool MacroBodyEndsInBackslash(StringRef MacroBody) {
3333
while (!MacroBody.empty() && isWhitespace(MacroBody.back()))
3434
MacroBody = MacroBody.drop_back();
35-
return !MacroBody.empty() && MacroBody.back() == '\\';
35+
return MacroBody.ends_with('\\');
3636
}
3737

3838
// Append a #define line to Buf for Macro. Macro should be of the form XXX,

0 commit comments

Comments
 (0)