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)
commit0a5e166a0ba60dff9f004f6721c5476f29386169
tree7e44cf21071905cda13e6effbf13363c5ea146f2
parent5b79ede65a2636c4676dfa49a23076fd870cd2ac
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.

llvm-svn: 260776
clang/lib/Sema/SemaChecking.cpp
clang/test/SemaCXX/conversion.cpp