[PATCH] D103603: [Sema][RISCV] Allow ?: to select Typedef BuiltinType in C

2021-06-03 Thread ShihPo Hung via Phabricator via cfe-commits
arcbbb created this revision. arcbbb added reviewers: rsandifo-arm, efriedma, sdesmalen, rovka, rjmccall, rengolin, HsiangKai, craig.topper. Herald added subscribers: vkmr, frasercrmck, evandro, luismarques, apazos, sameer.abuasal, s.egerton, Jim, benna, psnobl, jocewei, PkmX, the_o, brucehoult,

[PATCH] D103603: [Sema][RISCV] Allow ?: to select Typedef BuiltinType in C

2021-06-03 Thread Kito Cheng via Phabricator via cfe-commits
kito-cheng added a comment. Testcase for AArch64/SVE: #include svint8_t a(); __SVInt8_t b(); svint8_t foo(int cond){ return cond ? a(): b(); } Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D103603/new/ https://reviews.llvm.org/

[PATCH] D103603: [Sema][RISCV] Allow ?: to select Typedef BuiltinType in C

2021-06-03 Thread Kito Cheng via Phabricator via cfe-commits
kito-cheng added a comment. The testcase I provided in last comment could be compile successfully with aarch64-gcc, but failed on clang. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D103603/new/ https://reviews.llvm.org/D103603 __

[PATCH] D103603: [Sema][RISCV] Allow ?: to select Typedef BuiltinType in C

2021-06-03 Thread Richard Sandiford via Phabricator via cfe-commits
rsandifo-arm added a comment. Thanks for the fix. I agree this is the right behaviour FWIW. I held off approving it in case there's another idiom that's preferred when comparing canonical types. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D1036

[PATCH] D103603: [Sema][RISCV] Allow ?: to select Typedef BuiltinType in C

2021-06-03 Thread Fraser Cormack via Phabricator via cfe-commits
frasercrmck added a comment. In D103603#2795899 , @kito-cheng wrote: > Testcase for AArch64/SVE: > > #include > > svint8_t a(); > __SVInt8_t b(); > > svint8_t foo(int cond){ > return cond ? a(): b(); > } Could that AArch64 test also

[PATCH] D103603: [Sema][RISCV] Allow ?: to select Typedef BuiltinType in C

2021-06-03 Thread Jessica Clarke via Phabricator via cfe-commits
jrtc27 requested changes to this revision. jrtc27 added inline comments. This revision now requires changes to proceed. Comment at: clang/lib/Sema/SemaExpr.cpp:8397 + if (LHSTy->isSizelessBuiltinType() && + (Context.getCanonicalType(LHSTy) == Context.getCanonicalType(RHSTy)