[all-commits] [llvm/llvm-project] 8480c9: [clang] pointer to member with qualified-id enclos...
YanzuoLiu via All-commits
all-commits at lists.llvm.org
Fri May 3 01:21:04 PDT 2024
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 8480c93e36b33c237540e20c97cda8fb3d196f1f
https://github.com/llvm/llvm-project/commit/8480c93e36b33c237540e20c97cda8fb3d196f1f
Author: YanzuoLiu <zwuis at outlook.com>
Date: 2024-05-03 (Fri, 03 May 2024)
Changed paths:
M clang/docs/ReleaseNotes.rst
M clang/include/clang/Basic/DiagnosticSemaKinds.td
M clang/lib/Sema/SemaExpr.cpp
M clang/test/CXX/expr/expr.unary/expr.unary.op/p4.cpp
Log Message:
-----------
[clang] pointer to member with qualified-id enclosed in parentheses in unevaluated context should be invalid (#89713)
clang don't check whether the operand of the & operator is enclosed in
parantheses when pointer to member is formed in unevaluated context, for
example:
```cpp
struct foo { int val; };
int main() { decltype(&(foo::val)) ptr; }
```
`decltype(&(foo::val))` should be invalid, but clang accepts it. This PR
fixes this issue.
Fixes #40906.
---------
Co-authored-by: cor3ntin <corentinjabot at gmail.com>
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list