aaron.ballman added inline comments.
================ Comment at: include/clang/Basic/DiagnosticSemaKinds.td:1411 +def warn_nothrow_attr_disagrees_with_exception_specification + : ExtWarn<"Attribute nothrow ignored, it disagrees with language specified " + "exception specification">, ---------------- How about: `"attribute 'nothrow' ignored due to conflicting exception specification"` ================ Comment at: lib/Sema/SemaDeclAttr.cpp:1972 +static void handleNoThrowAttr(Sema &S, Decl *D, const AttributeList &attr) { + assert(isa<FunctionDecl>(D) && "attribute nothrow only valid on functions"); ---------------- `attr` doesn't meet the coding guidelines. I'd go with `AL`. ================ Comment at: test/SemaCXX/warn-conflicting-nothrow-attr-exception-spec.cpp:3 + +struct S { + //expected-warning@+2 {{Attribute nothrow ignored, it disagrees with}} ---------------- You should add some tests that include templates and test it on Windows as well as non-Windows. I'm wondering about computed exception specifications during template instantiation. e.g., ``` void throwing() noexcept(false); void non_throwing() noexcept; template <typename Fn> struct T { __attribute__((nothrow)) void f(Fn) noexcept(Fn()); }; template struct T<decltype(throwing)>; template struct T<decltype(non_throwing)>; ``` https://reviews.llvm.org/D38205 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits