This patch allows pointer to static member function and fixes the bug in Bugzilla (https://bugs.llvm.org/show_bug.cgi?id=28419).
This is valid C++ codes. Both GCC and MSVC accepts this.
Paths
| Differential D59286
Allow pointer to static member function AbandonedPublic Authored by Manna on Mar 12 2019, 8:25 PM.
Details Summary This patch allows pointer to static member function and fixes the bug in Bugzilla (https://bugs.llvm.org/show_bug.cgi?id=28419). This is valid C++ codes. Both GCC and MSVC accepts this.
Diff Detail Event Timeline
Comment Actions
Just because GCC and MSVC accept something doesn't always mean it's valid C++ code; do you have references to where this is allowed by the standard? It seems like this changes the behavior of at least one DR, which is why I'm wondering about it. By my strict reading of the standard, this actually isn't valid C++ (though it seems like it could be a reasonable extension to support).
Comment Actions
Thanks Aaron. I am withdrawing my patches and this feature will not be supported in Clang.
Revision Contents
Diff 190374 lib/Sema/SemaExpr.cpp
lib/Sema/SemaOverload.cpp
test/CXX/drs/dr0xx.cpp
test/CXX/drs/dr1xx.cpp
test/CodeGenCXX/pointer-to-static-member.cpp
test/Sema/pointer-to-static-member.cpp
|
Missing grammatical correctness. How about "Explicitly accessing a static member function." instead?