Richard Smith
d0e102fece
Teach AST printing to not print whitespace inside {} and () for initialization,
...
to match LLVM's preferred style.
llvm-svn: 227545
2015-01-30 02:04:26 +00:00
Richard Smith
1ae689c2b8
PR22367: Don't forget to create a CXXFunctionalCastExpr around
...
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
2015-01-28 22:06:01 +00:00
Aaron Ballman
5388538e87
Pretty print attributes associated with record declarations.
...
llvm-svn: 217784
2014-09-15 16:45:30 +00:00
Aaron Ballman
8063c3b80c
Fix the AST printer for attributed statements so that it does not print duplicate attribute introducers. Eg) [[clang::fallthrough]] instead of [[[[clang::fallthrough]]]]
...
llvm-svn: 208706
2014-05-13 16:12:14 +00:00
Benjamin Kramer
00e8a1915a
Reapply "Pretty Printer: Fix printing of conversion operator decls and calls."
...
There were many additional tests that had the bad behavior baked in.
llvm-svn: 202174
2014-02-25 18:03:55 +00:00
Rafael Espindola
8e38871865
Revert "Pretty Printer: Fix printing of conversion operator decls and calls."
...
This reverts commit r202167.
It broke Analysis/auto-obj-dtors-cfg-output.cpp
llvm-svn: 202173
2014-02-25 17:39:16 +00:00
Benjamin Kramer
48f52e926d
Pretty Printer: Fix printing of conversion operator decls and calls.
...
- 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
2014-02-25 17:26:26 +00:00
Enea Zaffanella
dd3e75449f
Added testcase for r195255.
...
llvm-svn: 195366
2013-11-21 16:43:28 +00:00
Eli Friedman
24b3fed69f
Fix pretty-printing for unnamed unions.
...
This is just a couple of minor fixes to account for the existence
of ElaboratedType.
llvm-svn: 188209
2013-08-12 21:54:04 +00:00
Rafael Espindola
6f6f3c4e38
Fix printing CXXTemporaryObjectExpr with default args.
...
Patch by Will Wilson.
llvm-svn: 182651
2013-05-24 16:11:44 +00:00
Richard Smith
df6bee8081
Fix spurious trailing comma when printing some of the __c11_atomic_* builtins. Patch by Joe Sprowes!
...
llvm-svn: 180867
2013-05-01 19:02:43 +00:00
Dmitri Gribenko
b614fab39d
DeclPrinter: fix CXXConstructExpr printing with implicit default argument
...
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
2013-02-03 23:02:47 +00:00
Dmitri Gribenko
6835e37cec
Decl printer: fix CXXConstructExpr with implicit default argument
...
Patch by Will Wilson.
llvm-svn: 173630
2013-01-27 21:28:24 +00:00
Dmitri Gribenko
4a44beb5fd
FileCheck'ize test/SemaCXX/qualified-names-print.cpp and merge it to other
...
-ast-print tests
llvm-svn: 173387
2013-01-24 23:21:11 +00:00
Eli Friedman
6fd26424af
Don't print scope qualifiers for references to a type defined locally in a function. Patch by Grzegorz Jablonski.
...
llvm-svn: 166617
2012-10-24 20:21:25 +00:00
Eli Friedman
9cc8ac523c
Fix pretty-printing pseudo-destructor calls. Patch by Grzegorz Jablonski.
...
llvm-svn: 166500
2012-10-23 20:26:57 +00:00
Eli Friedman
92125c474a
Pretty-print a ParenListExpr in a variable initializer correctly. Patch by Grzegorz Jablonski.
...
llvm-svn: 166311
2012-10-19 20:36:44 +00:00
Eli Friedman
dc29a28fd5
Use the type as written when pretty-printing C-style casts. Patch by Grzegorz Jablonski.
...
llvm-svn: 166237
2012-10-18 21:53:46 +00:00
Eli Friedman
4a11540c27
Remove check which incorrectly suppressed printing an identifier in type printing. Patch by Benoit Perrot.
...
llvm-svn: 166227
2012-10-18 20:58:58 +00:00
Eli Friedman
a6fdfaa595
Fix AST pretty-printing for C++ new expressions with placement arguments with default values.
...
Based on patch by Grzegorz Jablonski.
llvm-svn: 166226
2012-10-18 20:54:37 +00:00
Eli Friedman
667f95395f
Move test to a more appropriate place.
...
llvm-svn: 166078
2012-10-16 23:55:06 +00:00