diff options
| author | Reid Kleckner <rnk@google.com> | 2018-03-08 01:12:22 +0000 |
|---|---|---|
| committer | Reid Kleckner <rnk@google.com> | 2018-03-08 01:12:22 +0000 |
| commit | 8d485b845b1dc8cdd78c7c4028be94f2abadbf50 (patch) | |
| tree | dfa1abc2972cd5ff48b111643d9142a9cad62869 /clang/lib/Sema/SemaExpr.cpp | |
| parent | 5d3310208ae811396ca0cf256f96d4234ce5ae75 (diff) | |
| download | bcm5719-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/SemaExpr.cpp')
| -rw-r--r-- | clang/lib/Sema/SemaExpr.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/Sema/SemaExpr.cpp b/clang/lib/Sema/SemaExpr.cpp index 07eb02bec06..95b56a242a6 100644 --- a/clang/lib/Sema/SemaExpr.cpp +++ b/clang/lib/Sema/SemaExpr.cpp @@ -13126,7 +13126,7 @@ ExprResult Sema::ActOnBlockStmtExpr(SourceLocation CaretLoc, for (const auto &CI : Result->getBlockDecl()->captures()) { const VarDecl *var = CI.getVariable(); if (var->getType().isDestructedType() != QualType::DK_none) { - setFunctionHasBranchProtectedScope(); + getCurFunction()->setHasBranchProtectedScope(); break; } } |

