================
@@ -240,14 +241,59 @@ void Preprocessor::FinalizeForModelFile() {
}
void Preprocessor::DumpToken(const Token &Tok, bool DumpFlags) const {
- llvm::errs() << tok::getTokenName(Tok.getKind());
+ std::string TokenStr;
+ llvm::raw_string_ostream OS(TokenStr);
+
+ // The alignment of 16 is chosen to comfortably fit most identifiers.
+ OS << llvm::formatv("{0,-16} ", tok::getTokenName(Tok.getKind()));
+
+ // Annotation tokens are just markers that don't have a spelling -- they
----------------
alexpaniman wrote:
I didn't know, thanks for the feedback. I'll follow up with changes to include
module spelling in a second PR.
https://github.com/llvm/llvm-project/pull/164894
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits