forked from OSchip/llvm-project
[Preprocessor] Only check for -Wunused-macros if the translation unit kind is TU_Complete.
llvm-svn: 203360
This commit is contained in:
parent
9174593d09
commit
8ed7414e58
|
@ -427,7 +427,7 @@ bool Preprocessor::HandleEndOfFile(Token &Result, bool isEndOfMacro) {
|
||||||
if (!isIncrementalProcessingEnabled())
|
if (!isIncrementalProcessingEnabled())
|
||||||
CurPPLexer = 0;
|
CurPPLexer = 0;
|
||||||
|
|
||||||
if (TUKind != TU_Prefix) {
|
if (TUKind == TU_Complete) {
|
||||||
// This is the end of the top-level file. 'WarnUnusedMacroLocs' has
|
// This is the end of the top-level file. 'WarnUnusedMacroLocs' has
|
||||||
// collected all macro locations that we need to warn because they are not
|
// collected all macro locations that we need to warn because they are not
|
||||||
// used.
|
// used.
|
||||||
|
|
Loading…
Reference in New Issue