-
Notifications
You must be signed in to change notification settings - Fork 15.3k
Open
Labels
bugzillaIssues migrated from bugzillaIssues migrated from bugzillac++clang:codegenIR generation bugs: mangling, exceptions, etc.IR generation bugs: mangling, exceptions, etc.confirmedVerified by a second partyVerified by a second party
Description
| Bugzilla Link | 13809 |
| Version | unspecified |
| OS | Linux |
| CC | @DougGregor |
Extended Description
Clang dies on this:
struct S { int x : 5, y : 9; };
void f(bool c, S &a) { (c ? a.x : a.y) = 4; }... saying:
:2:31: error: cannot compile this conditional operator yet
void f(bool c, S &a, S &b) { (c ? a.x : a.y) = 4; }
^~~~~~~~~~~~~
We're also getting Sema wrong for this case. We accept:
int &g(bool c, S &a, S &b) { return (c ? a.x : a.y); }... but we should not, because it binds a reference to a bitfield.
Metadata
Metadata
Assignees
Labels
bugzillaIssues migrated from bugzillaIssues migrated from bugzillac++clang:codegenIR generation bugs: mangling, exceptions, etc.IR generation bugs: mangling, exceptions, etc.confirmedVerified by a second partyVerified by a second party