llvm-project/clang/lib/Sema
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
..
CXXFieldCollector.h Update some comments. 2008-07-01 11:22:40 +00:00
IdentifierResolver.cpp Make IdentifierResolver::isDeclInScope regard declarations of a parent 'control' scope as part of the current scope. 2008-09-09 21:57:58 +00:00
IdentifierResolver.h Make IdentifierResolver::isDeclInScope regard declarations of a parent 'control' scope as part of the current scope. 2008-09-09 21:57:58 +00:00
Makefile rename libclangSEMA to libclangSema 2008-09-07 17:09:06 +00:00
ParseAST.cpp Re-enable deletion of AST nodes upon completion of ParseAST. 2008-08-20 03:27:00 +00:00
Sema.cpp Add support for format string checking of object-size checking 2008-10-02 18:44:07 +00:00
Sema.h Implement support for C++ direct initializers in declarations, e.g. "int x(1);". 2008-10-06 17:10:33 +00:00
SemaChecking.cpp Add support for format string checking of object-size checking 2008-10-02 18:44:07 +00:00
SemaDecl.cpp Make sema and codegen allow __builtin___CFStringMakeConstantString as a valid 2008-10-06 07:26:43 +00:00
SemaDeclAttr.cpp Implement support for the const and pure attributes. 2008-10-05 23:32:53 +00:00
SemaDeclCXX.cpp Implement support for C++ direct initializers in declarations, e.g. "int x(1);". 2008-10-06 17:10:33 +00:00
SemaDeclObjC.cpp Fix <rdar://problem/6191148> [sema] Objective-C method lookup (at global scope) fails to handle overloaded selectors properly. 2008-09-30 14:38:43 +00:00
SemaExpr.cpp simplify padding, just fold it into the earlier resize. 2008-09-30 20:53:45 +00:00
SemaExprCXX.cpp Give string literals const element typesin C++, and cope with the deprecated C++ conversion from a string literal to a pointer-to-non-const-character 2008-09-12 00:47:35 +00:00
SemaExprObjC.cpp Fix <rdar://problem/6191148> [sema] Objective-C method lookup (at global scope) fails to handle overloaded selectors properly. 2008-09-30 14:38:43 +00:00
SemaInit.cpp Support initialization of incomplete array with zero size (as 2008-08-18 20:28:46 +00:00
SemaStmt.cpp Fix <rdar://problem/6243788> clang: Incorrect return statement for Blocks? 2008-09-24 22:26:48 +00:00
SemaType.cpp First wave of changes to support "blocks" (an extension to C). 2008-08-27 16:04:49 +00:00
SemaUtil.h Make a major restructuring of the clang tree: introduce a top-level 2008-03-15 23:59:48 +00:00