summaryrefslogtreecommitdiffstats
path: root/clang/lib/Parse/ParseDeclCXX.cpp
diff options
context:
space:
mode:
authorRichard Smith <richard-llvm@metafoo.co.uk>2012-01-10 01:33:14 +0000
committerRichard Smith <richard-llvm@metafoo.co.uk>2012-01-10 01:33:14 +0000
commit0f8ee22655a824663a51cc1e3f1725a11043b5be (patch)
tree08edfa4b6007a314df4a278f9035688626b1f91f /clang/lib/Parse/ParseDeclCXX.cpp
parent38ef9a9b940f6672876cc9209512d513e4a46a34 (diff)
downloadbcm5719-llvm-0f8ee22655a824663a51cc1e3f1725a11043b5be.tar.gz
bcm5719-llvm-0f8ee22655a824663a51cc1e3f1725a11043b5be.zip
Update C++11 scoped enumeration support to match the final proposal:
- reject definitions of enums within friend declarations - require 'enum', not 'enum class', for non-declaring references to scoped enumerations llvm-svn: 147824
Diffstat (limited to 'clang/lib/Parse/ParseDeclCXX.cpp')
-rw-r--r--clang/lib/Parse/ParseDeclCXX.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/clang/lib/Parse/ParseDeclCXX.cpp b/clang/lib/Parse/ParseDeclCXX.cpp
index 05a346353bf..285dbbbe079 100644
--- a/clang/lib/Parse/ParseDeclCXX.cpp
+++ b/clang/lib/Parse/ParseDeclCXX.cpp
@@ -1115,7 +1115,7 @@ void Parser::ParseClassSpecifier(tok::TokenKind TagTokKind,
if (DS.isFriendSpecified()) {
// C++ [class.friend]p2:
// A class shall not be defined in a friend declaration.
- Diag(Tok.getLocation(), diag::err_friend_decl_defines_class)
+ Diag(Tok.getLocation(), diag::err_friend_decl_defines_type)
<< SourceRange(DS.getFriendSpecLoc());
// Skip everything up to the semicolon, so that this looks like a proper
@@ -1277,8 +1277,9 @@ void Parser::ParseClassSpecifier(tok::TokenKind TagTokKind,
TagOrTempResult = Actions.ActOnTag(getCurScope(), TagType, TUK, StartLoc,
SS, Name, NameLoc, attrs.getList(), AS,
DS.getModulePrivateSpecLoc(),
- TParams, Owned, IsDependent, false,
- false, clang::TypeResult());
+ TParams, Owned, IsDependent,
+ SourceLocation(), false,
+ clang::TypeResult());
// If ActOnTag said the type was dependent, try again with the
// less common call.
OpenPOWER on IntegriCloud