Quuxplusone added inline comments.
================
Comment at: clang/test/SemaCXX/attr-no-address.cpp:47-48
+void address_test() {
+ void (*fp1)() = &std::one_overload;
+ // expected-error@-1{{cannot take address of 'std::one_overload' because
functions in namespace 'std' are not addressable}}
+ void (*fp2)() = std::one_overload;
----------------
FWIW, I don't think this diagnostic provides any benefit to the
user-programmer; it merely inconveniences them.
But it does add a lot of burden on the //libc++ developers//, who must now
remember to add a new clang-specific attribute on every function they write.
So for me this is all cost and no benefit.
Am I correct that this attribute doesn't interfere with the user-programmer's
writing `std::addressof(std::one_overload)`?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D101598/new/
https://reviews.llvm.org/D101598
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits