[PATCH] D39679: [C++11] Fix warning when dropping cv-qualifiers when assigning to a reference with a braced initializer list

Richard Smith - zygoloid via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Jun 21 13:48:37 PDT 2018


rsmith added a comment.

In https://reviews.llvm.org/D39679#1037591, @Rakete1111 wrote:

> Note: I didn't change `Args[0]` to `OnlyArg` in `FK_AddressOfUnaddressableFunction`, because I'm pretty sure that C++ doesn't have unaddressable functions and thus there is no need to decompose an initializer list. Is this correct?


C++ with Clang extensions has unaddressable functions. This example asserts at the moment:

  void f() __attribute__((enable_if(false, "")));
  int f();
  void (&&p)() = {f};

... due, I think, to failing to unwrap the initializer list when diagnosing the initialization.


https://reviews.llvm.org/D39679





More information about the cfe-commits mailing list