Skip to content

Commit 28a0107

Browse files
committed
Add volatile T test for std::atomic
1 parent 1077d03 commit 28a0107

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

libcxx/test/std/atomics/atomics.types.generic/cv_unqualified.verify.cpp

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,9 @@
1515
// is cv-qualified, however Clang will sometimes emit additional
1616
// errors while trying to instantiate the rest of std::atomic<T>.
1717
// We silence those to make the test more robust.
18-
// ADDITIONAL_COMPILE_FLAGS: -Xclang -verify-ignore-unexpected=error
18+
// ADDITIONAL_COMPILE_FLAGS: -Xclang -verify-ignore-unexpected=error -Wno-deprecated-volatile
1919

2020
#include <atomic>
2121

22-
void f() {
23-
std::atomic<const int> a; // expected-error@*:* {{std::atomic<T> requires that 'T' be a cv-unqualified type}}
24-
}
22+
std::atomic<const int> aci; // expected-error@*:* {{std::atomic<T> requires that 'T' be a cv-unqualified type}}
23+
std::atomic<volatile float> avf; // expected-error@*:* {{std::atomic<T> requires that 'T' be a cv-unqualified type}}

0 commit comments

Comments
 (0)