summaryrefslogtreecommitdiffstats
path: root/clang/lib/AST/JSONNodeDumper.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Add typedef declaration information to the JSON AST dump.Aaron Ballman2019-07-301-0/+2
| | | | | | When dumping a desugared QualType and the type is a type alias, also print out the id for the type alias declaration. llvm-svn: 367312
* Dump actual line numbers when dumping the AST to JSON.Aaron Ballman2019-07-121-10/+19
| | | | | | The "line" attribute is now the physical line within the source file for the location. A "presumedLine" attribute is printed when the presumed line number does not match the given source line number. We continue to not print repeated line information in subsequent source locations, but we track presumed and actual lines separately. llvm-svn: 365919
* Dump floating-point values as strings when dumping to JSON.Aaron Ballman2019-07-121-1/+3
| | | | | | This fixes a bug where we would have an invalid JSON attribute (e.g., "value": inf). It also increases the precision of the values because they're not represented as approximate doubles with the host architecture's floating-point model. llvm-svn: 365900
* Augment location information when dumping the AST to JSON.Aaron Ballman2019-06-241-33/+44
| | | | | | Rather than create JSON objects for source locations and ranges, we instead stream them out directly. This allows us to elide duplicate information (without JSON field reordering causing an issue) like file names and line numbers, similar to the text dump. This also adds token length information when dumping the source location. llvm-svn: 364226
* Ensure that top-level QualType objects also have a "kind" field when dumping ↵Aaron Ballman2019-06-211-0/+1
| | | | | | the AST to JSON. llvm-svn: 364078
* Print more type node information when dumping the AST to JSON.Aaron Ballman2019-06-211-0/+20
| | | | llvm-svn: 364067
* Print information about various type nodes when dumping the AST to JSON.Aaron Ballman2019-06-211-0/+119
| | | | llvm-svn: 364043
* Print information about various ObjC expression nodes when dumping the AST ↵Aaron Ballman2019-06-201-0/+90
| | | | | | to JSON. llvm-svn: 363988
* Print additional information about @encode expressions when dumping the AST ↵Aaron Ballman2019-06-201-0/+4
| | | | | | to JSON. llvm-svn: 363966
* Print additional information on dependent scopes when dumping the AST to JSON.Aaron Ballman2019-06-201-0/+17
| | | | llvm-svn: 363965
* Dump more information about expressions involving temporaries when dumping ↵Aaron Ballman2019-06-201-0/+45
| | | | | | the AST to JSON. llvm-svn: 363943
* Dump more information about construct expressions (resolved and unresolved) ↵Aaron Ballman2019-06-201-0/+32
| | | | | | when dumping the AST to JSON. llvm-svn: 363926
* Print whether a generic selection expression is result dependent when ↵Aaron Ballman2019-06-191-0/+5
| | | | | | dumping the AST to JSON. llvm-svn: 363873
* Print out the union field being initialized by an InitListExpr when dumping ↵Aaron Ballman2019-06-191-0/+5
| | | | | | the AST to JSON. llvm-svn: 363869
* Dump the value calculated by a constant expression when dumping the AST to JSON.Aaron Ballman2019-06-191-0/+9
| | | | llvm-svn: 363866
* Change the way we output templates for JSON AST dumping and dump information ↵Aaron Ballman2019-06-191-0/+67
| | | | | | | | about template arguments. Previously, we attempted to write out template parameters and specializations to their own array, but due to the architecture of the ASTNodeTraverser, this meant that other nodes were not being written out. This now follows the same behavior as the regular AST dumper and puts all the (correct) information into the "inner" array. When we correct the AST node traverser itself, we can revisit splitting this information into separate arrays again. llvm-svn: 363819
* For DR712: store on a MemberExpr whether it constitutes an odr-use.Richard Smith2019-06-111-0/+6
| | | | llvm-svn: 363087
* For DR712: store on a DeclRefExpr whether it constitutes an odr-use.Richard Smith2019-06-111-0/+6
| | | | | | | Begin restructuring to support the forms of non-odr-use reference permitted by DR712. llvm-svn: 363086
* Add Attribute NoThrow as an Exception Specifier TypeErich Keane2019-05-301-1/+3
| | | | | | | | | | | | | | | In response to https://bugs.llvm.org/show_bug.cgi?id=33235, it became clear that the current mechanism of hacking through checks for the exception specification of a function gets confused really quickly when there are alternate exception specifiers. This patch introcues EST_NoThrow, which is the equivilent of EST_noexcept when caused by EST_noThrow. The existing implementation is left in place to cover functions with no FunctionProtoType. Differential Revision: https://reviews.llvm.org/D62435 llvm-svn: 362119
* When dumping the AST to JSON, dump the type information from a typeid ↵Aaron Ballman2019-05-271-0/+10
| | | | | | expression with a type operand. llvm-svn: 361769
* When dumping the AST to JSON, dump whether a function is variadic or not.Aaron Ballman2019-05-271-0/+2
| | | | llvm-svn: 361768
* When dumping the AST to JSON, dump the declared name of a MemberExpr operand.Aaron Ballman2019-05-271-2/+3
| | | | llvm-svn: 361767
* When dumping the AST to JSON, dump the argument name to a sizeof pack ↵Aaron Ballman2019-05-271-0/+4
| | | | | | expression. llvm-svn: 361766
* Add JSON dumping tests for ObjC statements; add support for dumping @catch ↵Aaron Ballman2019-05-241-0/+7
| | | | | | catch-all statements. llvm-svn: 361660
* Add support for dumping Objective C AST declaration nodes to JSON.Aaron Ballman2019-05-241-4/+155
| | | | llvm-svn: 361652
* [c++20] P0780R2: Support pack-expansion of init-captures.Richard Smith2019-05-211-0/+1
| | | | | | | | | | | This permits an init-capture to introduce a new pack: template<typename ...T> auto x = [...a = T()] { /* a is a pack */ }; To support this, the mechanism for allowing ParmVarDecls to be packs has been extended to support arbitrary local VarDecls. llvm-svn: 361300
* Add support for dumping AST comment nodes to JSON.Aaron Ballman2019-05-211-1/+139
| | | | llvm-svn: 361265
* Add more tests for AST JSON output; NFC.Aaron Ballman2019-05-201-1/+3
| | | | | | 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
* Dump macro expansion information as needed when outputting the AST to JSON.Aaron Ballman2019-05-201-3/+25
| | | | llvm-svn: 361172
* Introduce the ability to dump the AST to JSON.Aaron Ballman2019-05-131-0/+781
This adds the -ast-dump=json cc1 flag (in addition to -ast-dump=default, which is the default if no dump format is specified), as well as some initial AST dumping functionality and tests. llvm-svn: 360622
OpenPOWER on IntegriCloud