atmnpatel added inline comments.
================ Comment at: clang/lib/Sema/SemaOpenMP.cpp:3211-3213 + VD->getStorageClass() == SC_Static && + (CanonicalVD->getDeclContext()->isNamespace() || + !VD->isLocalVarDeclOrParm())) { ---------------- ABataev wrote: > atmnpatel wrote: > > ABataev wrote: > > > atmnpatel wrote: > > > > ABataev wrote: > > > > > I think just `!VD->hasLocalStorage()` should be enough here. Shall it > > > > > work for static locals too or just for globals? > > > > Just for globals. > > > What about static data members? > > The TR doesn't specify that static data members should inherit DSAs / have > > them explicitly defined. > What about non-static globals? Your current check works only for something > like `static int var;`, but not `int var;`. Sorry, I wasn't really clear with my earlier comment, I meant that just static global variables and static namespace variables need to have their DSA inherited/explicitly defined. So a global variable would become firstprivate implicitly. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D75591/new/ https://reviews.llvm.org/D75591 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits