diff options
author | Sean Hunt <scshunt@csclub.uwaterloo.ca> | 2011-01-08 19:20:43 +0000 |
---|---|---|
committer | Sean Hunt <scshunt@csclub.uwaterloo.ca> | 2011-01-08 19:20:43 +0000 |
commit | 97fcc4977b21da43ab106607ad472149b7d4785a (patch) | |
tree | 29bbec5477953cc0c591a9ce9167007ad3868881 /include/clang | |
parent | eeef924c4fcb79a3bcc8782afce343e641bbcb83 (diff) |
Check for delegating constructors and (currently) return an error about them.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123076 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/clang')
-rw-r--r-- | include/clang/Basic/DiagnosticSemaKinds.td | 6 | ||||
-rw-r--r-- | include/clang/Sema/Sema.h | 7 |
2 files changed, 13 insertions, 0 deletions
diff --git a/include/clang/Basic/DiagnosticSemaKinds.td b/include/clang/Basic/DiagnosticSemaKinds.td index 56ee876724..5b5bf84b7b 100644 --- a/include/clang/Basic/DiagnosticSemaKinds.td +++ b/include/clang/Basic/DiagnosticSemaKinds.td @@ -893,6 +893,12 @@ def err_enum_redeclare_fixed_mismatch : Error< "enumeration previously declared with %select{non|}0fixed underlying type">; def err_enum_redeclare_scoped_mismatch : Error< "enumeration previously declared as %select{un|}0scoped">; + +// C++0x delegating constructors +def err_delegation_0x_only : Error< + "Delegating constructors are permitted only in C++0x.">; +def err_delegation_unimplemented : Error< + "Delegating constructors are not fully implemented.">; // Objective-C++ def err_objc_decls_may_only_appear_in_global_scope : Error< diff --git a/include/clang/Sema/Sema.h b/include/clang/Sema/Sema.h index bcb7666f43..b860e2bd5e 100644 --- a/include/clang/Sema/Sema.h +++ b/include/clang/Sema/Sema.h @@ -2566,6 +2566,13 @@ public: CXXRecordDecl *ClassDecl, SourceLocation EllipsisLoc); + MemInitResult BuildDelegatingInitializer(TypeSourceInfo *TInfo, + Expr **Args, unsigned NumArgs, + SourceLocation RParenLoc, + SourceLocation LParenLoc, + CXXRecordDecl *ClassDecl, + SourceLocation EllipsisLoc); + bool SetBaseOrMemberInitializers(CXXConstructorDecl *Constructor, CXXBaseOrMemberInitializer **Initializers, unsigned NumInitializers, bool AnyErrors); |