summaryrefslogtreecommitdiff
path: root/compilerplugins/clang/literaltoboolconversion.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'compilerplugins/clang/literaltoboolconversion.cxx')
-rw-r--r--compilerplugins/clang/literaltoboolconversion.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/compilerplugins/clang/literaltoboolconversion.cxx b/compilerplugins/clang/literaltoboolconversion.cxx
index 5c87f474ec23..c94e0d1b014b 100644
--- a/compilerplugins/clang/literaltoboolconversion.cxx
+++ b/compilerplugins/clang/literaltoboolconversion.cxx
@@ -160,8 +160,8 @@ bool LiteralToBoolConversion::isFromCIncludeFile(
return false;
}
#endif
- return compiler.getSourceManager().getFilename(spellingLocation).endswith(
- ".h");
+ return StringRef(compiler.getSourceManager().getPresumedLoc(spellingLocation)
+ .getFilename()).endswith(".h");
}
bool LiteralToBoolConversion::isMacroBodyExpansion(SourceLocation location)