[cfe-commits] r128280 - in /cfe/trunk/lib: Parse/ParseDeclCXX.cpp Sema/SemaDeclCXX.cpp
Anders Carlsson
andersca at mac.com
Fri Mar 25 07:55:14 PDT 2011
Author: andersca
Date: Fri Mar 25 09:55:14 2011
New Revision: 128280
URL: http://llvm.org/viewvc/llvm-project?rev=128280&view=rev
Log:
Fixup comments.
Modified:
cfe/trunk/lib/Parse/ParseDeclCXX.cpp
cfe/trunk/lib/Sema/SemaDeclCXX.cpp
Modified: cfe/trunk/lib/Parse/ParseDeclCXX.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Parse/ParseDeclCXX.cpp?rev=128280&r1=128279&r2=128280&view=diff
==============================================================================
--- cfe/trunk/lib/Parse/ParseDeclCXX.cpp (original)
+++ cfe/trunk/lib/Parse/ParseDeclCXX.cpp Fri Mar 25 09:55:14 2011
@@ -810,7 +810,7 @@
// There are four options here. If we have 'struct foo;', then this
// is either a forward declaration or a friend declaration, which
// have to be treated differently. If we have 'struct foo {...',
- // 'struct foo :...' or 'struct foo <class-virt-specifier>' then this is a
+ // 'struct foo :...' or 'struct foo final[opt]' then this is a
// definition. Otherwise we have something like 'struct foo xyz', a reference.
// However, in some contexts, things look like declarations but are just
// references, e.g.
Modified: cfe/trunk/lib/Sema/SemaDeclCXX.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaDeclCXX.cpp?rev=128280&r1=128279&r2=128280&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/SemaDeclCXX.cpp (original)
+++ cfe/trunk/lib/Sema/SemaDeclCXX.cpp Fri Mar 25 09:55:14 2011
@@ -563,10 +563,9 @@
CXXRecordDecl * CXXBaseDecl = cast<CXXRecordDecl>(BaseDecl);
assert(CXXBaseDecl && "Base type is not a C++ type");
- // C++ [class.derived]p2:
- // If a class is marked with the class-virt-specifier final and it appears
- // as a base-type-specifier in a base-clause (10 class.derived), the program
- // is ill-formed.
+ // C++ [class]p3:
+ // If a class is marked final and it appears as a base-type-specifier in
+ // base-clause, the program is ill-formed.
if (CXXBaseDecl->hasAttr<FinalAttr>()) {
Diag(BaseLoc, diag::err_class_marked_final_used_as_base)
<< CXXBaseDecl->getDeclName();
More information about the cfe-commits
mailing list