summaryrefslogtreecommitdiff
path: root/compilerplugins/clang/consttobool.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'compilerplugins/clang/consttobool.cxx')
-rw-r--r--compilerplugins/clang/consttobool.cxx7
1 files changed, 4 insertions, 3 deletions
diff --git a/compilerplugins/clang/consttobool.cxx b/compilerplugins/clang/consttobool.cxx
index c13bf7729e72..124ab4efbaaa 100644
--- a/compilerplugins/clang/consttobool.cxx
+++ b/compilerplugins/clang/consttobool.cxx
@@ -266,9 +266,10 @@ private:
bool isFromCIncludeFile(SourceLocation spellingLocation) const
{
return !compiler.getSourceManager().isInMainFile(spellingLocation)
- && (StringRef(
- compiler.getSourceManager().getPresumedLoc(spellingLocation).getFilename())
- .endswith(".h"));
+ && compat::ends_with(StringRef(compiler.getSourceManager()
+ .getPresumedLoc(spellingLocation)
+ .getFilename()),
+ ".h");
}
bool isSharedCAndCppCode(SourceLocation location) const