================
@@ -596,6 +596,20 @@ TEST_F(InterpreterTest, TranslationUnit_CanonicalDecl) {
sema.getASTContext().getTranslationUnitDecl()->getCanonicalDecl());
}
+TEST_F(InterpreterTest, UnusableTopLevelDecl) {
+ std::vector<const char *> Args;
+ std::unique_ptr<Interpreter> Interp = createInterpreter(Args);
+
+ Value V;
+
+ llvm::cantFail(Interp->ParseAndExecute("return;", &V));
----------------
vgvassilev wrote:
Is this reachable via lit-level test?
https://github.com/llvm/llvm-project/pull/230054
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits