mizvekov added inline comments.

================
Comment at: clang/lib/AST/DeclTemplate.cpp:262
+  }
+  default:;
+  };
----------------
erichkeane wrote:
> The semicolon after default is bizarre/unnecessary.  That said, I'd suggest 
> just making the 'default' case be 'return false'.
This is just a workaround for some versions of GCC and/or MSVC which warn on 
control flow reaching the end of the function, even in cases such as a switch 
which returns in all paths.
Also we prefer to emit a warning on unhandled cases when omitting the default 
case.

So this is a compact way of avoiding those issues without having to add a 
`llvm_unreachable("control flow should never get here");` at the end.

Have we gotten rid of the old versions of those toolchains which had this 
problem?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D133262/new/

https://reviews.llvm.org/D133262

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to