Skip to content

Commit e0cdd17

Browse files
Add reproducer
1 parent 0861755 commit e0cdd17

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

clang/unittests/Interpreter/InterpreterTest.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -340,6 +340,11 @@ TEST(InterpreterTest, Value) {
340340
EXPECT_EQ(V1.getKind(), Value::K_Int);
341341
EXPECT_FALSE(V1.isManuallyAlloc());
342342

343+
Value V1b;
344+
llvm::cantFail(Interp->ParseAndExecute("char x = 42;"));
345+
llvm::cantFail(Interp->ParseAndExecute("c", &V1b));
346+
EXPECT_TRUE(V1b.getKind() == Value::K_Char_S);
347+
343348
Value V2;
344349
llvm::cantFail(Interp->ParseAndExecute("double y = 3.14;"));
345350
llvm::cantFail(Interp->ParseAndExecute("y", &V2));

0 commit comments

Comments
 (0)