================ @@ -17,7 +17,7 @@ struct Base { int x; }; struct Derived : Base { int y; }; int o = __builtin_offsetof(Derived, x); // expected-warning{{offset of on non-POD type}} -const int o2 = sizeof(__builtin_offsetof(Derived, x)); +const int o2 = sizeof(__builtin_offsetof(Derived, x)); // expected-warning{{offset of on non-POD type 'Derived'}} ---------------- AaronBallman wrote:
This is an example of why I think the existing behavior is correct. The fact that we're asking for the offset of a field on a non-POD type is not harmful because the call is never evaluated. https://github.com/llvm/llvm-project/pull/65246 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits