typedef int f();
struct S {
f *x; // incorrectly assuming this is function decl, leading to failed assertions.
};
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57598
91177308-0d34-0410-b5e6-
96231b3b80d8
}
bool isFunc = D.isFunctionDeclarator();
- if (!isFunc && D.getDeclSpec().getTypeSpecType() == DeclSpec::TST_typedef) {
+ if (!isFunc &&
+ D.getDeclSpec().getTypeSpecType() == DeclSpec::TST_typedef &&
+ D.getNumTypeObjects() == 0) {
// Check also for this case:
//
// typedef int f();
typedef int func();
func tm;
+ func *ptm;
func btm : 1; // expected-error {{error: bit-field 'btm' with non-integral type}}
NestedC bc : 1; // expected-error {{error: bit-field 'bc' with non-integral type}}