Author: Timm Bäder Date: 2024-02-05T13:36:03+01:00 New Revision: c391f285afdfd800a251b4ef6d0bbadbbe9069ff
URL: https://github.com/llvm/llvm-project/commit/c391f285afdfd800a251b4ef6d0bbadbbe9069ff DIFF: https://github.com/llvm/llvm-project/commit/c391f285afdfd800a251b4ef6d0bbadbbe9069ff.diff LOG: [clang][Interp][NFC] Add simple test case for atomic types Added: clang/test/AST/Interp/atomic.cpp Modified: Removed: ################################################################################ diff --git a/clang/test/AST/Interp/atomic.cpp b/clang/test/AST/Interp/atomic.cpp new file mode 100644 index 00000000000000..c0476c3ce13f98 --- /dev/null +++ b/clang/test/AST/Interp/atomic.cpp @@ -0,0 +1,17 @@ +// RUN: %clang_cc1 -fexperimental-new-constant-interpreter -verify=both,expected -std=c++11 %s +// RUN: %clang_cc1 -verify=both,ref -std=c++11 %s +// RUN: %clang_cc1 -fexperimental-new-constant-interpreter -verify=both,expected -std=c++98 %s +// RUN: %clang_cc1 -verify=both,ref -std=c++98 %s + + + +// expected-no-diagnostics +// ref-no-diagnostics + + +/// Rejected in c++98 +#if __cplusplus >= 201103L +constexpr _Atomic(bool) B = true; +static_assert(B, ""); +#endif + _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits