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
This commit is contained in:
Aaron Ballman 2019-05-20 20:01:45 +00:00
parent 4ed18e5ef5
commit 4aee1b5b0b
2 changed files with 5430 additions and 1 deletions

View File

@ -755,7 +755,9 @@ void JSONNodeDumper::VisitIntegerLiteral(const IntegerLiteral *IL) {
}
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) {

File diff suppressed because it is too large Load Diff