summaryrefslogtreecommitdiffstats
path: root/clang/lib/Parse/ParseDecl.cpp
diff options
context:
space:
mode:
authorArgyrios Kyrtzidis <akyrtzi@gmail.com>2008-10-05 19:56:22 +0000
committerArgyrios Kyrtzidis <akyrtzi@gmail.com>2008-10-05 19:56:22 +0000
commit2b1ef227f53fe3250d5d61e0d2161a622b31692b (patch)
tree84d514dd954df29854439c7e049fb2f871bc926f /clang/lib/Parse/ParseDecl.cpp
parent4ecd75348663657778a9e53067b5ba850b7187be (diff)
downloadbcm5719-llvm-2b1ef227f53fe3250d5d61e0d2161a622b31692b.tar.gz
bcm5719-llvm-2b1ef227f53fe3250d5d61e0d2161a622b31692b.zip
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. llvm-svn: 57131
Diffstat (limited to 'clang/lib/Parse/ParseDecl.cpp')
-rw-r--r--clang/lib/Parse/ParseDecl.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/Parse/ParseDecl.cpp b/clang/lib/Parse/ParseDecl.cpp
index eef071fd407..c22d9e871b0 100644
--- a/clang/lib/Parse/ParseDecl.cpp
+++ b/clang/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");
OpenPOWER on IntegriCloud