[clang] [clang][bytecode][NFC] Add a c++11 test test (PR #152104)
via cfe-commits
cfe-commits at lists.llvm.org
Tue Aug 5 01:48:57 PDT 2025
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-clang
Author: Timm Baeder (tbaederr)
<details>
<summary>Changes</summary>
This test case breaks when ignoring trivial CXXConstructExprs of array types, so make sure we don't do that.
---
Full diff: https://github.com/llvm/llvm-project/pull/152104.diff
1 Files Affected:
- (modified) clang/test/AST/ByteCode/cxx11.cpp (+9)
``````````diff
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; }
+}
``````````
</details>
https://github.com/llvm/llvm-project/pull/152104
More information about the cfe-commits
mailing list