diff options
author | Richard Smith <richard-llvm@metafoo.co.uk> | 2011-06-25 02:28:38 +0000 |
---|---|---|
committer | Richard Smith <richard-llvm@metafoo.co.uk> | 2011-06-25 02:28:38 +0000 |
commit | cfcdf3a65929ee1ce8842b5f1f6fc39c9375dd80 (patch) | |
tree | c573b62b7024f82c4e6571ccd9d04802cd35db28 /clang/lib/Sema/SemaDeclCXX.cpp | |
parent | b793de703e9ecc6d16f7b4e47bfa2f1fd2b94ea0 (diff) | |
download | bcm5719-llvm-cfcdf3a65929ee1ce8842b5f1f6fc39c9375dd80.tar.gz bcm5719-llvm-cfcdf3a65929ee1ce8842b5f1f6fc39c9375dd80.zip |
Fix a couple more issues related to r133854:
When performing semantic analysis on a member declaration, fix the check for whether we are declaring a function to check for parenthesized declarators, declaration via decltype, etc.
Also fix the semantic check to not treat FuncType* as a function type.
llvm-svn: 133862
Diffstat (limited to 'clang/lib/Sema/SemaDeclCXX.cpp')
-rw-r--r-- | clang/lib/Sema/SemaDeclCXX.cpp | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/clang/lib/Sema/SemaDeclCXX.cpp b/clang/lib/Sema/SemaDeclCXX.cpp index a7bd46a2ca7..07eb9fe572a 100644 --- a/clang/lib/Sema/SemaDeclCXX.cpp +++ b/clang/lib/Sema/SemaDeclCXX.cpp @@ -1079,14 +1079,7 @@ Sema::ActOnCXXMemberDeclarator(Scope *S, AccessSpecifier AS, Declarator &D, assert(!DS.isFriendSpecified()); assert(!Init || !HasDeferredInit); - bool isFunc = false; - if (D.isFunctionDeclarator()) - isFunc = true; - else if (D.getNumTypeObjects() == 0 && - D.getDeclSpec().getTypeSpecType() == DeclSpec::TST_typename) { - QualType TDType = GetTypeFromParser(DS.getRepAsType()); - isFunc = TDType->isFunctionType(); - } + bool isFunc = D.isDeclarationOfFunction(); // C++ 9.2p6: A member shall not be declared to have automatic storage // duration (auto, register) or with the extern storage-class-specifier. |