summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorJonas Hahnfeld <hahnjo@hahnjo.de>2017-11-02 13:30:42 +0000
committerJonas Hahnfeld <hahnjo@hahnjo.de>2017-11-02 13:30:42 +0000
commit8148ea17f5b960f0cb6457b9e4906da119f3b1f8 (patch)
treed43b74949d4185b4a3b489fac8cd5a3e3e508c6b /lib
parenteb2251ff651ab5e512fcf197b45c31496ad674bd (diff)
downloadclang-8148ea17f5b960f0cb6457b9e4906da119f3b1f8.tar.gz
[OpenMP] Extend "Avoid VLAs for reduction" optimization to VLAs as base
We can generate constant sized arrays whenever the array section has constant length, even if the base expression itself is a VLA. Differential Revision: https://reviews.llvm.org/D39504 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@317207 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r--lib/Sema/SemaOpenMP.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Sema/SemaOpenMP.cpp b/lib/Sema/SemaOpenMP.cpp
index 941ac75fa6..243c6ed5f4 100644
--- a/lib/Sema/SemaOpenMP.cpp
+++ b/lib/Sema/SemaOpenMP.cpp
@@ -9711,7 +9711,7 @@ static bool ActOnOMPReductionKindClause(
}
if ((OASE && !ConstantLengthOASE) ||
- (!ASE &&
+ (!OASE && !ASE &&
D->getType().getNonReferenceType()->isVariablyModifiedType())) {
// For arrays/array sections only:
// Create pseudo array type for private copy. The size for this array will