Add more tests for AST JSON output; NFC.
This adds tests for dumping expressions in C. It also updates a comment to note an issue to be fixed with printing character literals discovered as part of this testing.
llvm-svn: 361193
diff --git a/clang/lib/AST/JSONNodeDumper.cpp b/clang/lib/AST/JSONNodeDumper.cpp
index 37040ea..676cc4a 100644
--- a/clang/lib/AST/JSONNodeDumper.cpp
+++ b/clang/lib/AST/JSONNodeDumper.cpp
@@ -755,7 +755,9 @@
}
void JSONNodeDumper::VisitCharacterLiteral(const CharacterLiteral *CL) {
// FIXME: This should probably print the character literal as a string,
- // rather than as a numerical value.
+ // rather than as a numerical value. It would be nice if the behavior matched
+ // what we do to print a string literal; right now, it is impossible to tell
+ // the difference between 'a' and L'a' in C from the JSON output.
JOS.attribute("value", CL->getValue());
}
void JSONNodeDumper::VisitFixedPointLiteral(const FixedPointLiteral *FPL) {