diff options
author | Anna Zaks <ganna@apple.com> | 2013-04-05 00:59:33 +0000 |
---|---|---|
committer | Anna Zaks <ganna@apple.com> | 2013-04-05 00:59:33 +0000 |
commit | 610f79cbab4d752349b5c81a94682a6a82b102e7 (patch) | |
tree | 0101480fb15b5cd9b41bd18657e5a8f9d6046705 /lib/StaticAnalyzer/Core/PathDiagnostic.cpp | |
parent | 5a15b9dc8386766592eec833dce1839ca7f56dbf (diff) |
[analyzer] Show path diagnostic for C++ initializers
Also had to modify the PostInitializer ProgramLocation to contain the field region.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@178826 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/StaticAnalyzer/Core/PathDiagnostic.cpp')
-rw-r--r-- | lib/StaticAnalyzer/Core/PathDiagnostic.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/StaticAnalyzer/Core/PathDiagnostic.cpp b/lib/StaticAnalyzer/Core/PathDiagnostic.cpp index 686540b60e..7c0fb14a5c 100644 --- a/lib/StaticAnalyzer/Core/PathDiagnostic.cpp +++ b/lib/StaticAnalyzer/Core/PathDiagnostic.cpp @@ -588,6 +588,9 @@ PathDiagnosticLocation S = SP->getStmt(); if (P.getAs<PostStmtPurgeDeadSymbols>()) return PathDiagnosticLocation::createEnd(S, SMng, P.getLocationContext()); + } else if (Optional<PostInitializer> PIP = P.getAs<PostInitializer>()) { + return PathDiagnosticLocation(PIP->getInitializer()->getSourceLocation(), + SMng); } else if (Optional<PostImplicitCall> PIE = P.getAs<PostImplicitCall>()) { return PathDiagnosticLocation(PIE->getLocation(), SMng); } else if (Optional<CallEnter> CE = P.getAs<CallEnter>()) { |