diff options
author | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2008-10-05 19:56:22 +0000 |
---|---|---|
committer | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2008-10-05 19:56:22 +0000 |
commit | 78c8d80f19cb0bccd4f3d590e71a230e727cfab5 (patch) | |
tree | 33e90db48d74ecb686e1f5c93e4a970c9354e149 /lib/Parse/ParseDecl.cpp | |
parent | 9b533164570a67c81ad49f3691f02608530a042e (diff) |
Handle ambiguities between expressions and type-ids that occur inside parentheses, e.g.:
sizeof(int()) -> "int()" is type-id
sizeof(int()+1) -> "int()+1" is expression.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57131 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Parse/ParseDecl.cpp')
-rw-r--r-- | lib/Parse/ParseDecl.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Parse/ParseDecl.cpp b/lib/Parse/ParseDecl.cpp index eef071fd40..c22d9e871b 100644 --- a/lib/Parse/ParseDecl.cpp +++ b/lib/Parse/ParseDecl.cpp @@ -1581,7 +1581,7 @@ void Parser::ParseTypeofSpecifier(DeclSpec &DS) { SourceLocation LParenLoc = ConsumeParen(), RParenLoc; - if (isTypeSpecifierQualifier()) { + if (isTypeIdInParens()) { TypeTy *Ty = ParseTypeName(); assert(Ty && "Parser::ParseTypeofSpecifier(): missing type"); |