diff options
Diffstat (limited to 'clang/lib/Sema/SemaExpr.cpp')
| -rw-r--r-- | clang/lib/Sema/SemaExpr.cpp | 2 | 
1 files changed, 2 insertions, 0 deletions
| diff --git a/clang/lib/Sema/SemaExpr.cpp b/clang/lib/Sema/SemaExpr.cpp index 0d53e2f8bea..8b2e0203b38 100644 --- a/clang/lib/Sema/SemaExpr.cpp +++ b/clang/lib/Sema/SemaExpr.cpp @@ -1856,6 +1856,8 @@ Sema::OwningExprResult Sema::ActOnPredefinedExpr(SourceLocation Loc,    // string.    Decl *currentDecl = getCurFunctionOrMethodDecl(); +  if (!currentDecl && getCurBlock()) +    currentDecl = getCurBlock()->TheDecl;    if (!currentDecl) {      Diag(Loc, diag::ext_predef_outside_function);      currentDecl = Context.getTranslationUnitDecl(); | 

