]> granicus.if.org Git - clang/commit
Make -Wnull-conversion more useful.
authorRichard Trieu <rtrieu@google.com>
Sat, 13 Feb 2016 00:58:53 +0000 (00:58 +0000)
committerRichard Trieu <rtrieu@google.com>
Sat, 13 Feb 2016 00:58:53 +0000 (00:58 +0000)
commitb29394d6604c518b0239d4f382e9898e7400c7e5
tree52c2615fa02b5bdc3dcc3003e89ac3e2fbf107c5
parenta04f05c81ac8c899960ed88b854a8ef9752a437b
Make -Wnull-conversion more useful.

When a null constant is used in a macro, walk through the macro stack to
determine where the null constant is written and where the context is located.
Only warn if both locations are within the same macro expansion.  This helps
function-like macros which involve pointers be treated as if they were
functions.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@260776 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Sema/SemaChecking.cpp
test/SemaCXX/conversion.cpp