summaryrefslogtreecommitdiffstats
path: root/clang/test/SemaCXX/cxx11-ast-print.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Handle lambda captures of variable length arrays in profiling and printing.Richard Trieu2017-11-111-0/+4
| | | | | | | | From http://reviews.llvm.org/D4368 these cases were thought to not be reachable and the checks removed before the rest of the code was committed in r216649. However, these cases are reachable and the checks are added back. llvm-svn: 317957
* Fix PR 28885: Fix AST Printer output for the inherited constructor usingAlex Lorenz2016-10-031-0/+8
| | | | | | | | | | | | | declarations. This commit ensures that the correct record type is printed out for the using declarations that represent C++ inherited constructors. It fixes a regression introduced in r274049 which changed the name that's stored in the using declarations that correspond to inherited constructors. Differential Revision: https://reviews.llvm.org/D25131 llvm-svn: 283105
* Revert r283102 (Typo in the phabricator link)Alex Lorenz2016-10-031-8/+0
| | | | llvm-svn: 283104
* Fix PR 28885: Fix AST Printer output for the inherited constructor usingAlex Lorenz2016-10-031-0/+8
| | | | | | | | | | | | | declarations. This commit ensures that the correct record type is printed out for the using declarations that represent C++ inherited constructors. It fixes a regression introduced in r274049 which changed the name that's stored in the using declarations that correspond to inherited constructors. Differential Revision: https://reviews.llvm.org/D25131 llvm-svn: 283102
* When pretty-printing a C++11 literal operator, don't insert whitespace betweenRichard Smith2015-10-081-7/+7
| | | | | | | the "" and the suffix; that breaks names such as 'operator""if'. For symmetry, also remove the space between the 'operator' and the '""'. llvm-svn: 249641
* Switch test from wchar_t to char32_tDavid Majnemer2015-04-051-2/+2
| | | | | | | Windows has a 16-bit wchar_t, most Unix platforms have a 32-bit wchar_t. Use a char32_t to keep the test's output stable. llvm-svn: 234111
* [AST] String literal operator templates have two template args, not oneDavid Majnemer2015-04-051-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | StmtPrinter assumed that the first template arg was the pack and attempted to iterate it. However, the GNU extension (which is really just N3599), has two template arguments. In this case, the second argument is the pack containing the string contents. Handle this by desugaring the call to the explicit operator. For example: "qux" _zombocom will be shown as operator "" _zombocom<char, 'q', 'u', 'x'>() in diagnostics and AST dumps. N.B. It is actually impossible to render the arguments back to the source form without storing more information in the AST. For example, we cannot tell if the user wrote u8"qux" or "qux". We also lose fidelity when it comes to non-char types for this exact reason (e.g. it is hard to render a list of wchar_t back to something that can be printed to the screen even if you don't have to consider surrogate pairs). This fixes PR23120. llvm-svn: 234110
* When pretty-printing a declaration of a pack, put the ellipsis before the nameRichard Smith2014-07-231-1/+1
| | | | | | | | being declared, not at the end. When pretty-printing a non-type template parameter, put the name of the parameter in the middle of the type, not at the end. llvm-svn: 213718
* Moved pretty printer test for thread local storage in its own fileEnea Zaffanella2013-05-041-7/+0
| | | | | | and specified the triple. llvm-svn: 181115
* In VarDecl nodes, store the thread storage class specifier as written.Enea Zaffanella2013-05-041-0/+9
| | | | llvm-svn: 181113
* Fix empty declaration printing.Michael Han2013-02-251-0/+1
| | | | | | | Don't print the semicolon when visiting an empty declaration because the semicolon will be printed as a terminator later. llvm-svn: 176035
* [Sema] Semantic analysis for empty-declaration and attribute-declaration.Michael Han2013-02-221-0/+2
| | | | | | | | Introduce a new AST Decl node "EmptyDecl" to model empty-declaration. Have attributes from attribute-declaration appertain to the EmptyDecl node by creating the AST representations of these attributes and attach them to the EmptyDecl node so these attributes can be sema checked just as attributes attached to "normal" declarations. llvm-svn: 175900
* Teach -ast-print how to print trailing-return-types.Richard Smith2013-02-221-2/+1
| | | | llvm-svn: 175864
* Fix statement printing for raw and template user-defined literals.Richard Smith2012-03-091-0/+19
| | | | llvm-svn: 152401
* Ensure we don't print 123ULL_foo when printing a user-defined integer literal.Richard Smith2012-03-081-0/+10
| | | | llvm-svn: 152303
* AST representation for user-defined literals, plus just enough of semanticRichard Smith2012-03-071-0/+12
analysis to make the AST representation testable. They are represented by a new UserDefinedLiteral AST node, which is a sugared CallExpr. All semantic properties, including full CodeGen support, are achieved for free by this representation. UserDefinedLiterals can never be dependent, so no custom instantiation behavior is required. They are mangled as if they were direct calls to the underlying literal operator. This matches g++'s apparent behavior (but not its actual mangling, which is broken for literal-operator-ids). User-defined *string* literals are now fully-operational, but the semantic analysis is quite hacky and needs more work. No other forms of user-defined literal are created yet, but the AST support for them is present. This patch committed after midnight because we had already hit the quota for new kinds of literal yesterday. llvm-svn: 152211
OpenPOWER on IntegriCloud