summaryrefslogtreecommitdiffstats
path: root/clang/unittests/AST/SourceLocationTest.cpp
Commit message (Collapse)AuthorAgeFilesLines
* [Sema] Store a SourceRange for multi-token builtin typesMalcolm Parsons2016-10-211-0/+90
| | | | | | | | | | | | | | | | | | | Summary: clang-tidy's modernize-use-auto check uses the SourceRange of a TypeLoc when replacing the type with auto. This was producing the wrong result for multi-token builtin types like long long: -long long *ll = new long long(); +auto long *ll = new long long(); Reviewers: alexfh, hokein, rsmith, Prazek, aaron.ballman Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D25363 llvm-svn: 284885
* Properly track the end location of an exception specification.Aaron Ballman2016-01-121-0/+38
| | | | | | Patch by Adrian Zgorzałek llvm-svn: 257521
* Rename AST node matchers to match the AST node names directly. Part of this ↵Aaron Ballman2015-09-171-13/+13
| | | | | | rename also splits recordDecl() (which used to match CXXRecordDecl) into recordDecl() (that matches RecordDecl) and cxxRecordDecl (that matches CXXRecordDecl). Also adds isStruct(), isUnion(), and isClass() narrowing matchers for RecordDecl objects. llvm-svn: 247885
* Fix a few line endings. NFC.Yunzhong Gao2015-05-011-36/+36
| | | | llvm-svn: 236301
* Use 'override/final' instead of 'virtual' for overridden methodsAlexander Kornienko2015-04-111-5/+5
| | | | | | | | | | | | | | | | | | | | Summary: The patch is generated using clang-tidy misc-use-override check. This command was used: tools/clang/tools/extra/clang-tidy/tool/run-clang-tidy.py \ -checks='-*,misc-use-override' -header-filter='llvm|clang' -j=32 -fix Reviewers: dblaikie Reviewed By: dblaikie Subscribers: klimek, cfe-commits Differential Revision: http://reviews.llvm.org/D8926 llvm-svn: 234678
* Track the source location of the dot or arrow operator in a MemberExpr.Aaron Ballman2015-03-241-6/+38
| | | | | | Patch by Joe Ranieri! llvm-svn: 233085
* Record correct source range for defaulted/deleted members.Eli Bendersky2015-03-231-0/+12
| | | | | | | | | | | | | | | | | | | Fixes https://llvm.org/bugs/show_bug.cgi?id=20744 struct A { A() = default; }; Previously the source range of the declaration of A ended at the ')'. It should include the '= default' part as well. The same for '= delete'. Note: this will break one of the clang-tidy fixers, which is going to be addessed in a follow-up patch. Differential Revision: http://reviews.llvm.org/D8465 llvm-svn: 233028
* Obective-C. Patch to fix the incorrect ObjcMessageExpr argument source ranges, Fariborz Jahanian2014-07-311-0/+12
| | | | | | | when arguments are structures or classes. PR16392. patch by Karlis Senko llvm-svn: 214409
* Fix FriendDecl source location and range for class templates and function ↵Nikola Smiljanic2014-07-171-4/+136
| | | | | | declarations that don't start with 'friend' keyword. Add more unittests. llvm-svn: 213220
* Add first set of tests for FriendDecl source range and location.Nikola Smiljanic2014-06-061-0/+78
| | | | llvm-svn: 210306
* Correctly set brace range for CXXConstructExprs formed by list initialization.Peter Collingbourne2014-02-221-0/+10
| | | | | | Differential Revision: http://llvm-reviews.chandlerc.com/D2711 llvm-svn: 201926
* Sort all the #include lines with LLVM's utils/sort_includes.py whichChandler Carruth2014-01-071-1/+1
| | | | | | | encodes the canonical rules for LLVM's style. I noticed this had drifted quite a bit when cleaning up LLVM, so wanted to clean up Clang as well. llvm-svn: 198686
* Fix missing source location in CXXTemporaryObjectExpr nodes.Enea Zaffanella2013-09-071-0/+9
| | | | | | | | For clarity, renamed (get/set)ParenRange as (get/set)ParenOrBraceRange in CXXConstructExpr nodes. Added testcase. llvm-svn: 190239
* Fix source range of implicitly instantiated friend declaration.Enea Zaffanella2013-07-191-0/+13
| | | | llvm-svn: 186702
* Fixed source range of C++03 access declarations.Enea Zaffanella2013-07-171-0/+20
| | | | llvm-svn: 186522
* Fixed testcase failing under MS by adding "-fno-delayed-template-parsing",Enea Zaffanella2013-07-081-6/+3
| | | | | | | as suggested by Takumi. To this end, added a MatchVerifier::match() overload accepting a vector of invocation arguments. llvm-svn: 185827
* AST/SourceLocationTest.cpp: Appease MS hosts to suppress ↵NAKAMURA Takumi2013-07-081-0/+5
| | | | | | | CXXUnresolvedConstructExpr.SourceRange, for now. FIXME: It could pass if MS-compatible mode were disabled with Args.push_back("-fno-delayed-template-parsing"). llvm-svn: 185795
* Fixed source range for functional cast and unresolved construct expr nodes.Enea Zaffanella2013-07-071-0/+21
| | | | | | Added testcases. llvm-svn: 185773
* Fixed source location info for UnaryTransformTypeLoc nodes.Enea Zaffanella2013-07-061-0/+21
| | | | llvm-svn: 185765
* Fix source range of CXXNewExpr with parentheses around the type. PR15569.Eli Friedman2013-06-171-0/+6
| | | | llvm-svn: 184139
* Re-commit r183466 with a fix to make the TypeLoc casting machinery workEli Friedman2013-06-071-1/+1
| | | | | | | | | correctly in the presence of qualified types. (I had to change the unittest because it was trying to cast a QualifiedTypeLoc to TemplateSpecializationTypeLoc.) llvm-svn: 183563
* Adds a test that verifies angle bracket locations.Manuel Klimek2013-06-071-0/+19
| | | | | | | Regression test to make sure TemplateSpecializationTypeLocs have the correct locations for angle brackets. llvm-svn: 183514
* Add an error to check that all program scope variables are in the constant ↵Tanya Lattner2013-04-051-4/+4
| | | | | | address space in OpenCL. llvm-svn: 178906
* PR15095: Use more correct source locations for the InitListExpr we fake up forRichard Smith2013-02-051-0/+33
| | | | | | vector initialization. Patch by John Stratton! llvm-svn: 174339
* Move commonly useful code for AST testing into MatchVerfier.h.Manuel Klimek2013-01-311-165/+2
| | | | llvm-svn: 174057
* Sort the #include lines for unittests/...Chandler Carruth2012-12-041-1/+1
| | | | | | I've tried to place sensible headers at the top as main-module headers. llvm-svn: 169243
* Fix a source range regression in C++ new expressions with call initializers.David Blaikie2012-11-081-0/+6
| | | | | | Introduced in r167507, discovered in review by Abramo Bagnara. llvm-svn: 167597
* Fixed converted ConstantArrayTypeLoc range. Added a missing testcase for ↵Abramo Bagnara2012-11-081-1/+18
| | | | | | ConstructorDecl source range. llvm-svn: 167583
* Fixed range of implicit MemberExpr.Abramo Bagnara2012-11-081-0/+8
| | | | llvm-svn: 167581
* Test for source location range of new expressions fixed in r167507.David Blaikie2012-11-071-0/+6
| | | | | | Patch by Philip Craig. llvm-svn: 167538
* Add unit tests for source locations of AST nodes.Manuel Klimek2012-11-061-0/+252
Patch by Philip Craig. llvm-svn: 167470
OpenPOWER on IntegriCloud