diff options
author | Anders Carlsson <andersca@mac.com> | 2011-01-22 17:51:53 +0000 |
---|---|---|
committer | Anders Carlsson <andersca@mac.com> | 2011-01-22 17:51:53 +0000 |
commit | fc1eef48980e7d34d1e46c644b96c04f56ea439f (patch) | |
tree | cb37a0065d8e744cba2216decef79473f15697f7 /clang/lib/Sema/SemaDecl.cpp | |
parent | 7ecb3a040bfdae9d51388b90417b8f9a0ee19558 (diff) | |
download | bcm5719-llvm-fc1eef48980e7d34d1e46c644b96c04f56ea439f.tar.gz bcm5719-llvm-fc1eef48980e7d34d1e46c644b96c04f56ea439f.zip |
Mark classes as final or explicit. Diagnose when a class marked 'final' is used as a base.
llvm-svn: 124039
Diffstat (limited to 'clang/lib/Sema/SemaDecl.cpp')
-rw-r--r-- | clang/lib/Sema/SemaDecl.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/clang/lib/Sema/SemaDecl.cpp b/clang/lib/Sema/SemaDecl.cpp index a266b60ac38..7c6d9d9142f 100644 --- a/clang/lib/Sema/SemaDecl.cpp +++ b/clang/lib/Sema/SemaDecl.cpp @@ -6423,6 +6423,7 @@ void Sema::ActOnTagStartDefinition(Scope *S, Decl *TagD) { } void Sema::ActOnStartCXXMemberDeclarations(Scope *S, Decl *TagD, + ClassVirtSpecifiers &CVS, SourceLocation LBraceLoc) { AdjustDeclIfTemplate(TagD); CXXRecordDecl *Record = cast<CXXRecordDecl>(TagD); @@ -6432,6 +6433,9 @@ void Sema::ActOnStartCXXMemberDeclarations(Scope *S, Decl *TagD, if (!Record->getIdentifier()) return; + Record->setIsMarkedFinal(CVS.isFinalSpecified()); + Record->setIsMarkedExplicit(CVS.isExplicitSpecified()); + // C++ [class]p2: // [...] The class-name is also inserted into the scope of the // class itself; this is known as the injected-class-name. For |