+2018-11-16 Kamlesh Kumar <kamleshbhalui@gmail.com>
+
+ DR 1207
+ PR c++/52869
+ * parser.c (cp_parser_noexcept_specification_opt): Call
+ inject_this_parameter.
+
2018-11-16 Jason Merrill <jason@redhat.com>
Implement P0479R5, [[likely]] and [[unlikely]].
matching_parens parens;
parens.consume_open (parser);
+ tree save_ccp = current_class_ptr;
+ tree save_ccr = current_class_ref;
+
+ if (current_class_type)
+ inject_this_parameter (current_class_type, TYPE_UNQUALIFIED);
+
if (require_constexpr)
{
/* Types may not be defined in an exception-specification. */
}
parens.require_close (parser);
+
+ current_class_ptr = save_ccp;
+ current_class_ref = save_ccr;
}
else
{
--- /dev/null
+// DR 1207
+// PR c++/52869
+// { dg-do compile { target c++11 } }
+
+struct S {
+ void f() { }
+ void g() noexcept(noexcept(f())) { }
+ void h() noexcept(noexcept(this->f())) { }
+};
+
+struct Nyan {
+ Nyan &operator++() noexcept { return *this; }
+ void omg() noexcept(noexcept(++*this)) {}
+};
+
+template <class T>
+class Test{
+ T count;
+ Test (T arg) {count=arg;}
+ void fetch() { }
+ T inc () noexcept(noexcept(this->fetch())) {return ++count;}
+ T dec () noexcept(noexcept(fetch())) { return --count;}
+};
--- /dev/null
+// DR 1207
+// PR c++/52869
+// { dg-do compile { target c++11 } }
+
+void
+fn ()
+{
+ struct S {
+ bool operator!() noexcept(false);
+ } s;
+ S t = s;
+}