From 3663027f9e99a3f34314b8daa6cee64b62b409b3 Mon Sep 17 00:00:00 2001
From: Vassil Vassilev <vasil.georgiev.vasilev@cern.ch>
Date: Thu, 25 Apr 2013 12:26:44 +0000
Subject: [PATCH] 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
---
 interpreter/cling/lib/Utils/AST.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/interpreter/cling/lib/Utils/AST.cpp b/interpreter/cling/lib/Utils/AST.cpp
index a67c6c899e4..1c7c635dbde 100644
--- a/interpreter/cling/lib/Utils/AST.cpp
+++ b/interpreter/cling/lib/Utils/AST.cpp
@@ -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(),
-- 
GitLab