Skip to content

Commit

Permalink
Reset the Parser to a "topmost" state when autoparsing (ROOT-8432).
Browse files Browse the repository at this point in the history
  • Loading branch information
Axel-Naumann committed Nov 7, 2016
1 parent 0f1f129 commit 4faac4b
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions core/meta/src/TCling.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand Down Expand Up @@ -5310,6 +5311,7 @@ static cling::Interpreter::CompilationResult ExecAutoParse(const char *what,
// is safe (semi colon usually means empty decl)
Token& Tok = const_cast<Token&>(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.
Expand Down

0 comments on commit 4faac4b

Please sign in to comment.