[PATCH] D79655: [WebAssembly] Ignore exception specifications

Derek Schuff via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon May 11 14:01:35 PDT 2020


dschuff added a comment.

Actually, would it be possible to not ignore `throw()` but make it an alias for `noexcept(true)`? Apparently that is the standard behavior in C++17, so it might make more sense to just implement that now rather than just warning all the time and ignoring it. It would also cover most of the cases that exist, so more users wouldn't need to disable the warning.



================
Comment at: clang/lib/CodeGen/CGException.cpp:23
 #include "clang/AST/StmtVisitor.h"
+#include "clang/Basic/DiagnosticSema.h"
 #include "clang/Basic/TargetBuiltins.h"
----------------
aheejin wrote:
> aheejin wrote:
> > One thing I'm not sure about is if it is a good thing to include this in CodeGen. Usually this header is used in Sema/ directory. This depends on which .td file I add `warn_wasm_exception_spec_ignored`. DiagnosticSemaKinds.td seemed to have a section in exception spec so I added it there, but not entirely sure if that's the best location to add it.
> Oh, and this warning message was requested by Adobe, but I think it's good to have in general.
According to the CMakeLists.txt in lib/CodeGen,  clangCodeGen depends on clangBasic, so I think it should be ok to include stuff from clang/Basic here (even if it has Sema in the name).
And a warning seems ok, as long as it's possible to suppress it. 


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D79655





More information about the cfe-commits mailing list