Debian Codegraph @

build/clang-plugin/tests/TestNonMemMovableStdAtomic.cpp

raw
1 // expected-no-diagnostics
2
3 #define MOZ_NEEDS_MEMMOVABLE_TYPE __attribute__((annotate("moz_needs_memmovable_type")))
4
5 template<class T>
6 class MOZ_NEEDS_MEMMOVABLE_TYPE Mover { T mForceInst; };
7
8 #include <atomic>
9 #include <cstdint>
10 struct CustomType{};
11 static struct {
12 Mover<std::atomic<CustomType>> m1;
13 Mover<std::atomic<bool>> m2;
14 Mover<std::atomic<char>> m3;
15 Mover<std::atomic<signed char>> m4;
16 Mover<std::atomic<unsigned char>> m5;
17 Mover<std::atomic<char16_t>> m6;
18 Mover<std::atomic<char32_t>> m7;
19 Mover<std::atomic<wchar_t>> m8;
20 Mover<std::atomic<short>> m9;
21 Mover<std::atomic<unsigned short>> m10;
22 Mover<std::atomic<int>> m11;
23 Mover<std::atomic<unsigned int>> m12;
24 Mover<std::atomic<long>> m13;
25 Mover<std::atomic<unsigned long>> m14;
26 Mover<std::atomic<long long>> m15;
27 Mover<std::atomic<unsigned long long>> m16;
28 Mover<std::atomic<void*>> m17;
29 Mover<std::atomic<CustomType*>> m18;
30 } good;