File tree Expand file tree Collapse file tree 2 files changed +11
-0
lines changed Expand file tree Collapse file tree 2 files changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -12097,6 +12097,8 @@ void Sema::RefersToMemberWithReducedAlignment(
1209712097 if (ME->isArrow ())
1209812098 BaseType = BaseType->getPointeeType ();
1209912099 RecordDecl *RD = BaseType->getAs <RecordType>()->getDecl ();
12100+ if (RD->isInvalidDecl ())
12101+ return ;
1210012102
1210112103 ValueDecl *MD = ME->getMemberDecl ();
1210212104 auto *FD = dyn_cast<FieldDecl>(MD);
Original file line number Diff line number Diff line change @@ -329,3 +329,12 @@ void g13(void) {
329329 uint32_t * p32 ;
330330 p32 = & a [0 ].x ; // no-warning
331331}
332+
333+ struct Invalid0 {
334+ void * x ;
335+ struct fwd f ; // expected-error {{incomplete type}} expected-note {{forward declaration}}
336+ } __attribute__((packed ));
337+
338+ void * g14 (struct Invalid0 * ivl ) {
339+ return & (ivl -> x );
340+ }
You can’t perform that action at this time.
0 commit comments