]> granicus.if.org Git - clang/commit
do not emit -Wunused-macros warnings in -frewrite-includes mode (PR15614)
authorLubos Lunak <l.lunak@centrum.cz>
Mon, 16 Sep 2019 19:18:37 +0000 (19:18 +0000)
committerLubos Lunak <l.lunak@centrum.cz>
Mon, 16 Sep 2019 19:18:37 +0000 (19:18 +0000)
commitcb90360eef8944a00785e38181d58274de8b974f
tree0382b2b7eaaa7b89d907ea240ce926e6e4bac632
parent4c6a6cd76e75370db0f3f20014eb70d49c525715
do not emit -Wunused-macros warnings in -frewrite-includes mode (PR15614)

-frewrite-includes calls PP.SetMacroExpansionOnlyInDirectives() to avoid
macro expansions that are useless in that mode, but this can lead
to -Wunused-macros false positives. As -frewrite-includes does not emit
normal warnings, block -Wunused-macros too.

Differential Revision: https://reviews.llvm.org/D65371

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@372026 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Lex/PPDirectives.cpp
test/Frontend/rewrite-includes-warnings.c