[libcxx-commits] [libcxx] [libcxx] Improve handling of DummyData blocks in libcxx tests (PR #88897)
Louis Dionne via libcxx-commits
libcxx-commits at lists.llvm.org
Mon Apr 22 06:40:39 PDT 2024
================
@@ -27,16 +27,28 @@
#include "test_macros.h"
#include "../types.h"
+class Data {
+public:
+ Data() = default;
+ ~Data() = default;
+
+ char* getDummyData() { return this->dummy_data_; }
+
+ std::size_t getDummyDataSize() { return sizeof(this->dummy_data_); }
+
+private:
+ alignas(OverAligned) char dummy_data_[alignof(OverAligned) * 3];
----------------
ldionne wrote:
I don't understand why indirecting through a class solves anything here. After all you're still returning the address of a global variable.
https://github.com/llvm/llvm-project/pull/88897
More information about the libcxx-commits
mailing list