-
Notifications
You must be signed in to change notification settings - Fork 10.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Canonically identical types are allowed in compound expressions in C
We did not have a catch-all for when the two operand types are identical after canonicalization. Instead, we handled that on a case by case basis. Thus, we would diagnose code like: ``` mat4 test(int a) { typedef float mat4 __attribute((matrix_type(4, 4))); mat4 transform; return (a > 0) ? transform : transform; } ``` This simplifies the logic and will be more forwards compatible with other extended datatypes. Fixes #69008
- Loading branch information
1 parent
5e1c2bf
commit 343bed8
Showing
3 changed files
with
23 additions
and
13 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