llvm-project/clang/lib/Sema
Anders Carlsson 75fdaa465f Improve handling of base initializers. We now parse initializers in out of line decls, such as:
class C {
    C() { }
    
    int a;
};

C::C() : a(10) { }

We also diagnose when initializers are used on declarations that aren't constructors:

t.cpp:1:10: error: only constructors take base initializers
void f() : a(10) { }
         ^

Doug and/or Sebastian: I'd appreciate a review, especially the nested-name-spec test results (from the looks of it we now match gcc in that test.)

llvm-svn: 67672
2009-03-25 02:58:17 +00:00
..
CMakeLists.txt Move template instantiation for expressions into a separate file 2009-03-25 00:27:28 +00:00
CXXFieldCollector.h Unifies the name-lookup mechanisms used in various parts of the AST 2008-12-11 16:49:14 +00:00
IdentifierResolver.cpp Switch attributes to be allocated from the declcontext bump pointer just like 2009-03-04 06:34:08 +00:00
IdentifierResolver.h Rework the way we find locally-scoped external declarations when we 2009-03-02 00:19:53 +00:00
Makefile Build system changes to use TableGen to generate the various 2009-03-16 23:06:59 +00:00
ParseAST.cpp Patch by Alexei Svitkine: Refactor Sema::ParseAST API to allow clients to pass as an argument a TranslationUnit object whose contents live beyond the call to ParseAST. 2009-01-28 04:29:29 +00:00
Sema.cpp Eliminate post-diagnostic hooks. Instead, implement a Sema-specific 2009-03-20 22:48:49 +00:00
Sema.h Improve handling of base initializers. We now parse initializers in out of line decls, such as: 2009-03-25 02:58:17 +00:00
SemaAttr.cpp Deallocate 'DeclRefExpr's in correctly formed '#pragma unused' 2009-03-23 22:50:47 +00:00
SemaCXXScopeSpec.cpp Introduce a new expression type, UnresolvedDeclRefExpr, that describes 2009-03-19 17:26:29 +00:00
SemaChecking.cpp Fix <rdar://problem/6704086> by allowing the format string checking in Sema to 2009-03-20 21:35:28 +00:00
SemaDecl.cpp Make sure to use RequireCompleteType rather than testing for 2009-03-24 19:52:54 +00:00
SemaDeclAttr.cpp Be sure to not add weak import, if we are ignoring it. 2009-03-18 17:39:31 +00:00
SemaDeclCXX.cpp Improve handling of base initializers. We now parse initializers in out of line decls, such as: 2009-03-25 02:58:17 +00:00
SemaDeclObjC.cpp Issue error if variables are defined inside an objc class, 2009-03-21 18:06:45 +00:00
SemaExpr.cpp Fix a few isObjectTypes that really need to be isIncompleteOrObject 2009-03-24 20:13:58 +00:00
SemaExprCXX.cpp Fix a few isObjectTypes that really need to be isIncompleteOrObject 2009-03-24 20:13:58 +00:00
SemaExprObjC.cpp Simplify SelectorTable::constructSetterName() usage... 2009-03-10 17:24:38 +00:00
SemaInherit.cpp Eliminate CXXRecordType 2009-02-28 01:32:25 +00:00
SemaInherit.h Eliminate CXXRecordType 2009-02-28 01:32:25 +00:00
SemaInit.cpp Fix a thinko in the pre-allocation strategy for structured initializer 2009-03-21 18:13:52 +00:00
SemaLookup.cpp Introduce a representation for types that we referred to via a 2009-03-19 00:18:19 +00:00
SemaNamedCast.cpp Fix a few isObjectTypes that really need to be isIncompleteOrObject 2009-03-24 20:13:58 +00:00
SemaOverload.cpp Type::isObjectType now implements the (more sensible) C++ definition 2009-03-24 20:32:41 +00:00
SemaOverload.h Introduce _Complex conversions into the function overloading 2009-02-12 00:15:05 +00:00
SemaStmt.cpp introduce a new -fheinous-gnu-extensions flag that enables really 2009-03-13 17:38:01 +00:00
SemaTemplate.cpp In Parser::ParseClassSpecifier, don't conflate a NULL declaration with 2009-03-25 00:13:59 +00:00
SemaTemplateInstantiate.cpp Move template instantiation for expressions into a separate file 2009-03-25 00:27:28 +00:00
SemaTemplateInstantiateDecl.cpp Template instantiation for conversion functions 2009-03-25 00:34:44 +00:00
SemaTemplateInstantiateExpr.cpp Move template instantiation for expressions into a separate file 2009-03-25 00:27:28 +00:00
SemaType.cpp Type::isObjectType now implements the (more sensible) C++ definition 2009-03-24 20:32:41 +00:00