================ @@ -136,6 +136,24 @@ TEST(InterpreterTest, DeclsAndStatements) { EXPECT_TRUE(!!R2); } +TEST(InterpreterTest, PTUStack) { + clang::IncrementalCompilerBuilder CB; + auto CI = cantFail(CB.CreateCpp()); + + llvm::Error Err = llvm::Error::success(); + auto Interp = std::make_unique<Interpreter>(std::move(CI), Err); + cantFail(std::move(Err)); + + auto NumBuiltinPTUs = Interp->getEffectivePTUSize(); + cantFail(Interp->Parse("void firstRuntimePTU() {}")); + EXPECT_EQ(NumBuiltinPTUs + 1, Interp->getEffectivePTUSize()); ---------------- weliveindetail wrote:
Yes, that's right. In fact, we could just not expose it right now and instead keep this a NFC. Then we don't need a new test either. https://github.com/llvm/llvm-project/pull/84176 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits