forked from llvm/llvm-project
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[clang] pointer to member with qualified-id enclosed in parentheses i…
…n unevaluated context should be invalid (llvm#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 llvm#40906. --------- Co-authored-by: cor3ntin <[email protected]>
- Loading branch information
Showing
4 changed files
with
38 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters