Author: rtrieu Date: Fri Jul 21 14:29:35 2017 New Revision: 308783 URL: http://llvm.org/viewvc/llvm-project?rev=308783&view=rev Log: Inline variable into assert to fix unused warning.
Modified: cfe/trunk/lib/Sema/SemaOpenMP.cpp Modified: cfe/trunk/lib/Sema/SemaOpenMP.cpp URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaOpenMP.cpp?rev=308783&r1=308782&r2=308783&view=diff ============================================================================== --- cfe/trunk/lib/Sema/SemaOpenMP.cpp (original) +++ cfe/trunk/lib/Sema/SemaOpenMP.cpp Fri Jul 21 14:29:35 2017 @@ -745,9 +745,8 @@ void DSAStackTy::addReductionData(ValueD BinaryOperatorKind BOK) { D = getCanonicalDecl(D); assert(!isStackEmpty() && "Data-sharing attributes stack is empty"); - auto &Data = Stack.back().first.back().SharingMap[D]; assert( - Data.Attributes == OMPC_reduction && + Stack.back().first.back().SharingMap[D].Attributes == OMPC_reduction && "Additional reduction info may be specified only for reduction items."); auto &ReductionData = Stack.back().first.back().ReductionMap[D]; assert(ReductionData.ReductionRange.isInvalid() && @@ -760,9 +759,8 @@ void DSAStackTy::addReductionData(ValueD const Expr *ReductionRef) { D = getCanonicalDecl(D); assert(!isStackEmpty() && "Data-sharing attributes stack is empty"); - auto &Data = Stack.back().first.back().SharingMap[D]; assert( - Data.Attributes == OMPC_reduction && + Stack.back().first.back().SharingMap[D].Attributes == OMPC_reduction && "Additional reduction info may be specified only for reduction items."); auto &ReductionData = Stack.back().first.back().ReductionMap[D]; assert(ReductionData.ReductionRange.isInvalid() && _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits