aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Frontend/PrintPreprocessedOutput.cpp
diff options
context:
space:
mode:
authorMichael Kruse <llvm-project@meinersbur.de>2021-11-05 00:13:49 -0500
committerMichael Kruse <llvm-project@meinersbur.de>2021-11-05 00:43:40 -0500
commit8f099d17a1bee857ada3c5af032cfcb559252024 (patch)
treede1d2c158782a4dcdd69a96b772c30a5ba388997 /clang/lib/Frontend/PrintPreprocessedOutput.cpp
parent96950270669acd3c342a266562ff3a41464cc0a0 (diff)
downloadllvm-8f099d17a1bee857ada3c5af032cfcb559252024.zip
llvm-8f099d17a1bee857ada3c5af032cfcb559252024.tar.gz
llvm-8f099d17a1bee857ada3c5af032cfcb559252024.tar.bz2
[Preprocessor] Fix warning: left and right subexpressions are identical. NFCI.
This is reported by msvc as warning C6287: redundant code: the left and right subexpressions are identical EmittedDirectiveOnThisLine implies EmittedTokensOnThisLine making this an NFC change. To be on the safe side and because both of them are checked at other places as well, we continue to check both. Compiler warning reported here: https://reviews.llvm.org/D104601#2957333
Diffstat (limited to 'clang/lib/Frontend/PrintPreprocessedOutput.cpp')
-rw-r--r--clang/lib/Frontend/PrintPreprocessedOutput.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/Frontend/PrintPreprocessedOutput.cpp b/clang/lib/Frontend/PrintPreprocessedOutput.cpp
index 360fa14..fadf0c0 100644
--- a/clang/lib/Frontend/PrintPreprocessedOutput.cpp
+++ b/clang/lib/Frontend/PrintPreprocessedOutput.cpp
@@ -700,7 +700,7 @@ void PrintPPOutputPPCallbacks::HandleWhitespaceBeforeTok(const Token &Tok,
// - The whitespace is necessary to keep the tokens apart and there is not
// already a newline between them
if (RequireSpace || (!MinimizeWhitespace && Tok.hasLeadingSpace()) ||
- ((EmittedTokensOnThisLine || EmittedTokensOnThisLine) &&
+ ((EmittedTokensOnThisLine || EmittedDirectiveOnThisLine) &&
AvoidConcat(PrevPrevTok, PrevTok, Tok)))
OS << ' ';
}