[PATCH] D125259: [C11] Diagnose unreachable generic selection associations
Aaron Ballman via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue May 10 08:19:32 PDT 2022
aaron.ballman added inline comments.
================
Comment at: clang/lib/Sema/SemaExpr.cpp:1702
+
+ if (Reason)
+ Diag(Types[i]->getTypeLoc().getBeginLoc(),
----------------
erichkeane wrote:
> Splitting this up into the separate line for only 2 items seems like a waste, would it look better to just do the diag in each 'if'?
I tried it both ways and I think using only one call to `Diag` is better (it makes it easier if we want to update the diagnostic text in the future, say to add more information to it like a source range, etc). However, I don't feel super strongly -- if you'd like to see it changed still, I can do so.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D125259/new/
https://reviews.llvm.org/D125259
More information about the cfe-commits
mailing list