public:
void VisitDeclRefExpr(DeclRefExpr *E) {
+ if (E->isTypeDependent() || E->isValueDependent() ||
+ E->containsUnexpandedParameterPack() || E->isInstantiationDependent())
+ return;
if (auto *VD = dyn_cast<VarDecl>(E->getDecl())) {
// Skip internally declared variables.
if (VD->isLocalVarDecl() && !CS->capturesVariable(VD))
}
}
void VisitMemberExpr(MemberExpr *E) {
+ if (E->isTypeDependent() || E->isValueDependent() ||
+ E->containsUnexpandedParameterPack() || E->isInstantiationDependent())
+ return;
if (isa<CXXThisExpr>(E->getBase()->IgnoreParens())) {
if (auto *FD = dyn_cast<FieldDecl>(E->getMemberDecl())) {
auto DVar = Stack->getTopDSA(FD, false);
return argc;
}
+template <typename T>
+struct S {
+ T b;
+ S(T a, T c) {
+#pragma omp task default(none) firstprivate(a, b)
+ a = b = c; // expected-error {{variable 'c' must have explicitly specified data sharing attributes}}
+ }
+};
+
+S<int> s(3, 4); // expected-note {{in instantiation of member function 'S<int>::S' requested here}}
+
struct S1; // expected-note {{declared here}} expected-note{{forward declaration of 'S1'}}
extern S1 a;
class S2 {