[PATCH] D86559: [Sema, CodeGen] Allow [[likely]] and [[unlikely]] on labels

2020-09-01 Thread Staffan Tjernstrom via Phabricator via cfe-commits
staffantj added a comment. In D86559#2250344 , @Mordante wrote: > In D86559#2250106 , @staffantj wrote: > >> In D86559#2250034 , @aaron.ballman >> wrote: >> >>> In D86559#22

[PATCH] D86559: [Sema, CodeGen] Allow [[likely]] and [[unlikely]] on labels

2020-09-01 Thread Staffan Tjernstrom via Phabricator via cfe-commits
staffantj added a comment. In D86559#2250034 , @aaron.ballman wrote: > In D86559#2243575 , @staffantj wrote: > >> As one of the SG14 industry members driving this, I'm firmly in the camp >> that this is what we're

[PATCH] D86559: [Sema, CodeGen] Allow [[likely]] and [[unlikely]] on labels

2020-08-27 Thread Staffan Tjernstrom via Phabricator via cfe-commits
staffantj added a comment. In D86559#2236931 , @Quuxplusone wrote: > This feels like the wrong approach to me... but I admit that I don't know > what the "right" approach might be. (I doubt any right approach exists.) > > if (ch == ' ') [[likely]] { >

[PATCH] D86559: [Sema, CodeGen] Allow [[likely]] and [[unlikely]] on labels

2020-08-27 Thread Staffan Tjernstrom via Phabricator via cfe-commits
staffantj added a comment. In D86559#2242586 , @Mordante wrote: > if(a) // Attribute not allowed on a declaration, > > [[likely]] int i = 5; // but I can't think about a good use-case > // for this code. > >

[PATCH] D86559: [Sema, CodeGen] Allow [[likely]] and [[unlikely]] on labels

2020-08-27 Thread Staffan Tjernstrom via Phabricator via cfe-commits
staffantj added a comment. In D86559#2242586 , @Mordante wrote: >> That is exactly the behavior I am coming to believe we should follow. You >> can either write it on a compound statement that is guarded by a flow >> control decision (`if`/`else`/`while`