Skip to content

Commit

Permalink
[cling] Only set result type if result type is known for auto-injection
Browse files Browse the repository at this point in the history
  • Loading branch information
devajithvs committed Jan 26, 2024
1 parent ceb1d75 commit ae7055a
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions interpreter/llvm-project/clang/lib/Sema/SemaExpr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15190,8 +15190,10 @@ ExprResult Sema::CreateBuiltinBinOp(SourceLocation OpLoc,

return ExprError();
}
VD->setTypeSourceInfo(C.getTrivialTypeSourceInfo(ResTy));
VD->setType(ResTy);
if (ResTy) {
VD->setTypeSourceInfo(C.getTrivialTypeSourceInfo(ResTy));
VD->setType(ResTy);
}
VD->setInit(DefaultLvalueConversion(RHSExpr).get());
PushOnScopeChains(VD, getCurScope(), /*Add to ctx*/true);

Expand Down

0 comments on commit ae7055a

Please sign in to comment.