[analyzer] Fix r168019 to work with unpruned paths as well.
authorJordan Rose <jordan_rose@apple.com>
Fri, 7 Dec 2012 19:56:29 +0000 (19:56 +0000)
committerJordan Rose <jordan_rose@apple.com>
Fri, 7 Dec 2012 19:56:29 +0000 (19:56 +0000)
commit9a3391364515dec3dd89e285a8af3b91f9976420
treeec9ad31b49bb8ab62d54f0a4ce7ff0d560b08bd8
parent54c9a4fad1997bed3b0d9ff0fb776a9b3a6fd523
[analyzer] Fix r168019 to work with unpruned paths as well.

This is the case where the analyzer tries to print out source locations
for code within a synthesized function body, which of course does not have
a valid source location. The previous fix attempted to do this during
diagnostic path pruning, but some diagnostics have pruning disabled, and
so any diagnostic with a path that goes through a synthesized body will
either hit an assertion or emit invalid output.

<rdar://problem/12657843> (again)

llvm-svn: 169631
clang/include/clang/StaticAnalyzer/Core/BugReporter/BugReporter.h
clang/lib/StaticAnalyzer/Core/BugReporter.cpp
clang/test/Analysis/inlining/path-notes.m