Get the result type directly from the wrapper function's return type.
Do that *after* the tranformers have done their work; they change the result type. Silence a "return 12" inside a (not yet transformed) void wrapper(). The return type will later be repaired by the ReturnSynthesizer if needed. git-svn-id: http://root.cern.ch/svn/root/trunk@47165 27541ba8-7e3a-0410-8455-c3a389f83636
This commit is contained in:
parent
db8b70b203
commit
d1112e3ce5
@ -557,14 +557,9 @@ namespace cling {
|
||||
Transaction* CurT = m_IncrParser->Parse(Wrapper, CO);
|
||||
assert(CurT->size() && "No decls created by Parse!");
|
||||
|
||||
if (Expr* E = utils::Analyze::GetOrCreateLastExpr(CurT->getWrapperFD(),
|
||||
/*foundAt*/0,
|
||||
/*omitDS*/false,
|
||||
&getSema())) {
|
||||
resTy = E->getType();
|
||||
}
|
||||
m_IncrParser->commitCurrentTransaction(); // might change resTy
|
||||
|
||||
m_IncrParser->commitCurrentTransaction();
|
||||
resTy = CurT->getWrapperFD()->getResultType();
|
||||
}
|
||||
else
|
||||
m_IncrParser->Compile(Wrapper, CO);
|
||||
@ -698,7 +693,8 @@ namespace cling {
|
||||
clang::diag::MAP_IGNORE, SourceLocation());
|
||||
Diag.setDiagnosticMapping(clang::diag::warn_unused_comparison,
|
||||
clang::diag::MAP_IGNORE, SourceLocation());
|
||||
|
||||
Diag.setDiagnosticMapping(clang::diag::ext_return_has_expr,
|
||||
clang::diag::MAP_IGNORE, SourceLocation());
|
||||
}
|
||||
|
||||
bool Interpreter::addSymbol(const char* symbolName, void* symbolAddress) {
|
||||
|
Loading…
Reference in New Issue
Block a user