summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/CGBuiltin.cpp
diff options
context:
space:
mode:
authorTed Kremenek <kremenek@apple.com>2012-09-21 00:09:11 +0000
committerTed Kremenek <kremenek@apple.com>2012-09-21 00:09:11 +0000
commit14f779c4d69098df876c7983549c0e44d9b12aa7 (patch)
treef2e449a96009109e0e6103cf15a517eee1e50d37 /clang/lib/CodeGen/CGBuiltin.cpp
parent96ea28046c7ea912a722a6d0b19a20266001e1f1 (diff)
downloadbcm5719-llvm-14f779c4d69098df876c7983549c0e44d9b12aa7.tar.gz
bcm5719-llvm-14f779c4d69098df876c7983549c0e44d9b12aa7.zip
Implement faux-body-synthesis of well-known functions in the static analyzer when
their implementations are unavailable. Start by simulating dispatch_sync(). This change is largely a bunch of plumbing around something very simple. We use AnalysisDeclContext to conjure up a fake function body (using the current ASTContext) when one does not exist. This is controlled under the analyzer-config option "faux-bodies", which is off by default. The plumbing in this patch is largely to pass the necessary machinery around. CallEvent needs the AnalysisDeclContextManager to get the function definition, as one may get conjured up lazily. BugReporter and PathDiagnosticLocation needed to be relaxed to handle invalid locations, as the conjured body has no real source locations. We do some primitive recovery in diagnostic generation to generate some reasonable locations (for arrows and events), but it can be improved. llvm-svn: 164339
Diffstat (limited to 'clang/lib/CodeGen/CGBuiltin.cpp')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud