forked from OSchip/llvm-project
Argument dependent lookup with class argument is recursing into base
classes that haven't been instantiated. This is generating an assertion in DeclTemplate.h. Fix for Bug25668.
This commit is contained in:
parent
a5309438fe
commit
37340798cc
|
@ -2576,6 +2576,8 @@ namespace {
|
|||
|
||||
bool addClassTransitive(CXXRecordDecl *RD) {
|
||||
Classes.insert(RD);
|
||||
if (InstantiationLoc.isInvalid())
|
||||
InstantiationLoc = RD->getLocation();
|
||||
return ClassesTransitive.insert(RD);
|
||||
}
|
||||
|
||||
|
|
|
@ -17549,6 +17549,7 @@ static void checkMappableExpressionList(
|
|||
auto &DeclNames = SemaRef.getASTContext().DeclarationNames;
|
||||
MapperId.setName(DeclNames.getIdentifier(
|
||||
&SemaRef.getASTContext().Idents.get("default")));
|
||||
MapperId.setLoc(StartLoc);
|
||||
}
|
||||
|
||||
// Iterators to find the current unresolved mapper expression.
|
||||
|
|
|
@ -0,0 +1,16 @@
|
|||
// RUN: %clang_cc1 -verify -fopenmp -fsyntax-only %s
|
||||
|
||||
// expected-no-diagnostics
|
||||
|
||||
template <typename T>
|
||||
struct z {
|
||||
static void aj() {
|
||||
T f;
|
||||
#pragma omp target map(f)
|
||||
;
|
||||
}
|
||||
};
|
||||
|
||||
template <typename> class ar {};
|
||||
template <int> struct as {};
|
||||
template class z<ar<as<4>>>;
|
Loading…
Reference in New Issue