aboutsummaryrefslogtreecommitdiff
path: root/tools/libclang/CIndex.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tools/libclang/CIndex.cpp')
-rw-r--r--tools/libclang/CIndex.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/libclang/CIndex.cpp b/tools/libclang/CIndex.cpp
index e085a27c09..3130a029e7 100644
--- a/tools/libclang/CIndex.cpp
+++ b/tools/libclang/CIndex.cpp
@@ -2814,7 +2814,7 @@ void clang_getExpansionLocation(CXSourceLocation location,
FileID fileID = SM.getFileID(ExpansionLoc);
bool Invalid = false;
const SrcMgr::SLocEntry &sloc = SM.getSLocEntry(fileID, &Invalid);
- if (!sloc.isFile() || Invalid) {
+ if (Invalid || !sloc.isFile()) {
createNullLocation(file, line, column, offset);
return;
}