diff options
author | Fariborz Jahanian <fjahanian@apple.com> | 2011-12-09 01:15:54 +0000 |
---|---|---|
committer | Fariborz Jahanian <fjahanian@apple.com> | 2011-12-09 01:15:54 +0000 |
commit | 5a477dbf7589f516effe56fa2ed7d4680b5c1094 (patch) | |
tree | 4b2122028b4a9cac95e8a371989c4241806faf8e /lib/Parse/ParseDecl.cpp | |
parent | c6994005dc9f677c831b8e90bdab483cc2197c29 (diff) |
deprecated enum should not warn when used initializing another deprecated enumerator.
// rdar://10535640
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@146218 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Parse/ParseDecl.cpp')
-rw-r--r-- | lib/Parse/ParseDecl.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/Parse/ParseDecl.cpp b/lib/Parse/ParseDecl.cpp index 0c5a4879ae..61048f54e4 100644 --- a/lib/Parse/ParseDecl.cpp +++ b/lib/Parse/ParseDecl.cpp @@ -3099,6 +3099,8 @@ void Parser::ParseEnumBody(SourceLocation StartLoc, Decl *EnumDecl) { SourceLocation EqualLoc; ExprResult AssignedVal; + ParsingDeclRAIIObject PD(*this); + if (Tok.is(tok::equal)) { EqualLoc = ConsumeToken(); AssignedVal = ParseConstantExpression(); @@ -3112,6 +3114,8 @@ void Parser::ParseEnumBody(SourceLocation StartLoc, Decl *EnumDecl) { IdentLoc, Ident, attrs.getList(), EqualLoc, AssignedVal.release()); + PD.complete(EnumConstDecl); + EnumConstantDecls.push_back(EnumConstDecl); LastEnumConstDecl = EnumConstDecl; |