diff options
author | Douglas Gregor <dgregor@apple.com> | 2011-04-27 05:41:15 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2011-04-27 05:41:15 +0000 |
commit | d9d75e57dfa22366c0379c92beac1db82db34e9a (patch) | |
tree | 534e71d8fd4a668648d97c35209349d8f0fa414f /lib/Parse/ParseDecl.cpp | |
parent | 6b4f567109d76ce1f1de289554e35f2a7bbeff6b (diff) |
Simplify the parser's handling of Sema::ClassifyName() for types, by
creating a type-annotation token rather than jumping into the
declaration parsing.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130293 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Parse/ParseDecl.cpp')
-rw-r--r-- | lib/Parse/ParseDecl.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/lib/Parse/ParseDecl.cpp b/lib/Parse/ParseDecl.cpp index c09a93a84f..a021b84d15 100644 --- a/lib/Parse/ParseDecl.cpp +++ b/lib/Parse/ParseDecl.cpp @@ -2954,9 +2954,6 @@ bool Parser::isDeclarationSpecifier(bool DisambiguatingWithExpression) { case tok::kw_virtual: case tok::kw_explicit: - // typedef-name - case tok::annot_typename: - // static_assert-declaration case tok::kw__Static_assert: @@ -2971,6 +2968,11 @@ bool Parser::isDeclarationSpecifier(bool DisambiguatingWithExpression) { case tok::less: return getLang().ObjC1; + // typedef-name + case tok::annot_typename: + return !DisambiguatingWithExpression || + !isStartOfObjCClassMessageMissingOpenBracket(); + case tok::kw___declspec: case tok::kw___cdecl: case tok::kw___stdcall: |