summaryrefslogtreecommitdiffstats
path: root/clang/lib/Format/TokenAnnotator.cpp
diff options
context:
space:
mode:
authorBirunthan Mohanathas <birunthan@mohanathas.com>2015-07-13 16:19:34 +0000
committerBirunthan Mohanathas <birunthan@mohanathas.com>2015-07-13 16:19:34 +0000
commit67d81c8a77146ea479f64284022b018963269c58 (patch)
tree531a01b7df2a06acf260c741eb2db6c4f837bf56 /clang/lib/Format/TokenAnnotator.cpp
parentdb5a11f698cead8bd97b0942cadd29b001bcdf65 (diff)
downloadbcm5719-llvm-67d81c8a77146ea479f64284022b018963269c58.tar.gz
bcm5719-llvm-67d81c8a77146ea479f64284022b018963269c58.zip
clang-format: Print token type name instead of number in -debug output
Differential Revision: http://reviews.llvm.org/D11125 llvm-svn: 242039
Diffstat (limited to 'clang/lib/Format/TokenAnnotator.cpp')
-rw-r--r--clang/lib/Format/TokenAnnotator.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/clang/lib/Format/TokenAnnotator.cpp b/clang/lib/Format/TokenAnnotator.cpp
index 1e0c979d91d..ea8b30de8df 100644
--- a/clang/lib/Format/TokenAnnotator.cpp
+++ b/clang/lib/Format/TokenAnnotator.cpp
@@ -2274,7 +2274,8 @@ void TokenAnnotator::printDebugInfo(const AnnotatedLine &Line) {
const FormatToken *Tok = Line.First;
while (Tok) {
llvm::errs() << " M=" << Tok->MustBreakBefore
- << " C=" << Tok->CanBreakBefore << " T=" << Tok->Type
+ << " C=" << Tok->CanBreakBefore
+ << " T=" << getTokenTypeName(Tok->Type)
<< " S=" << Tok->SpacesRequiredBefore
<< " B=" << Tok->BlockParameterCount
<< " P=" << Tok->SplitPenalty << " Name=" << Tok->Tok.getName()
OpenPOWER on IntegriCloud