mikerice added inline comments.

================
Comment at: clang/lib/Sema/SemaOpenMP.cpp:5512
+
+  if (!BaseFD) {
+    // TODO: Determine if we can reuse the declarator to create a declaration
----------------
I think if you do the base lookup in 
ActOnStartOfFunctionDefinitionInOpenMPDeclareVariantScope instead of here you 
might have better success using the declarator.  You would need to get the type 
and  constexpr/consteval info from the declarator and declspec but if the 
lookup fails you can just use ActOnDeclarator to get a base declaration like 
you were before.  I tried this in my sandbox and it seems to work (AST tests 
fail I'm guessing that is just order change).  If that works we could get rid 
of these hacky bits.


================
Comment at: clang/lib/Sema/SemaOpenMP.cpp:5551
+  BaseFD->addAttr(OMPDeclareVariantA);
   BaseFD->setImplicit(true);
 }
----------------
BaseFD is only implicit now if you created it, not when one was found in the 
lookup case right? 


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D77252



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

Reply via email to