sammccall added a comment.

In D119094#3301297 <https://reviews.llvm.org/D119094#3301297>, @Quuxplusone 
wrote:

> Unfortunately some existing tests fail: 
> https://reviews.llvm.org/harbormaster/unit/view/2282838/
> I haven't yet figured out why consteval functions are considered to have 
> `FD->isInvalidDecl()`. There's also an Objective-C failure that I assume 
> indicates sometimes (when this is a //method// not a //function//) we have no 
> `FD` at all. I'd need to solve both of these problems (the former being the 
> difficult one) before I can make progress here.

The example seems to be invalid even apart from the missing return value. (I 
assume on purpose).

There's a constexpr version and a consteval version of the same function there. 
It looks like the call to MergeCXXFunctionDecl reports that the merge is 
invalid, which will result in FD ending up invalid.

Note that if you fix those errors (`return {}`) you hit the error `consteval 
declaration of 'operator+' follows constexpr declaration` 
(err_constexpr_redecl_mismatch) which comes from MergeCXXFunctionDecl.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D119094

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

Reply via email to