giulianobelinassi added inline comments.
================ Comment at: clang/lib/AST/DeclPrinter.cpp:269-276 +static bool mustPrintOnLeftSide(attr::Kind kind) { + switch (kind) { +#include "clang/Basic/AttrLeftSideMustPrintList.inc" + return true; + default: + return false; + } ---------------- aaron.ballman wrote: > These changes have caused a new warning to show up in MSVC builds: `switch > statement contains 'default' but no 'case' labels` > > There's a few possible ways to resolve this: tablegen the entire switch > statement (so you can elide the switch if there are no case statements and > just make it `return false;` in that case), or remove the switch and add it > back once the .inc file is no longer empty (this is a bit fragile for my > tastes), or find an attribute that needs to be marked as must print on the > left so the .inc file is no longer empty. > > Can you look into solving this? I've not seen a bot go red from the change > yet, but we do have warnings-as-error builds with MSVC (at least in > downstreams) so the extra warning here is a problem. > tablegen the entire switch statement (so you can elide the switch if there > are no case statements and just make it return false; in that case) I will do this. This would IMHO give more control to the tool generating the table, which I think should have been the original approach. In any case, I think I will be able to come up with a patch in the next hours. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D141714/new/ https://reviews.llvm.org/D141714 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits