diff options
author | Anna Zaks <ganna@apple.com> | 2015-06-26 17:42:58 +0000 |
---|---|---|
committer | Anna Zaks <ganna@apple.com> | 2015-06-26 17:42:58 +0000 |
commit | 3849dea8c97be08a4c80787d00893f52145328f3 (patch) | |
tree | 74f9c7e7f307accf7cf2714542dbf71a79a2aa71 /llvm/lib/CodeGen/MachineInstr.cpp | |
parent | bced3032e02b95433b9ab576f030f20a687657cd (diff) | |
download | llvm-3849dea8c97be08a4c80787d00893f52145328f3.zip llvm-3849dea8c97be08a4c80787d00893f52145328f3.tar.gz llvm-3849dea8c97be08a4c80787d00893f52145328f3.tar.bz2 |
[static analyzer] Analyzer is skipping forward declared C/C++ functions
A patch by Karthik Bhat!
This patch fixes a regression introduced by r224398. Prior to r224398
we were able to analyze the following code in test-include.c and report
a null deref in this case. But post r224398 this analysis is being skipped.
E.g.
// test-include.c
#include "test-include.h"
void test(int * data) {
data = 0;
*data = 1;
}
// test-include.h
void test(int * data);
This patch uses the function body (instead of its declaration) as the location
of the function when deciding if the Decl should be analyzed with path-sensitive
analysis. (Prior to r224398, the call graph was guaranteed to have a definition
when available.)
llvm-svn: 240800
Diffstat (limited to 'llvm/lib/CodeGen/MachineInstr.cpp')
0 files changed, 0 insertions, 0 deletions