From 4faac4bba9fb762da7d2fc1ab9beb291be2556be Mon Sep 17 00:00:00 2001 From: Axel Naumann Date: Mon, 7 Nov 2016 15:20:53 +0100 Subject: [PATCH] Reset the Parser to a "topmost" state when autoparsing (ROOT-8432). --- core/meta/src/TCling.cxx | 2 ++ 1 file changed, 2 insertions(+) diff --git a/core/meta/src/TCling.cxx b/core/meta/src/TCling.cxx index 619849654ee48..041ac9d1f6ee0 100644 --- a/core/meta/src/TCling.cxx +++ b/core/meta/src/TCling.cxx @@ -99,6 +99,7 @@ clang/LLVM technology. #include "cling/Interpreter/Transaction.h" #include "cling/MetaProcessor/MetaProcessor.h" #include "cling/Utils/AST.h" +#include "cling/Utils/ParserStateRAII.h" #include "cling/Utils/SourceNormalization.h" #include "cling/Interpreter/Exception.h" @@ -5310,6 +5311,7 @@ static cling::Interpreter::CompilationResult ExecAutoParse(const char *what, // is safe (semi colon usually means empty decl) Token& Tok = const_cast(P.getCurToken()); Tok.setKind(tok::semi); + cling::ParserStateRAII parserRAII(P); // We can't PushDeclContext, because we go up and the routine that pops // the DeclContext assumes that we drill down always.