[cfe-commits] r97014 - in /cfe/trunk: lib/Analysis/CFG.cpp test/Sema/warn-unreachable.c test/SemaCXX/warn-unreachable.cpp
Zhongxing Xu
xuzhongxing at gmail.com
Tue Feb 23 18:19:28 PST 2010
Author: zhongxingxu
Date: Tue Feb 23 20:19:28 2010
New Revision: 97014
URL: http://llvm.org/viewvc/llvm-project?rev=97014&view=rev
Log:
Always add CallExpr as block-level expression. Inline-based interprocedural
analysis needs this.
Modified:
cfe/trunk/lib/Analysis/CFG.cpp
cfe/trunk/test/Sema/warn-unreachable.c
cfe/trunk/test/SemaCXX/warn-unreachable.cpp
Modified: cfe/trunk/lib/Analysis/CFG.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Analysis/CFG.cpp?rev=97014&r1=97013&r2=97014&view=diff
==============================================================================
--- cfe/trunk/lib/Analysis/CFG.cpp (original)
+++ cfe/trunk/lib/Analysis/CFG.cpp Tue Feb 23 20:19:28 2010
@@ -589,7 +589,7 @@
AddEHEdge = false;
if (!NoReturn && !AddEHEdge)
- return VisitStmt(C, asc);
+ return VisitStmt(C, AddStmtChoice::AlwaysAdd);
if (Block) {
Succ = Block;
Modified: cfe/trunk/test/Sema/warn-unreachable.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Sema/warn-unreachable.c?rev=97014&r1=97013&r2=97014&view=diff
==============================================================================
--- cfe/trunk/test/Sema/warn-unreachable.c (original)
+++ cfe/trunk/test/Sema/warn-unreachable.c Tue Feb 23 20:19:28 2010
@@ -35,8 +35,8 @@
dead(); // expected-warning {{will never be executed}}
case 3:
- live()
- + // expected-warning {{will never be executed}}
+ live() // expected-warning {{will never be executed}}
+ +
halt();
dead();
Modified: cfe/trunk/test/SemaCXX/warn-unreachable.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaCXX/warn-unreachable.cpp?rev=97014&r1=97013&r2=97014&view=diff
==============================================================================
--- cfe/trunk/test/SemaCXX/warn-unreachable.cpp (original)
+++ cfe/trunk/test/SemaCXX/warn-unreachable.cpp Tue Feb 23 20:19:28 2010
@@ -52,8 +52,8 @@
int mem;
} s;
S &foor();
- halt(), foor()
- .mem; // expected-warning {{will never be executed}}
+ halt(), foor()// expected-warning {{will never be executed}}
+ .mem;
}
void test5() {
More information about the cfe-commits
mailing list