Implement parsing and semantic checking of the 'mutable' keyword.
Thanks to Doug for the review. Actual effects of mutable to follow.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59331 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Parse/DeclSpec.cpp b/lib/Parse/DeclSpec.cpp
index d61d6c5..e800761 100644
--- a/lib/Parse/DeclSpec.cpp
+++ b/lib/Parse/DeclSpec.cpp
@@ -44,6 +44,7 @@
case DeclSpec::SCS_static: return "static";
case DeclSpec::SCS_auto: return "auto";
case DeclSpec::SCS_register: return "register";
+ case DeclSpec::SCS_mutable: return "mutable";
}
}
@@ -126,6 +127,7 @@
return BadSpecifier( (SCS)StorageClassSpec, PrevSpec);
StorageClassSpec = S;
StorageClassSpecLoc = Loc;
+ assert((unsigned)S == StorageClassSpec && "SCS constants overflow bitfield");
return false;
}