diff options
| author | Anna Zaks <ganna@apple.com> | 2013-06-08 00:29:24 +0000 |
|---|---|---|
| committer | Anna Zaks <ganna@apple.com> | 2013-06-08 00:29:24 +0000 |
| commit | a3f5a5afefca7653349a88472d5ce01ba7226e27 (patch) | |
| tree | 2c22a4a2a5a072befc334377e75eadb0fd88d7c5 /lib/StaticAnalyzer/Core/BugReporter.cpp | |
| parent | 9aaee92faa84a54a78cc298b1d281c4bce39c122 (diff) | |
| download | clang-a3f5a5afefca7653349a88472d5ce01ba7226e27.tar.gz clang-a3f5a5afefca7653349a88472d5ce01ba7226e27.tar.bz2 clang-a3f5a5afefca7653349a88472d5ce01ba7226e27.tar.xz | |
[analyzer; alternate edges] Fix the edge locations in presence of macros.
We drew the diagnostic edges to wrong statements in cases the note was on a macro.
The fix is simple, but seems to work just fine for a whole bunch of test cases (plist-macros.cpp).
Also, removes an unnecessary edge in edges-new.mm, when function signature starts with a macro.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@183599 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/StaticAnalyzer/Core/BugReporter.cpp')
| -rw-r--r-- | lib/StaticAnalyzer/Core/BugReporter.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/StaticAnalyzer/Core/BugReporter.cpp b/lib/StaticAnalyzer/Core/BugReporter.cpp index e93bb3fce5..dff7d8e59e 100644 --- a/lib/StaticAnalyzer/Core/BugReporter.cpp +++ b/lib/StaticAnalyzer/Core/BugReporter.cpp @@ -1562,7 +1562,7 @@ static void addEdgeToPath(PathPieces &path, return; SourceLocation NewLocL = NewLoc.asLocation(); - if (NewLocL.isInvalid() || NewLocL.isMacroID()) + if (NewLocL.isInvalid()) return; if (!PrevLoc.isValid() || !PrevLoc.asLocation().isValid()) { |
