aboutsummaryrefslogtreecommitdiff
path: root/lib/Sema/SemaDecl.cpp
diff options
context:
space:
mode:
authorSebastian Redl <sebastian.redl@getdesigned.at>2008-11-17 23:24:37 +0000
committerSebastian Redl <sebastian.redl@getdesigned.at>2008-11-17 23:24:37 +0000
commita11f42f4bca694b9be91350d0a74815f119e3fbf (patch)
tree35493691751a1135ae661fa761a2b2c8501aea2d /lib/Sema/SemaDecl.cpp
parent10bd36882406cdf4805e35add1ce2f11ab9ae152 (diff)
Implement effects of 'mutable', and a few comments from Chris on its parsing.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59470 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaDecl.cpp')
-rw-r--r--lib/Sema/SemaDecl.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/Sema/SemaDecl.cpp b/lib/Sema/SemaDecl.cpp
index 9c0a40e74a..fdc4aff031 100644
--- a/lib/Sema/SemaDecl.cpp
+++ b/lib/Sema/SemaDecl.cpp
@@ -1149,6 +1149,7 @@ Sema::ActOnDeclarator(Scope *S, Declarator &D, DeclTy *lastDecl) {
// an error here
Diag(D.getIdentifierLoc(), diag::err_mutable_nonmember);
InvalidDecl = true;
+ break;
}
IdentifierInfo *II = Name.getAsIdentifierInfo();
@@ -2603,7 +2604,9 @@ Sema::DeclTy *Sema::ActOnField(Scope *S,
if (getLangOptions().CPlusPlus) {
// FIXME: Replace CXXFieldDecls with FieldDecls for simple structs.
NewFD = CXXFieldDecl::Create(Context, cast<CXXRecordDecl>(CurContext),
- Loc, II, T, BitWidth);
+ Loc, II, T,
+ D.getDeclSpec().getStorageClassSpec() ==
+ DeclSpec::SCS_mutable, BitWidth);
if (II)
PushOnScopeChains(NewFD, S);
}