summaryrefslogtreecommitdiffstats
path: root/clang/test/SemaCXX/ast-print.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Revert r359814 "[Sema] Emit warning for visibility attribute on ↵Nico Weber2019-05-031-0/+2
| | | | | | | | internal-linkage declaration" See cfe-commits thread for r359814. llvm-svn: 359858
* [Sema] Emit warning for visibility attribute on internal-linkage declarationScott Linder2019-05-021-2/+0
| | | | | | | | GCC warns on these cases, but we currently just silently ignore the attribute. Differential Revision: https://reviews.llvm.org/D61097 llvm-svn: 359814
* [AST] Fix printing tag decl groups in decl contextsJoel E. Denny2018-05-151-2/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For example, given: struct T1 { struct T2 *p0; }; -ast-print produced: struct T1 { struct T2; struct T2 *p0; }; Compiling that produces a warning that the first struct T2 declaration does not declare anything. Details: A tag decl group is one or more decls that share a type specifier that is a tag decl (that is, a struct/union/class/enum decl). Within functions, the parser builds such a tag decl group as part of a DeclStmt. However, in decl contexts, such as file scope or a member list, the parser does not group together the members of a tag decl group. Previously, detection of tag decl groups during printing was implemented but only if the tag decl was unnamed. Otherwise, as in the above example, the members of the group did not print together and so sometimes introduced warnings. This patch extends detection of tag decl groups in decl contexts to any tag decl that is recorded in the AST as not free-standing. Reviewed by: rsmith Differential Revision: https://reviews.llvm.org/D45465 llvm-svn: 332314
* Teach -ast-print to print constexpr variables.Vassil Vassilev2016-07-081-1/+3
| | | | | | Patch reviewed by Richard Smith (D22168). llvm-svn: 274930
* Don't crash when printing auto variables.Vassil Vassilev2016-07-081-0/+9
| | | | | | Patch by Axel Naumann! llvm-svn: 274859
* Update a few more tests in response to the MS ABI enum semanticsDavid Majnemer2015-10-081-2/+2
| | | | | | | Our self hosting buildbots found a few more tests which weren't updated to reflect that the enum semantics are part of the Microsoft ABI. llvm-svn: 249670
* [DeclPrinter] Don't crash when printing a using decl with a special nameBenjamin Kramer2015-09-231-0/+8
| | | | | | Fixes PR24872. llvm-svn: 248376
* Teach AST printing to not print whitespace inside {} and () for initialization,Richard Smith2015-01-301-2/+2
| | | | | | to match LLVM's preferred style. llvm-svn: 227545
* PR22367: Don't forget to create a CXXFunctionalCastExpr aroundRichard Smith2015-01-281-0/+6
| | | | | | | | | list-initialization that gets converted to some form other than an InitListExpr. CXXTemporaryObjectExpr is a special case here, because it represents a fused CXXFunctionalCastExpr + CXXConstructExpr. That, in itself, is probably a design error... llvm-svn: 227377
* Pretty print attributes associated with record declarations.Aaron Ballman2014-09-151-0/+5
| | | | llvm-svn: 217784
* Fix the AST printer for attributed statements so that it does not print ↵Aaron Ballman2014-05-131-0/+12
| | | | | | duplicate attribute introducers. Eg) [[clang::fallthrough]] instead of [[[[clang::fallthrough]]]] llvm-svn: 208706
* Reapply "Pretty Printer: Fix printing of conversion operator decls and calls."Benjamin Kramer2014-02-251-1/+24
| | | | | | There were many additional tests that had the bad behavior baked in. llvm-svn: 202174
* Revert "Pretty Printer: Fix printing of conversion operator decls and calls."Rafael Espindola2014-02-251-24/+1
| | | | | | | | This reverts commit r202167. It broke Analysis/auto-obj-dtors-cfg-output.cpp llvm-svn: 202173
* Pretty Printer: Fix printing of conversion operator decls and calls.Benjamin Kramer2014-02-251-1/+24
| | | | | | | | | | | | | - Don't emit anything when we encounter a call to a conversion operator. "bar(a & b)" instead of "bar(a & b.operator int())" This preserves the semantics and is still idempotent if we print the AST multiple times. - Properly print declarations of conversion operators. "explicit operator bool();" instead of "bool operator _Bool();" PR18776. llvm-svn: 202167
* Added testcase for r195255.Enea Zaffanella2013-11-211-0/+9
| | | | llvm-svn: 195366
* Fix pretty-printing for unnamed unions.Eli Friedman2013-08-121-0/+11
| | | | | | | This is just a couple of minor fixes to account for the existence of ElaboratedType. llvm-svn: 188209
* Fix printing CXXTemporaryObjectExpr with default args.Rafael Espindola2013-05-241-0/+5
| | | | | | Patch by Will Wilson. llvm-svn: 182651
* Fix spurious trailing comma when printing some of the __c11_atomic_* ↵Richard Smith2013-05-011-0/+11
| | | | | | builtins. Patch by Joe Sprowes! llvm-svn: 180867
* DeclPrinter: fix CXXConstructExpr printing with implicit default argumentDmitri Gribenko2013-02-031-0/+17
| | | | | | | | | | | | | | | | | | | | | | | This is an improvement of r173630, that handles the following case: struct VirualDestrClass { VirualDestrClass(int arg); virtual ~VirualDestrClass(); }; struct ConstrWithCleanupsClass { ConstrWithCleanupsClass(const VirualDestrClass& cplx = VirualDestrClass(42)); }; ConstrWithCleanupsClass cwcNoArg; That was printed as: ConstrWithCleanupsClass cwcNoArg(); llvm-svn: 174296
* Decl printer: fix CXXConstructExpr with implicit default argumentDmitri Gribenko2013-01-271-0/+21
| | | | | | Patch by Will Wilson. llvm-svn: 173630
* FileCheck'ize test/SemaCXX/qualified-names-print.cpp and merge it to otherDmitri Gribenko2013-01-241-0/+18
| | | | | | -ast-print tests llvm-svn: 173387
* Don't print scope qualifiers for references to a type defined locally in a ↵Eli Friedman2012-10-241-0/+17
| | | | | | function. Patch by Grzegorz Jablonski. llvm-svn: 166617
* Fix pretty-printing pseudo-destructor calls. Patch by Grzegorz Jablonski.Eli Friedman2012-10-231-0/+4
| | | | llvm-svn: 166500
* Pretty-print a ParenListExpr in a variable initializer correctly. Patch by ↵Eli Friedman2012-10-191-0/+8
| | | | | | Grzegorz Jablonski. llvm-svn: 166311
* Use the type as written when pretty-printing C-style casts. Patch by ↵Eli Friedman2012-10-181-6/+12
| | | | | | Grzegorz Jablonski. llvm-svn: 166237
* Remove check which incorrectly suppressed printing an identifier in type ↵Eli Friedman2012-10-181-0/+5
| | | | | | printing. Patch by Benoit Perrot. llvm-svn: 166227
* Fix AST pretty-printing for C++ new expressions with placement arguments ↵Eli Friedman2012-10-181-0/+11
| | | | | | | | with default values. Based on patch by Grzegorz Jablonski. llvm-svn: 166226
* Move test to a more appropriate place.Eli Friedman2012-10-161-0/+32
llvm-svn: 166078
OpenPOWER on IntegriCloud