http://llvm.org/bugs/show_bug.cgi?id=11926
Markus Trippelsdorf <[email protected]> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |REOPENED Resolution|WORKSFORME | --- Comment #17 from Markus Trippelsdorf <[email protected]> 2012-04-28 05:36:09 CDT --- According to http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53147 const CFGStmt *cstmt = block->front().getAs<CFGStmt>(); block->front() returns a temp variable which ends its life after the statement ends. The following patch fixes this me: diff --git a/clang/lib/Analysis/UninitializedValues.cpp b/clang/lib/Analysis/UninitializedValues.cpp index 6e5da25..ae3030a 100644 --- a/clang/lib/Analysis/UninitializedValues.cpp +++ b/clang/lib/Analysis/UninitializedValues.cpp @@ -168,7 +168,8 @@ static const BinaryOperator *getLogicalOperatorInChain(const CFGBlock *block) { if (block->empty()) return 0; - const CFGStmt *cstmt = block->front().getAs<CFGStmt>(); + CFGElement bf = block->front(); + const CFGStmt *cstmt = bf.getAs<CFGStmt>(); if (!cstmt) return 0; -- Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug. _______________________________________________ LLVMbugs mailing list [email protected] http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs
