[PATCH] D85878: [OpenMP] Context selector extensions for return value overloading

Johannes Doerfert via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Aug 13 12:18:38 PDT 2020


jdoerfert added inline comments.


================
Comment at: clang/lib/Sema/SemaOpenMP.cpp:5879
   D.SetIdentifier(&VariantII, D.getBeginLoc());
   return BaseFD;
 }
----------------
ABataev wrote:
> Does the user of this function expect that BaseFD can be `nullptr` after this change?
It was always OK to return a `nullptr`, I think. 
The call site is here https://github.com/llvm/llvm-project/blob/master/clang/lib/Sema/SemaDecl.cpp#L13765 

The important thing is that we mangle the name, but not returning a `BaseFD` will simply not add an `OMPDeclareVariantAttr` to anything, making this variant unused code.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D85878



More information about the cfe-commits mailing list