jdoerfert added inline comments.

================
Comment at: clang/lib/CodeGen/CodeGenModule.cpp:3062
+    if (auto *A = Global->getAttr<OMPDeclareVariantNoMangleAttr>())
+      VariantGlobalsEmitted.insert(A->getFunction());
   }
----------------
jhuber6 wrote:
> jdoerfert wrote:
> > This looks like you now disable the diagnostic for pretty much everything, 
> > no?
> This should only get called if we plan to emit this global, if the global has 
> the attribute stating that it should not be mangled we're basically just 
> asserting that its associated non-variant declaration should not be found. So 
> even if we hit a name mangling conflict, as long as we haven't tried to emit 
> that global we should be fine. I can add a test for this.
We only put things in this set for a special OpenMP case, correct?
The error condition below triggers only if something is in this set.

So all non-openmp codes will never see this diagnostic, or what am I missing?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D122760/new/

https://reviews.llvm.org/D122760

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to