summaryrefslogtreecommitdiffstats
path: root/clang/lib/AST/ODRHash.cpp
diff options
context:
space:
mode:
authorSaar Raz <saar@raz.email>2020-01-15 02:48:42 +0200
committerSaar Raz <saar@raz.email>2020-01-15 04:02:39 +0200
commitff1e0fce817e01f0288fad6a2607dd173180aabd (patch)
tree707c0171e1619c109d41b4db69af6353a97399f9 /clang/lib/AST/ODRHash.cpp
parent8e780252a7284be45cf1ba224cabd884847e8e92 (diff)
downloadbcm5719-llvm-ff1e0fce817e01f0288fad6a2607dd173180aabd.tar.gz
bcm5719-llvm-ff1e0fce817e01f0288fad6a2607dd173180aabd.zip
[Concepts] Type Constraints
Add support for type-constraints in template type parameters. Also add support for template type parameters as pack expansions (where the type constraint can now contain an unexpanded parameter pack). Differential Revision: https://reviews.llvm.org/D44352
Diffstat (limited to 'clang/lib/AST/ODRHash.cpp')
-rw-r--r--clang/lib/AST/ODRHash.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/clang/lib/AST/ODRHash.cpp b/clang/lib/AST/ODRHash.cpp
index 3b89c630b45..27fdca1c4b9 100644
--- a/clang/lib/AST/ODRHash.cpp
+++ b/clang/lib/AST/ODRHash.cpp
@@ -380,6 +380,11 @@ public:
}
Hash.AddBoolean(D->isParameterPack());
+ const TypeConstraint *TC = D->getTypeConstraint();
+ Hash.AddBoolean(TC != nullptr);
+ if (TC)
+ AddStmt(TC->getImmediatelyDeclaredConstraint());
+
Inherited::VisitTemplateTypeParmDecl(D);
}
OpenPOWER on IntegriCloud