[PATCH] D67590: Properly ignore mismatched exception specifiers in MSVC Compat mode.

Alex Fusco via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Sep 16 13:27:52 PDT 2019


alexfusco added inline comments.


================
Comment at: clang/test/SemaCXX/ms-exception-spec.cpp:2
+// RUN: %clang_cc1 -std=c++11 %s -fsyntax-only -verify -fms-compatibility -fexceptions -fcxx-exceptions
+// RUN: %clang_cc1 -std=c++17 %s -fsyntax-only -verify -fms-compatibility -fexceptions -fcxx-exceptions
 
----------------
Dynamic exception specifiers are also an error in C++17, which causes issues on line 4 and 8 in this invocation


================
Comment at: clang/test/SemaCXX/ms-exception-spec.cpp:14
+  template <typename U> FooPtr(U *p) : m_pT(nullptr) {}
+  template <> FooPtr(T *pInterface) throw() : m_pT(pInterface) {}  // expected-warning {{exception specification in declaration does not match previous declaration}}
+  T *m_pT;
----------------
There's also a (pre-existing and incorrect) note here that this is also the previous declaration and a note on line 18 that it's in instantiation of that template.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D67590





More information about the cfe-commits mailing list