================ @@ -0,0 +1,34 @@ +// RUN: %clang_cc1 -fsyntax-only -triple x86_64-linux-gnu -verify %s ---------------- AaronBallman wrote:
We should also show it's strange behavior with VLAs in C++: ``` int n = 12; __datasizeof(int[n++]); // Surprise, n is incremented, you're welcome ``` and with templates: ``` template <typename Ty> constexpr int data_size_of() { return __datasizeof(Ty); } static_assert(data_size_of<int>() == sizeof(int)); // etc ``` and I suppose with not-yet-complete types: ``` struct S { int i = __datasizeof(S); float f; char c; }; // Test that i is the full class size, not the size at the point of parsing ``` https://github.com/llvm/llvm-project/pull/67805 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits