[PATCH] D122659: [clang][preprocessor] Allow calling DumpToken() on annotation tokens
Timm Bäder via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Apr 12 22:06:27 PDT 2022
This revision was automatically updated to reflect the committed changes.
Closed by commit rG0eb5891adcb8: [clang][preprocessor] Allow calling DumpToken() on annotation tokens (authored by tbaeder).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D122659/new/
https://reviews.llvm.org/D122659
Files:
clang/lib/Lex/Preprocessor.cpp
Index: clang/lib/Lex/Preprocessor.cpp
===================================================================
--- clang/lib/Lex/Preprocessor.cpp
+++ clang/lib/Lex/Preprocessor.cpp
@@ -232,8 +232,10 @@
}
void Preprocessor::DumpToken(const Token &Tok, bool DumpFlags) const {
- llvm::errs() << tok::getTokenName(Tok.getKind()) << " '"
- << getSpelling(Tok) << "'";
+ llvm::errs() << tok::getTokenName(Tok.getKind());
+
+ if (!Tok.isAnnotation())
+ llvm::errs() << " '" << getSpelling(Tok) << "'";
if (!DumpFlags) return;
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D122659.422396.patch
Type: text/x-patch
Size: 546 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20220413/9d391132/attachment-0001.bin>
More information about the cfe-commits
mailing list