[cfe-commits] r139437 - in /cfe/trunk: include/clang/AST/Stmt.h lib/AST/Stmt.cpp lib/Analysis/CFG.cpp test/SemaCXX/return-noreturn.cpp
Ted Kremenek
kremenek at apple.com
Fri Sep 9 21:43:12 PDT 2011
On Sep 9, 2011, at 5:02 PM, Chandler Carruth wrote:
> Modified: cfe/trunk/lib/Analysis/CFG.cpp
> URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Analysis/CFG.cpp?rev=139437&r1=139436&r2=139437&view=diff
> ==============================================================================
> --- cfe/trunk/lib/Analysis/CFG.cpp (original)
> +++ cfe/trunk/lib/Analysis/CFG.cpp Fri Sep 9 19:02:34 2011
> @@ -723,9 +723,7 @@
> if (CompoundStmt *CS = dyn_cast<CompoundStmt>(S)) {
> for (CompoundStmt::body_iterator BI = CS->body_begin(), BE = CS->body_end()
> ; BI != BE; ++BI) {
> - Stmt *SI = *BI;
> - if (LabelStmt *LS = dyn_cast<LabelStmt>(SI))
> - SI = LS->getSubStmt();
> + Stmt *SI = (*BI)->stripLabelLikeStatements();
> if (DeclStmt *DS = dyn_cast<DeclStmt>(SI))
> Scope = addLocalScopeForDeclStmt(DS, Scope);
> }
> @@ -734,9 +73
Chandler,
I don't think this is right. The CFG builder explicitly processes CaseStmts and DefaultStmts. It shouldn't be skipping over them here.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20110909/2adbaea6/attachment.html>
More information about the cfe-commits
mailing list