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)
commita507a5ec8f1d7ded4a808a8813be1ade08580a7b
tree4ff6bac5ea7af28068c8b56947ebf20ee49ec599
parent413647d730972eac9675f695c2ea63fb393a5531
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

llvm-svn: 372026
clang/lib/Lex/PPDirectives.cpp
clang/test/Frontend/rewrite-includes-warnings.c