summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema/SemaStmtAsm.cpp
diff options
context:
space:
mode:
authorReid Kleckner <rnk@google.com>2018-03-08 01:12:22 +0000
committerReid Kleckner <rnk@google.com>2018-03-08 01:12:22 +0000
commit8d485b845b1dc8cdd78c7c4028be94f2abadbf50 (patch)
treedfa1abc2972cd5ff48b111643d9142a9cad62869 /clang/lib/Sema/SemaStmtAsm.cpp
parent5d3310208ae811396ca0cf256f96d4234ce5ae75 (diff)
downloadbcm5719-llvm-8d485b845b1dc8cdd78c7c4028be94f2abadbf50.tar.gz
bcm5719-llvm-8d485b845b1dc8cdd78c7c4028be94f2abadbf50.zip
Revert "[Sema] Make getCurFunction() return null outside function parsing"
This reverts r326965. It seems to have caused repeating test failures in clang/test/Sema/diagnose_if.c on some buildbots. I cannot reproduce the problem, and it's not immediately obvious what the problem is, so let's revert to green. llvm-svn: 326974
Diffstat (limited to 'clang/lib/Sema/SemaStmtAsm.cpp')
-rw-r--r--clang/lib/Sema/SemaStmtAsm.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/Sema/SemaStmtAsm.cpp b/clang/lib/Sema/SemaStmtAsm.cpp
index cad398a13d9..fc1cc7bbe54 100644
--- a/clang/lib/Sema/SemaStmtAsm.cpp
+++ b/clang/lib/Sema/SemaStmtAsm.cpp
@@ -793,7 +793,7 @@ StmtResult Sema::ActOnMSAsmStmt(SourceLocation AsmLoc, SourceLocation LBraceLoc,
ArrayRef<Expr*> Exprs,
SourceLocation EndLoc) {
bool IsSimple = (NumOutputs != 0 || NumInputs != 0);
- setFunctionHasBranchProtectedScope();
+ getCurFunction()->setHasBranchProtectedScope();
MSAsmStmt *NS =
new (Context) MSAsmStmt(Context, AsmLoc, LBraceLoc, IsSimple,
/*IsVolatile*/ true, AsmToks, NumOutputs, NumInputs,
OpenPOWER on IntegriCloud