if (!RD || RD->isInvalidDecl())
return true;
- if (auto *CTSD = dyn_cast<ClassTemplateSpecializationDecl>(RD))
- if (auto *CTD = CTSD->getSpecializedTemplate())
- RD = CTD->getTemplatedDecl();
auto QTy = SemaRef.Context.getRecordType(RD);
if (RD->isDynamicClass()) {
SemaRef.Diag(Loc, diag::err_omp_not_mappable_type) << QTy;
S5(int v):a(v) { }
};
+template <class T>
+struct S6;
+
+template<>
+struct S6<int> // expected-note {{mappable type cannot be polymorphic}}
+{
+ virtual void foo();
+};
+
S3 h;
#pragma omp threadprivate(h) // expected-note 2 {{defined as threadprivate or thread local}}
int i;
int &j = i;
int *k = &j;
+ S6<int> m;
int x;
int y;
int to, tofrom, always;
{}
#pragma omp target firstprivate(j) map(j) // expected-error {{firstprivate variable cannot be in a map clause in '#pragma omp target' directive}} expected-note {{defined as firstprivate}}
{}
+#pragma omp target map(m) // expected-error {{type 'S6<int>' is not mappable to target}}
+ {}
return tmain<int, 3>(argc)+tmain<from, 4>(argc); // expected-note {{in instantiation of function template specialization 'tmain<int, 3>' requested here}} expected-note {{in instantiation of function template specialization 'tmain<int, 4>' requested here}}
}
#endif