llvm-project/clang/lib
Argyrios Kyrtzidis 9a1191c047 Implement support for C++ direct initializers in declarations, e.g. "int x(1);".
This is how this kind of initializers appear in the AST:
-The Init expression of the VarDecl is a functional type construction (of the VarDecl's type).
-The new VarDecl::hasCXXDirectInitializer() returns true.

e.g, for "int x(1);":
-VarDecl 'x' has Init with expression "int(1)" (CXXFunctionalCastExpr).
-hasCXXDirectInitializer() of VarDecl 'x' returns true.

A major benefit is that clients that don't particularly care about which exactly form was the initializer can handle both cases without special case code.
Note that codegening works now for "int x(1);" without any changes to CodeGen.

llvm-svn: 57178
2008-10-06 17:10:33 +00:00
..
AST ExprConstant should not abort when it sees a pointer constant that isn't. 2008-10-06 07:20:11 +00:00
Analysis Fix typos. 2008-10-06 03:03:33 +00:00
Basic Add the 'y' assembler constraint. 2008-10-06 00:41:45 +00:00
CodeGen Make sema and codegen allow __builtin___CFStringMakeConstantString as a valid 2008-10-06 07:26:43 +00:00
Driver Bug fix, CPATH="" does not add '.' to search path. 2008-10-04 20:58:18 +00:00
Headers Actually use the mmintrin.h header, it's good enough now. 2008-10-06 04:49:00 +00:00
Lex __CONSTANT_CFSTRINGS__ should be defined even in C mode, otherwise the CFSTR 2008-10-06 07:43:09 +00:00
Parse Implement support for C++ direct initializers in declarations, e.g. "int x(1);". 2008-10-06 17:10:33 +00:00
Rewrite add a new Rewriter::getRewritenText method that returns the text for a range 2008-10-03 23:31:16 +00:00
Sema Implement support for C++ direct initializers in declarations, e.g. "int x(1);". 2008-10-06 17:10:33 +00:00
Makefile add a libDriver, for now only move the text diangostics stuff from Driver to there 2008-08-05 23:33:20 +00:00