summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema/SemaOpenMP.cpp
diff options
context:
space:
mode:
authorSamuel Antao <sfantao@us.ibm.com>2016-07-18 23:22:11 +0000
committerSamuel Antao <sfantao@us.ibm.com>2016-07-18 23:22:11 +0000
commitdab51bbd485c98702ed7b316ae1a70e303500968 (patch)
treed21ea49a0b1ee20518ea8316b763a8071c6337e3 /clang/lib/Sema/SemaOpenMP.cpp
parent4cb438b93c3b7d71bb29e988634ffd7c08186d25 (diff)
downloadbcm5719-llvm-dab51bbd485c98702ed7b316ae1a70e303500968.tar.gz
bcm5719-llvm-dab51bbd485c98702ed7b316ae1a70e303500968.zip
[OpenMP] Remove dead code in conditional of mappable expressions SEMA.
llvm-svn: 275930
Diffstat (limited to 'clang/lib/Sema/SemaOpenMP.cpp')
-rw-r--r--clang/lib/Sema/SemaOpenMP.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/clang/lib/Sema/SemaOpenMP.cpp b/clang/lib/Sema/SemaOpenMP.cpp
index 1efdcfc6386..9b8c95c1cb4 100644
--- a/clang/lib/Sema/SemaOpenMP.cpp
+++ b/clang/lib/Sema/SemaOpenMP.cpp
@@ -10574,16 +10574,16 @@ static Expr *CheckMapClauseExpressionBase(
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(
OpenPOWER on IntegriCloud