diff --git a/lib/Sema/SemaDecl.cpp b/lib/Sema/SemaDecl.cpp index c7a47c98c9..fa0d3cef65 100644 --- a/lib/Sema/SemaDecl.cpp +++ b/lib/Sema/SemaDecl.cpp @@ -1253,6 +1253,11 @@ Sema::ControlFlowKind Sema::CheckFallThrough(Stmt *Root) { HasFakeEdge = true; continue; } + if (isa(S)) { + HasFakeEdge = true; + HasLiveReturn = true; + continue; + } bool NoReturnEdge = false; if (CallExpr *C = dyn_cast(S)) { Expr *CEE = C->getCallee()->IgnoreParenCasts(); diff --git a/test/Sema/return.c b/test/Sema/return.c index ad75cf1a0b..2e8120a754 100644 --- a/test/Sema/return.c +++ b/test/Sema/return.c @@ -222,3 +222,7 @@ void test32() { void test33() { if (j) while (1) { } } + +int test34() { + asm("nop"); +}