r174303 - clang/Analysis: Fix r174245, a valgrind error in AnalysisDeclContext::getBody(bool &IsAutosynthesized), to initialize IsAutosynthesized explicitly.

NAKAMURA Takumi geek4civic at gmail.com
Sun Feb 3 21:06:22 PST 2013


Author: chapuni
Date: Sun Feb  3 23:06:21 2013
New Revision: 174303

URL: http://llvm.org/viewvc/llvm-project?rev=174303&view=rev
Log:
clang/Analysis: Fix r174245, a valgrind error in AnalysisDeclContext::getBody(bool &IsAutosynthesized), to initialize IsAutosynthesized explicitly.

Modified:
    cfe/trunk/lib/Analysis/AnalysisDeclContext.cpp

Modified: cfe/trunk/lib/Analysis/AnalysisDeclContext.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Analysis/AnalysisDeclContext.cpp?rev=174303&r1=174302&r2=174303&view=diff
==============================================================================
--- cfe/trunk/lib/Analysis/AnalysisDeclContext.cpp (original)
+++ cfe/trunk/lib/Analysis/AnalysisDeclContext.cpp Sun Feb  3 23:06:21 2013
@@ -87,6 +87,7 @@ static BodyFarm &getBodyFarm(ASTContext 
 }
 
 Stmt *AnalysisDeclContext::getBody(bool &IsAutosynthesized) const {
+  IsAutosynthesized = false;
   if (const FunctionDecl *FD = dyn_cast<FunctionDecl>(D)) {
     Stmt *Body = FD->getBody();
     if (!Body && Manager && Manager->synthesizeBodies()) {





More information about the cfe-commits mailing list