]> granicus.if.org Git - clang/commitdiff
Fix compile error. Per Fariborz.
authorDale Johannesen <dalej@apple.com>
Sat, 10 Jul 2010 19:53:56 +0000 (19:53 +0000)
committerDale Johannesen <dalej@apple.com>
Sat, 10 Jul 2010 19:53:56 +0000 (19:53 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108051 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Sema/TreeTransform.h

index 05ae38e84aa8e7911a26f85fe630b5fe9118768a..2e92d3273689129b5384c84484a6d2001f731c6d 100644 (file)
@@ -6280,7 +6280,8 @@ TreeTransform<Derived>::TransformBlockDeclRefExpr(BlockDeclRefExpr *E) {
     return SemaRef.ExprError();
   
   // Is this instantiation of a __block variable?
-  if (E->getDecl()->getAttr<BlocksAttr>())
+  ValueDecl *V = E->getDecl();
+  if (V->getAttr<BlocksAttr>())
     ND->addAttr(::new (SemaRef.Context) BlocksAttr(BlocksAttr::ByRef));
   
   if (!getDerived().AlwaysRebuild() &&