summaryrefslogtreecommitdiffstats
path: root/lib/Sema/SemaOpenMP.cpp
diff options
context:
space:
mode:
authorTom Stellard <tstellar@redhat.com>2017-11-13 23:26:36 +0000
committerTom Stellard <tstellar@redhat.com>2017-11-13 23:26:36 +0000
commit67341cd6d735f99599aab9e9b6a04699860ac5c2 (patch)
tree269cfafa2d843b0e4fb8ffd614b10f3141bfb5e9 /lib/Sema/SemaOpenMP.cpp
parent652ef4b1b600710c74167d3a70c39386576c1672 (diff)
Merging r311777:
------------------------------------------------------------------------ r311777 | abataev | 2017-08-25 08:43:55 -0700 (Fri, 25 Aug 2017) | 5 lines [OPENMP] Fix for PR34321: ustom OpenMP reduction in C++ template causes SEGFAULT at compile time Compiler crashed when tried to rebuild non-template expression in dependent context. ------------------------------------------------------------------------ git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_50@318107 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaOpenMP.cpp')
-rw-r--r--lib/Sema/SemaOpenMP.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/Sema/SemaOpenMP.cpp b/lib/Sema/SemaOpenMP.cpp
index 01f574b6ae..38cb454316 100644
--- a/lib/Sema/SemaOpenMP.cpp
+++ b/lib/Sema/SemaOpenMP.cpp
@@ -8858,7 +8858,8 @@ buildDeclareReductionRef(Sema &SemaRef, SourceLocation Loc, SourceRange Range,
PrevD = D;
}
}
- if (Ty->isDependentType() || Ty->isInstantiationDependentType() ||
+ if (SemaRef.CurContext->isDependentContext() || Ty->isDependentType() ||
+ Ty->isInstantiationDependentType() ||
Ty->containsUnexpandedParameterPack() ||
filterLookupForUDR<bool>(Lookups, [](ValueDecl *D) -> bool {
return !D->isInvalidDecl() &&