[PATCH] D15866: Warn when using `defined` in a macro definition.

Nico Weber via cfe-commits cfe-commits at lists.llvm.org
Thu Jan 14 19:34:37 PST 2016

Thanks for the review!

I tweaked it a bit so that this only warns on function-type macros in
-pedantic mode. That way, the warning can even be used in practice :-)

On Thu, Jan 14, 2016 at 10:33 PM, Nico Weber <thakis at chromium.org> wrote:

> thakis updated this revision to Diff 44958.
> thakis added a comment.
> For function-type macros, make the warning only show up with -pedantic
> http://reviews.llvm.org/D15866
> Files:
>   include/clang/Basic/DiagnosticGroups.td
>   include/clang/Basic/DiagnosticLexKinds.td
>   lib/Lex/PPExpressions.cpp
>   test/Lexer/cxx-features.cpp
>   test/Preprocessor/expr_define_expansion.c
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20160114/c35a38f7/attachment.html>

More information about the cfe-commits mailing list