[clang] b557cd3 - [clang][bytecode][NFC] Add a c++11 test case (#152104)
via cfe-commits
cfe-commits at lists.llvm.org
Tue Aug 5 02:28:08 PDT 2025
Author: Timm Baeder
Date: 2025-08-05T11:28:05+02:00
New Revision: b557cd3e8f82a66c4a64e1966389df8277c58c07
URL: https://github.com/llvm/llvm-project/commit/b557cd3e8f82a66c4a64e1966389df8277c58c07
DIFF: https://github.com/llvm/llvm-project/commit/b557cd3e8f82a66c4a64e1966389df8277c58c07.diff
LOG: [clang][bytecode][NFC] Add a c++11 test case (#152104)
This test case breaks when ignoring trivial CXXConstructExprs of array
types, so make sure we don't do that.
Added:
Modified:
clang/test/AST/ByteCode/cxx11.cpp
Removed:
################################################################################
diff --git a/clang/test/AST/ByteCode/cxx11.cpp b/clang/test/AST/ByteCode/cxx11.cpp
index f5a2abbbe7813..bb8aca27eb965 100644
--- a/clang/test/AST/ByteCode/cxx11.cpp
+++ b/clang/test/AST/ByteCode/cxx11.cpp
@@ -309,3 +309,12 @@ int somefunc() {
// both-note {{reference to 'non_global' is not a constant expression}}
}
+namespace PR19010 {
+ struct Empty {};
+ struct Empty2 : Empty {};
+ struct Test : Empty2 {
+ constexpr Test() {}
+ Empty2 array[2];
+ };
+ void test() { constexpr Test t; }
+}
More information about the cfe-commits
mailing list