summaryrefslogtreecommitdiffstats
path: root/clang/lib/StaticAnalyzer/Core/BugReporter.cpp
diff options
context:
space:
mode:
authorEli Friedman <eli.friedman@gmail.com>2013-08-22 00:27:10 +0000
committerEli Friedman <eli.friedman@gmail.com>2013-08-22 00:27:10 +0000
commit5ba37d5282d05a6ca51267534f10eac4a0a479ad (patch)
tree8d9092ab043ff8b84e479cdd4e7c97fe10edd254 /clang/lib/StaticAnalyzer/Core/BugReporter.cpp
parent6a7a727174830d448cfcede4090ab7edc3b6d19a (diff)
downloadbcm5719-llvm-5ba37d5282d05a6ca51267534f10eac4a0a479ad.tar.gz
bcm5719-llvm-5ba37d5282d05a6ca51267534f10eac4a0a479ad.zip
Split isFromMainFile into two functions.
Basically, isInMainFile considers line markers, and isWrittenInMainFile doesn't. Distinguishing between the two is useful when dealing with files which are preprocessed files or rewritten with -frewrite-includes (so we don't, for example, print useless warnings). llvm-svn: 188968
Diffstat (limited to 'clang/lib/StaticAnalyzer/Core/BugReporter.cpp')
-rw-r--r--clang/lib/StaticAnalyzer/Core/BugReporter.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/StaticAnalyzer/Core/BugReporter.cpp b/clang/lib/StaticAnalyzer/Core/BugReporter.cpp
index 2123a451811..1df3053edfc 100644
--- a/clang/lib/StaticAnalyzer/Core/BugReporter.cpp
+++ b/clang/lib/StaticAnalyzer/Core/BugReporter.cpp
@@ -2233,7 +2233,7 @@ static void removePunyEdges(PathPieces &path,
SourceLocation FirstLoc = start->getLocStart();
SourceLocation SecondLoc = end->getLocStart();
- if (!SM.isFromSameFile(FirstLoc, SecondLoc))
+ if (!SM.isWrittenInSameFile(FirstLoc, SecondLoc))
continue;
if (SM.isBeforeInTranslationUnit(SecondLoc, FirstLoc))
std::swap(SecondLoc, FirstLoc);
OpenPOWER on IntegriCloud