[clang] [dataflow] Fix crash when InitListExpr is not a prvalue (PR #80970)

via cfe-commits cfe-commits at lists.llvm.org
Thu Feb 8 04:20:30 PST 2024


================
@@ -2313,6 +2313,20 @@ TEST(TransferTest, AssignmentOperatorWithInitAndInheritance) {
          ASTContext &ASTCtx) {});
 }
 
+TEST(TransferTest, InitListExprAsXValue) {
+  // This is a crash repro.
+  std::string Code = R"(
+    void target() {
+      auto&& test{false};
----------------
martinboehme wrote:

```suggestion
      bool&& test{false};
```

Same number of characters, but more explicit.

https://github.com/llvm/llvm-project/pull/80970


More information about the cfe-commits mailing list