diff options
author | Richard Smith <richard-llvm@metafoo.co.uk> | 2016-02-02 23:34:49 +0000 |
---|---|---|
committer | Richard Smith <richard-llvm@metafoo.co.uk> | 2016-02-02 23:34:49 +0000 |
commit | 83c2ecf9faa7fe575661b243d12175d78d04376f (patch) | |
tree | 00597f6612cddd038a1e3f93c17b50799342d6a6 | |
parent | 60adac46f2932abec4683b869182e64f5500e6bb (diff) | |
download | bcm5719-llvm-83c2ecf9faa7fe575661b243d12175d78d04376f.tar.gz bcm5719-llvm-83c2ecf9faa7fe575661b243d12175d78d04376f.zip |
Fix rejects-valid when forming a pointer-to-member with 'decltype(expr)::*'.
llvm-svn: 259604
-rw-r--r-- | clang/lib/Parse/ParseDecl.cpp | 2 | ||||
-rw-r--r-- | clang/test/Parser/cxx0x-decl.cpp | 2 |
2 files changed, 3 insertions, 1 deletions
diff --git a/clang/lib/Parse/ParseDecl.cpp b/clang/lib/Parse/ParseDecl.cpp index 49b593155b1..3097d28af14 100644 --- a/clang/lib/Parse/ParseDecl.cpp +++ b/clang/lib/Parse/ParseDecl.cpp @@ -4931,7 +4931,7 @@ void Parser::ParseDeclaratorInternal(Declarator &D, // Member pointers get special handling, since there's no place for the // scope spec in the generic path below. if (getLangOpts().CPlusPlus && - (Tok.is(tok::coloncolon) || + (Tok.is(tok::coloncolon) || Tok.is(tok::kw_decltype) || (Tok.is(tok::identifier) && (NextToken().is(tok::coloncolon) || NextToken().is(tok::less))) || Tok.is(tok::annot_cxxscope))) { diff --git a/clang/test/Parser/cxx0x-decl.cpp b/clang/test/Parser/cxx0x-decl.cpp index 23f46a18478..c4f03566029 100644 --- a/clang/test/Parser/cxx0x-decl.cpp +++ b/clang/test/Parser/cxx0x-decl.cpp @@ -17,6 +17,8 @@ auto g() -> enum E { return E(); } +int decltype(f())::*ptr_mem_decltype; + class ExtraSemiAfterMemFn { // Due to a peculiarity in the C++11 grammar, a deleted or defaulted function // is permitted to be followed by either one or two semicolons. |