Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[C11] Correct the resulting type for an assignment expression
In C, assignment expressions result in an rvalue whose type is the type of the lhs of the assignment after it undergoes lvalue to rvalue conversion. lvalue to rvalue conversion in C strips all qualifiers including _Atomic. We used getUnqualifiedType() which does not strip the _Atomic qualifier when we should have used getAtomicUnqualifiedType(). This corrects the usage and adds some comments to getUnqualifiedType() to make it more clear that it does not strip _Atomic and that's on purpose (see C11 6.2.5p27). This addresses Issue 48742.
- Loading branch information
1 parent
c3b672a
commit bfa2f25
Showing
4 changed files
with
28 additions
and
8 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