Fix a valgrind complaint "jump over uninit memory"

It is very weird, clang documentation says:
ASTContext::CreateTypeSourceInfo - Allocate an uninitialized TypeSourceInfo...
ASTContext::getTrivialTypeSourceInfo - Allocate a TypeSourceInfo where all locations...

We should use the getTrivialTypeSourceInfo all over the place...


git-svn-id: http://root.cern.ch/svn/root/trunk@49343 27541ba8-7e3a-0410-8455-c3a389f83636
This commit is contained in:
Vassil Vassilev 2013-04-25 12:26:44 +00:00
parent e66fc22305
commit cb6210bd0a

View File

@ -96,7 +96,7 @@ namespace utils {
ASTContext& Ctx = S->getASTContext();
if (!Ty->isPointerType())
Ty = Ctx.getPointerType(Ty);
TypeSourceInfo* TSI = Ctx.CreateTypeSourceInfo(Ty);
TypeSourceInfo* TSI = Ctx.getTrivialTypeSourceInfo(Ty, SourceLocation());
Expr* Result = Synthesize::IntegerLiteralExpr(Ctx, Ptr);
Result = S->BuildCStyleCastExpr(SourceLocation(), TSI, SourceLocation(),