forked from OSchip/llvm-project
mutable is a storage class that can follow a class/struct/union definition. Fixes PR7153
llvm-svn: 103954
This commit is contained in:
parent
16f94c6e8f
commit
c9a99c5e5c
|
@ -981,6 +981,7 @@ void Parser::ParseClassSpecifier(tok::TokenKind TagTokKind,
|
|||
case tok::kw_typedef: // struct foo {...} typedef x;
|
||||
case tok::kw_register: // struct foo {...} register x;
|
||||
case tok::kw_auto: // struct foo {...} auto x;
|
||||
case tok::kw_mutable: // struct foo {...} mutable x;
|
||||
// As shown above, type qualifiers and storage class specifiers absolutely
|
||||
// can occur after class specifiers according to the grammar. However,
|
||||
// almost noone actually writes code like this. If we see one of these,
|
||||
|
|
|
@ -136,3 +136,9 @@ namespace pr6629 {
|
|||
};
|
||||
};
|
||||
}
|
||||
|
||||
namespace PR7153 {
|
||||
class EnclosingClass {
|
||||
struct A { } mutable *member;
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue