Commit Graph

9 Commits

Author SHA1 Message Date
Richard Smith a4bb292095 When pretty-printing a declaration of a pack, put the ellipsis before the name
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
2014-07-23 03:17:06 +00:00
Enea Zaffanella b2d998f356 Moved pretty printer test for thread local storage in its own file
and specified the triple.

llvm-svn: 181115
2013-05-04 11:26:59 +00:00
Enea Zaffanella acb8ecd664 In VarDecl nodes, store the thread storage class specifier as written.
llvm-svn: 181113
2013-05-04 08:27:07 +00:00
Michael Han dbe8890be2 Fix empty declaration printing.
Don't print the semicolon when visiting an empty declaration because the semicolon
will be printed as a terminator later.

llvm-svn: 176035
2013-02-25 18:40:11 +00:00
Michael Han 84324357b8 [Sema] Semantic analysis for empty-declaration and attribute-declaration.
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
2013-02-22 17:15:32 +00:00
Richard Smith e6560761ce Teach -ast-print how to print trailing-return-types.
llvm-svn: 175864
2013-02-22 05:54:51 +00:00
Richard Smith 29e9595bd7 Fix statement printing for raw and template user-defined literals.
llvm-svn: 152401
2012-03-09 10:10:02 +00:00
Richard Smith 75025ba487 Ensure we don't print 123ULL_foo when printing a user-defined integer literal.
llvm-svn: 152303
2012-03-08 09:02:38 +00:00
Richard Smith c67fdd4eb9 AST representation for user-defined literals, plus just enough of semantic
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
2012-03-07 08:35:16 +00:00