mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2025-01-10 01:55:08 +00:00
Make sure we consistently canonicalize types when canonicalizing TemplateTemplateParmDecls. PR12179.
llvm-svn: 152189
This commit is contained in:
parent
eadd8ee49c
commit
205a429891
@ -74,12 +74,14 @@ ASTContext::CanonicalTemplateTemplateParm::Profile(llvm::FoldingSetNodeID &ID,
|
||||
if (NonTypeTemplateParmDecl *NTTP = dyn_cast<NonTypeTemplateParmDecl>(*P)) {
|
||||
ID.AddInteger(1);
|
||||
ID.AddBoolean(NTTP->isParameterPack());
|
||||
ID.AddPointer(NTTP->getType().getAsOpaquePtr());
|
||||
ID.AddPointer(NTTP->getType().getCanonicalType().getAsOpaquePtr());
|
||||
if (NTTP->isExpandedParameterPack()) {
|
||||
ID.AddBoolean(true);
|
||||
ID.AddInteger(NTTP->getNumExpansionTypes());
|
||||
for (unsigned I = 0, N = NTTP->getNumExpansionTypes(); I != N; ++I)
|
||||
ID.AddPointer(NTTP->getExpansionType(I).getAsOpaquePtr());
|
||||
for (unsigned I = 0, N = NTTP->getNumExpansionTypes(); I != N; ++I) {
|
||||
QualType T = NTTP->getExpansionType(I);
|
||||
ID.AddPointer(T.getCanonicalType().getAsOpaquePtr());
|
||||
}
|
||||
} else
|
||||
ID.AddBoolean(false);
|
||||
continue;
|
||||
|
@ -54,3 +54,9 @@ namespace N {
|
||||
|
||||
void f0( Y<int,1> y){ 1 << y; } // expected-note{{in instantiation of function template specialization 'N::operator<<<Y, int, 1>' requested here}}
|
||||
}
|
||||
|
||||
// PR12179
|
||||
template <typename Primitive, template <Primitive...> class F>
|
||||
struct unbox_args {
|
||||
typedef typename Primitive::template call<F> x;
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user