From: Eli Friedman Date: Thu, 12 Sep 2013 22:36:24 +0000 (+0000) Subject: Fix regression from r190427. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=0f115b3fc02be7b0d9c8bcefc36139ccb669f62e;p=clang Fix regression from r190427. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@190635 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Sema/SemaExpr.cpp b/lib/Sema/SemaExpr.cpp index 918201c44c..4e2e24eab4 100644 --- a/lib/Sema/SemaExpr.cpp +++ b/lib/Sema/SemaExpr.cpp @@ -10012,7 +10012,7 @@ ExprResult Sema::ActOnChooseExpr(SourceLocation BuiltinLoc, void Sema::ActOnBlockStart(SourceLocation CaretLoc, Scope *CurScope) { BlockDecl *Block = BlockDecl::Create(Context, CurContext, CaretLoc); - { + if (LangOpts.CPlusPlus) { Decl *ManglingContextDecl; if (MangleNumberingContext *MCtx = getCurrentMangleNumberContext(Block->getDeclContext(), diff --git a/test/SemaObjC/blocks.m b/test/SemaObjC/blocks.m index 65434698a8..d6681d051d 100644 --- a/test/SemaObjC/blocks.m +++ b/test/SemaObjC/blocks.m @@ -216,3 +216,8 @@ void testAnonymousEnumTypes(int arg) { SB = ^{ if (arg) return TDFTE_Value; else return getTDFTE(); }; SB = ^{ if (arg) return getTDFTE(); else return TDFTE_Value; }; } + +static inline void inlinefunc() { + ^{}(); +} +void inlinefunccaller() { inlinefunc(); }