Commit Graph

32 Commits

Author SHA1 Message Date
Eric Fiselier 5cdc2cda28 [AST] Store "UsesADL" information in CallExpr.
Summary:
Currently the Clang AST doesn't store information about how the callee of a CallExpr was found. Specifically if it was found using ADL.

However, this information is invaluable to tooling. Consider a tool which renames usages of a function. If the originally CallExpr was formed using ADL, then the tooling may need to additionally qualify the replacement.
Without information about how the callee was found, the tooling is left scratching it's head. Additionally, we want to be able to match ADL calls as quickly as possible, which means avoiding computing the answer on the fly.

This patch changes `CallExpr` to store whether it's callee was found using ADL. It does not change the size of any AST nodes.


Reviewers: fowles, rsmith, klimek, shafik

Reviewed By: rsmith

Subscribers: aaron.ballman, riccibruno, calabrese, titus, cfe-commits

Differential Revision: https://reviews.llvm.org/D55534

llvm-svn: 348977
2018-12-12 21:50:55 +00:00
Aaron Ballman 059b85e7ff Adding tests for -ast-dump; NFC.
This adds tests for expressions in C++.

llvm-svn: 348860
2018-12-11 16:34:59 +00:00
Stephen Kelly 677e3aec9e Revert "Change InitListExpr dump to label and pointer"
This reverts commit r348794.

llvm-svn: 348799
2018-12-10 21:20:05 +00:00
Stephen Kelly 43835951f4 Re-order content of template parameter dumps
Reviewers: aaron.ballman

Subscribers: cfe-commits

Differential Revision: https://reviews.llvm.org/D55393

llvm-svn: 348797
2018-12-10 21:03:00 +00:00
Stephen Kelly 266dc19e4e Re-order content in OMPDeclareReductionDecl dump
Reviewers: aaron.ballman

Subscribers: cfe-commits

Differential Revision: https://reviews.llvm.org/D55395

llvm-svn: 348795
2018-12-10 20:53:39 +00:00
Stephen Kelly a1005921eb Change InitListExpr dump to label and pointer
Summary: Don't add a child just for the label.

Reviewers: aaron.ballman

Subscribers: cfe-commits

Differential Revision: https://reviews.llvm.org/D55495

llvm-svn: 348794
2018-12-10 20:53:32 +00:00
Aaron Ballman ce2837f880 Add an explicit triple to this test to fix failing test bots.
llvm-svn: 348790
2018-12-10 19:18:11 +00:00
Aaron Ballman 2ead087b6d Adding tests for -ast-dump; NFC.
This adds tests for expressions in C.

llvm-svn: 348786
2018-12-10 18:37:47 +00:00
Stephen Kelly 2ac0c371d0 Fix InitListExpr test
Wrong case of Check meant this has no effect.

llvm-svn: 348713
2018-12-09 13:13:41 +00:00
Aaron Ballman 535575dec9 Adding an AST dump test for statement expressions; NFC.
llvm-svn: 348613
2018-12-07 17:06:40 +00:00
Aaron Ballman 08e565c6f9 Add an explicit triple to this test to prevent failures due to size_t differences.
llvm-svn: 348599
2018-12-07 15:13:51 +00:00
Aaron Ballman 373ca178e1 Adding tests for -ast-dump; NFC.
This adds tests for various statements in C++ that are not covered by C.

llvm-svn: 348596
2018-12-07 14:57:07 +00:00
Aaron Ballman d52292fe1c Adding tests for -ast-dump; NFC.
This adds tests for various statements in C.

llvm-svn: 348588
2018-12-07 12:35:15 +00:00
Stephen Kelly 8609e12b37 Add test for InitListExpr
llvm-svn: 348553
2018-12-07 00:08:14 +00:00
Stephen Kelly a22e34fd15 Add more expected content to match in test
llvm-svn: 348543
2018-12-06 23:23:10 +00:00
Stephen Kelly f36d78d3cf Use relative line offsets in test
llvm-svn: 348541
2018-12-06 22:51:51 +00:00
Stephen Kelly fe8231ecca Add test for ObjC generics
llvm-svn: 348471
2018-12-06 09:23:59 +00:00
Stephen Kelly d6518a89e0 Extend OMP test
llvm-svn: 348470
2018-12-06 09:23:53 +00:00
Stephen Kelly 59c4ada8ab Make test resistant to line numbers changing
llvm-svn: 348469
2018-12-06 09:22:12 +00:00
Stephen Kelly 9f358871d5 Add dump tests for inherited default template parameters
llvm-svn: 348408
2018-12-05 20:21:13 +00:00
Aaron Ballman 83efe2f1f6 Adding tests for -ast-dump; NFC.
This adds tests for various function and class template declarations.

llvm-svn: 348399
2018-12-05 18:53:57 +00:00
Aaron Ballman baea55c920 Adding tests for -ast-dump; NFC.
This adds tests for the definition data of C++ record objects as well as special member functions.

llvm-svn: 348309
2018-12-04 21:50:08 +00:00
Aaron Ballman e445005c03 Add tests for dumping base classes; NFC.
llvm-svn: 348308
2018-12-04 21:49:24 +00:00
Stephen Kelly 0fa7bf099d Extend test for DependentSizedArrayType
Use a using declaration to force the type to appear in the -ast-dump
output.

llvm-svn: 348241
2018-12-04 09:53:36 +00:00
Aaron Ballman 64c8a2e312 Adding tests for -ast-dump; NFC.
This adds tests for struct and union declarations in C++.

llvm-svn: 348156
2018-12-03 18:00:31 +00:00
Ilya Biryukov 378499d184 [clang] Do not read from 'test/SemaCXX/Inputs' inside 'test/AST'
Our integrate relies on test inputs being taken from the same diretory as the
test itself.

llvm-svn: 348123
2018-12-03 11:26:35 +00:00
Stephen Kelly e8e4f09add Fix whitespace
llvm-svn: 348094
2018-12-02 16:42:34 +00:00
Stephen Kelly 765e1a4472 Add dump tests for ArrayInitLoopExpr and ArrayInitIndexExpr
llvm-svn: 348093
2018-12-02 16:36:23 +00:00
Aaron Ballman 3b6fb6e846 Adding tests for -ast-dump; NFC.
This adds tests for struct and union declarations in C. It also points out a bug when dumping anonymous record types -- they are sometimes reported as being contained by something of the wrong tag type. e.g., an anonymous struct inside of a union named X reports the anonymous struct as being inside of 'struct X' rather than 'union X'.

llvm-svn: 348033
2018-11-30 20:55:26 +00:00
Aaron Ballman 4b5b0c0025 Move AST tests into their own test directory; NFC.
This moves everything primarily testing the functionality of -ast-dump and -ast-print into their own directory, rather than leaving the tests spread around the testing directory.

llvm-svn: 348017
2018-11-30 18:43:02 +00:00
John Wiegley d25f8eb393 Removed test that depended on ast-test
llvm-svn: 130367
2011-04-28 01:09:13 +00:00
John Wiegley 1c0675e155 Parsing/AST support for Structured Exception Handling
Patch authored by Sohail Somani.

Provide parsing and AST support for Windows structured exception handling.

llvm-svn: 130366
2011-04-28 01:08:34 +00:00