aboutsummaryrefslogtreecommitdiff
path: root/contrib/llvm-project/clang/lib/Sema/SemaTemplateInstantiate.cpp
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2020-03-18 18:26:53 +0000
committerDimitry Andric <dim@FreeBSD.org>2020-03-18 18:26:53 +0000
commitcd675bb60e39395c92b8d08704bc01cdbdc03fac (patch)
treefeeaad8c4ebd5b552d5f9432f9845e7b973f5400 /contrib/llvm-project/clang/lib/Sema/SemaTemplateInstantiate.cpp
parent4bee618957f67ae6ba2db706696afbeacc57b610 (diff)
parent2fc9bb9ce23aec06620745773d24e59944b87ffc (diff)
downloadsrc-cd675bb60e39395c92b8d08704bc01cdbdc03fac.tar.gz
src-cd675bb60e39395c92b8d08704bc01cdbdc03fac.zip
Merge llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and openmp
llvmorg-10.0.0-rc4-5-g52c365aa9ca. The actual release should follow Real Soon Now. PR: 244251 MFC after: 6 weeks
Notes
Notes: svn path=/head/; revision=359082
Diffstat (limited to 'contrib/llvm-project/clang/lib/Sema/SemaTemplateInstantiate.cpp')
-rw-r--r--contrib/llvm-project/clang/lib/Sema/SemaTemplateInstantiate.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/contrib/llvm-project/clang/lib/Sema/SemaTemplateInstantiate.cpp b/contrib/llvm-project/clang/lib/Sema/SemaTemplateInstantiate.cpp
index 568f5404dc0b..b5d2ab1f31f2 100644
--- a/contrib/llvm-project/clang/lib/Sema/SemaTemplateInstantiate.cpp
+++ b/contrib/llvm-project/clang/lib/Sema/SemaTemplateInstantiate.cpp
@@ -922,6 +922,10 @@ namespace {
this->Entity = Entity;
}
+ unsigned TransformTemplateDepth(unsigned Depth) {
+ return TemplateArgs.getNewDepth(Depth);
+ }
+
bool TryExpandParameterPacks(SourceLocation EllipsisLoc,
SourceRange PatternRange,
ArrayRef<UnexpandedParameterPack> Unexpanded,
@@ -2162,7 +2166,7 @@ namespace {
// The deduced type itself.
TemplateTypeParmDecl *VisitTemplateTypeParmType(
const TemplateTypeParmType *T) {
- if (!T->getDecl()->isImplicit())
+ if (!T->getDecl() || !T->getDecl()->isImplicit())
return nullptr;
return T->getDecl();
}