Author: sfantao Date: Mon Jul 18 18:22:11 2016 New Revision: 275930 URL: http://llvm.org/viewvc/llvm-project?rev=275930&view=rev Log: [OpenMP] Remove dead code in conditional of mappable expressions SEMA.
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=275930&r1=275929&r2=275930&view=diff ============================================================================== --- cfe/trunk/lib/Sema/SemaOpenMP.cpp (original) +++ cfe/trunk/lib/Sema/SemaOpenMP.cpp Mon Jul 18 18:22:11 2016 @@ -10574,16 +10574,16 @@ static Expr *CheckMapClauseExpressionBas bool NotUnity = CheckArrayExpressionDoesNotReferToUnitySize(SemaRef, CurE, CurType); - if (AllowWholeSizeArraySection && AllowUnitySizeArraySection) { - // Any array section is currently allowed. + if (AllowWholeSizeArraySection) { + // Any array section is currently allowed. Allowing a whole size array + // section implies allowing a unity array section as well. // // If this array section refers to the whole dimension we can still // accept other array sections before this one, except if the base is a // pointer. Otherwise, only unitary sections are accepted. if (NotWhole || IsPointer) AllowWholeSizeArraySection = false; - } else if ((AllowUnitySizeArraySection && NotUnity) || - (AllowWholeSizeArraySection && NotWhole)) { + } else if (AllowUnitySizeArraySection && NotUnity) { // A unity or whole array section is not allowed and that is not // compatible with the properties of the current array section. SemaRef.Diag( _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits