Issue |
90822
|
Summary |
[clang][diagnostics] diagnostics can be more clear when forming pointer to member from parenthesized _expression_
|
Labels |
clang
|
Assignees |
|
Reporter |
zwuis
|
```cpp
struct foo {
int val;
void func() {}
};
int main() {
int foo::* ptr1 = &(foo::val);
void (foo::* ptr2)() = &(foo::func);
}
```
Diagnostic messages of this code are "invalid use of non-static data member 'val'" (line 6) and "call to non-static member function without an object argument" (line 7). (clang 18.1.0, <https://godbolt.org/z/YhGvWrTTb>)
These messages can be more clear like "cannot form pointer to member from a parenthesized _expression_".
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs