================
@@ -446,3 +446,15 @@ TEST(ASTExpr, CXXDefaultInitExprHasRewrittenInit) {
EXPECT_FALSE(CtorDIE->hasRewrittenInit());
EXPECT_EQ(CtorDIE->getExpr(), CtorDIE->getField()->getInClassInitializer());
}
+
+TEST(ASTExpr, TryEvaluateStringIncompletePointee) {
+ auto AST = buildASTFromCodeWithArgs(
+ "struct S; const struct S *p = (const struct S *)\"abc\";", {"-xc"});
----------------
MScarta wrote:
I've replaced it with a C test that gets here, `test_incomplete` in
`builtins-no-prototype.c`. Without the `isIncompleteType()` check the new
`getTypeSize()` call asserts on it.
https://github.com/llvm/llvm-project/pull/241354
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits