summaryrefslogtreecommitdiff
path: root/lib/Frontend/TestModuleFileExtension.cpp
diff options
context:
space:
mode:
authorGeorge Burgess IV <george.burgess.iv@gmail.com>2015-12-08 22:02:00 +0000
committerGeorge Burgess IV <george.burgess.iv@gmail.com>2015-12-08 22:02:00 +0000
commit543c2ee4e169a0192650da497b414e63c48981ed (patch)
treef1987bfa9ca7e0d3447749985a95edeadcf28349 /lib/Frontend/TestModuleFileExtension.cpp
parent157d401f5d70ed850010a3c88902e03d1a9a3d2e (diff)
downloadclang-543c2ee4e169a0192650da497b414e63c48981ed.tar.gz
[Sema] Add warning when comparing nonnull and null
Currently, we emit warnings in some cases where nonnull function parameters are compared against null. This patch extends this support to warn when comparing the result of `returns_nonnull` functions against null. More specifically, we will now warn cases like: int *foo() __attribute__((returns_nonnull)); int main() { if (foo() == NULL) {} // warning: will always evaluate to false } Differential Revision: http://reviews.llvm.org/D15324 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@255058 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Frontend/TestModuleFileExtension.cpp')
0 files changed, 0 insertions, 0 deletions