diff options
author | Jordan Rose <jordan_rose@apple.com> | 2013-03-07 01:23:25 +0000 |
---|---|---|
committer | Jordan Rose <jordan_rose@apple.com> | 2013-03-07 01:23:25 +0000 |
commit | c236b7327f989c1e7fe6b08a188bfef86727513d (patch) | |
tree | 719d2044a91b2612bd4f760f6b53b3f638dedaed /lib/Driver/Tools.cpp | |
parent | 962fbc46664f2486d6805549130fa6b310de6d60 (diff) |
[analyzer] Check for returning null references in ReturnUndefChecker.
Officially in the C++ standard, a null reference cannot exist. However,
it's still very easy to create one:
int &getNullRef() {
int *p = 0;
return *p;
}
We already check that binds to reference regions don't create null references.
This patch checks that we don't create null references by returning, either.
<rdar://problem/13364378>
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@176601 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Driver/Tools.cpp')
0 files changed, 0 insertions, 0 deletions