summaryrefslogtreecommitdiffstats
path: root/clang/test/SemaCXX/sourceranges.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Move AST tests into their own test directory; NFC.Aaron Ballman2018-11-301-146/+0
| | | | | | 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
* [Sema] Fix PR38987: keep end location of a direct initializer listVedant Kumar2018-11-191-0/+7
| | | | | | | | | | | | | | If PerformConstructorInitialization of a direct initializer list constructor is called while instantiating a template, it has brace locations in its BraceLoc arguments but not in the Kind argument. This reverts the hunk https://reviews.llvm.org/D41921#inline-468844. Patch by Orivej Desh! Differential Revision: https://reviews.llvm.org/D53231 llvm-svn: 347261
* [Parse] Forward brace locations to TypeConstructExprVedant Kumar2018-01-171-1/+88
| | | | | | | | | | | | | | | | | | | | | | | | When parsing C++ type construction expressions with list initialization, forward the locations of the braces to Sema. Without these locations, the code coverage pass crashes on the given test case, because the pass relies on getLocEnd() returning a valid location. Here is what this patch does in more detail: - Forwards init-list brace locations to Sema (ParseExprCXX), - Builds an InitializationKind with these locations (SemaExprCXX), and - Uses these locations for constructor initialization (SemaInit). The remaining changes fall out of introducing a new overload for creating direct-list InitializationKinds. Testing: check-clang, and a stage2 coverage-enabled build of clang with asserts enabled. Differential Revision: https://reviews.llvm.org/D41921 llvm-svn: 322729
* Re-commit r321223, which adds a printing policy to the ASTDumper.Aaron Ballman2017-12-211-52/+52
| | | | | | | | This allows you to dump C++ code that spells bool instead of _Bool, leaves off the elaborated type specifiers when printing struct or class names, and other C-isms. Fixes the -Wreorder issue and fixes the ast-dump-color.cpp test. llvm-svn: 321310
* Reverting r321223 and its follow-up commit because of failing bots due to ↵Aaron Ballman2017-12-201-52/+52
| | | | | | Misc/ast-dump-color.cpp. llvm-svn: 321229
* Add a printing policy to the ASTDumper.Aaron Ballman2017-12-201-52/+52
| | | | | | This allows you to dump C++ code that spells bool instead of _Bool, leaves off the elaborated type specifiers when printing struct or class names, and other C-isms. llvm-svn: 321223
* clang/test/SemaCXX/sourceranges.cpp: Fix silly expressions. Sorry for the ↵NAKAMURA Takumi2015-09-041-3/+3
| | | | | | breakage. llvm-svn: 246850
* clang/test/SemaCXX/sourceranges.cpp: Appease win32. Class method is thiscall ↵NAKAMURA Takumi2015-09-041-2/+2
| | | | | | for targeting i686-(msvc|mingw32). llvm-svn: 246849
* Fix the perentheses location when the constructor is called on a class that ↵Olivier Goffart2015-09-041-1/+14
| | | | | | has a destructor llvm-svn: 246844
* Add the location of Decls to ast dump.David Blaikie2014-04-021-2/+2
| | | | | | | | | While investigating some debug info issues, Eric and I came across a particular template case where the location of a decl was quite different from the range of the same decl. It might've been rather helpful if the dumper had actually showed us this. llvm-svn: 205396
* Build an appropriate (albeit trivial) TypeSourceInfo for a destructor name, soRichard Smith2014-01-221-0/+9
| | | | | | | AST consumers can determine where the destructor name was written. Patch by Olivier Goffart! llvm-svn: 199779
* Fix a bug in VarDecl::getSourceRange() for static member arrays with an elementNico Weber2013-01-221-1/+4
| | | | | | | | type with an implicit initializer expression. Patch from Will Wilson <will@indefiant.com>! llvm-svn: 173170
* Use ElaboratedType also for C.Abramo Bagnara2011-03-161-3/+3
| | | | llvm-svn: 127755
* Remove one I just added, add a more focused test for why the current code is ↵Nico Weber2010-11-221-0/+5
| | | | | | correct. llvm-svn: 119969
* Fix the source range of CXXNewExprs. Fixes http://llvm.org/pr8661.Nico Weber2010-11-221-0/+22
llvm-svn: 119966
OpenPOWER on IntegriCloud