diff options
author | Fariborz Jahanian <fjahanian@apple.com> | 2014-10-28 23:46:58 +0000 |
---|---|---|
committer | Fariborz Jahanian <fjahanian@apple.com> | 2014-10-28 23:46:58 +0000 |
commit | 937224777a3fdcd73b065523274eb1d2273f1af2 (patch) | |
tree | 5fa2cec6a994eb470ac3a03f48d7ff6753662e37 /clang/lib/Frontend/Rewrite | |
parent | 04bf6931cc94e399b4da63bdee248104bb2fc03a (diff) | |
download | bcm5719-llvm-937224777a3fdcd73b065523274eb1d2273f1af2.tar.gz bcm5719-llvm-937224777a3fdcd73b065523274eb1d2273f1af2.zip |
Objective-C modern rewriter. Patch to fix a rewriting bug
rewriting an Objective-C block. Patch by Ryan Govostes.
rdar://18799145
llvm-svn: 220834
Diffstat (limited to 'clang/lib/Frontend/Rewrite')
-rw-r--r-- | clang/lib/Frontend/Rewrite/RewriteModernObjC.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/clang/lib/Frontend/Rewrite/RewriteModernObjC.cpp b/clang/lib/Frontend/Rewrite/RewriteModernObjC.cpp index 3c48de2b4aa..bcfba226681 100644 --- a/clang/lib/Frontend/Rewrite/RewriteModernObjC.cpp +++ b/clang/lib/Frontend/Rewrite/RewriteModernObjC.cpp @@ -5526,6 +5526,10 @@ Stmt *RewriteModernObjC::SynthBlockInitExpr(BlockExpr *Exp, VK_RValue, OK_Ordinary, SourceLocation()); NewRep = NoTypeInfoCStyleCastExpr(Context, FType, CK_BitCast, NewRep); + // Put Paren around the call. + NewRep = new (Context) ParenExpr(SourceLocation(), SourceLocation(), + NewRep); + BlockDeclRefs.clear(); BlockByRefDecls.clear(); BlockByRefDeclsPtrSet.clear(); |