File tree 2 files changed +5
-8
lines changed
include/cling/Interpreter
2 files changed +5
-8
lines changed Original file line number Diff line number Diff line change @@ -56,7 +56,7 @@ namespace cling {
56
56
WithDiagnostics
57
57
};
58
58
private:
59
- std::unique_ptr< clang::Parser> m_Parser;
59
+ clang::Parser* m_Parser;
60
60
Interpreter* m_Interpreter; // we do not own.
61
61
std::array<const clang::Type*, kNumCachedStrings > m_StringTy = {{}};
62
62
// / A map containing the hash of the lookup buffer. This allows us to avoid
Original file line number Diff line number Diff line change @@ -265,13 +265,6 @@ namespace cling {
265
265
}
266
266
267
267
Sema& SemaRef = getSema ();
268
- Preprocessor& PP = SemaRef.getPreprocessor ();
269
-
270
- m_LookupHelper.reset (new LookupHelper (new Parser (PP, SemaRef,
271
- /* SkipFunctionBodies*/ false ,
272
- /* isTemp*/ true ), this ));
273
- if (!m_LookupHelper)
274
- return ;
275
268
276
269
if (!isInSyntaxOnlyMode () && !m_Opts.CompilerOpts .CUDADevice ) {
277
270
m_Executor.reset (new IncrementalExecutor (SemaRef.Diags , *getCI (),
@@ -317,6 +310,10 @@ namespace cling {
317
310
return ;
318
311
}
319
312
313
+ m_LookupHelper.reset (new LookupHelper (m_IncrParser->getParser (), this ));
314
+ if (!m_LookupHelper)
315
+ return ;
316
+
320
317
// When not using C++ modules, we now have a PCH and we can safely setup
321
318
// our callbacks without fearing that they get overwritten by clang code.
322
319
// The modules setup is handled above.
You can’t perform that action at this time.
0 commit comments