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



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

Reply via email to