shafik added inline comments.

================
Comment at: clang/lib/AST/Interp/ByteCodeExprGen.cpp:761
     if (std::optional<unsigned> LocalIndex =
             allocateLocalPrimitive(SubExpr, *SubExprT, true, true)) {
       if (!this->visitInitializer(SubExpr))
----------------



================
Comment at: clang/lib/AST/Interp/ByteCodeExprGen.cpp:788
+      assert(!classify(E->getType()));
+      // FIXME: Can we even get here with primitive types?
+      return this->visitInitializer(Init);
----------------
Maybe I am misreading the code but wouldn't `int x = (int){10};` do? godbolt: 
https://godbolt.org/z/5WYE5h8dW


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D140668/new/

https://reviews.llvm.org/D140668

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to