Index: lib/Parse/ParseDecl.cpp =================================================================== --- lib/Parse/ParseDecl.cpp +++ lib/Parse/ParseDecl.cpp @@ -5187,18 +5187,15 @@ // If this can't be an abstract-declarator, this *must* be a grouping // paren, because we haven't seen the identifier yet. isGrouping = true; - } else if (Tok.is(tok::r_paren) || // 'int()' is a function. - (getLangOpts().CPlusPlus && Tok.is(tok::ellipsis) && - NextToken().is(tok::r_paren)) || // C++ int(...) - isDeclarationSpecifier() || // 'int(int)' is a function. - isCXX11AttributeSpecifier()) { // 'int([[]]int)' is a function. + } else // This handles C99 6.7.5.3p11: in "typedef int X; void foo(X)", X is // considered to be a type, not a K&R identifier-list. - isGrouping = false; - } else { // Otherwise, this is a grouping paren, e.g. 'int (*X)' or 'int(X)'. - isGrouping = true; - } + isGrouping = !(Tok.is(tok::r_paren) || // 'int()' is a function. + (getLangOpts().CPlusPlus && Tok.is(tok::ellipsis) && + NextToken().is(tok::r_paren)) || // C++ int(...) + isDeclarationSpecifier() || // 'int(int)' is a function. + isCXX11AttributeSpecifier()); // If this is a grouping paren, handle: // direct-declarator: '(' declarator ')'