mirror of
https://github.com/intel/llvm.git
synced 2026-01-20 10:58:11 +08:00
Summary: If the bitwith expr contains errors, we mark the field decl invalid. This patch also tweaks the behavior of ObjCInterfaceDecl to be consistent with existing RecordDecl -- getObjCLayout method is only called with valid decls. Reviewers: sammccall Subscribers: cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D76953
14 lines
371 B
Plaintext
14 lines
371 B
Plaintext
// RUN: %clang_cc1 -fobjc-runtime=gcc -frecovery-ast -verify %s
|
|
// RUN: %clang_cc1 -fobjc-runtime=gcc -fno-recovery-ast -verify %s
|
|
|
|
@interface Ivar
|
|
{
|
|
int Foo : foo(); // expected-error {{use of undeclared identifier}}
|
|
};
|
|
@end
|
|
|
|
struct X { int Y: foo(); }; // expected-error {{use of undeclared identifier}}
|
|
|
|
constexpr int s = sizeof(Ivar);
|
|
constexpr int ss = sizeof(X);
|