OldNR != FunctionProtoType::NR_NoNoexcept &&
NewNR != FunctionProtoType::NR_NoNoexcept) {
Diag(NewLoc, DiagID);
- if (NoteID.getDiagID() != 0)
+ if (NoteID.getDiagID() != 0 && OldLoc.isValid())
Diag(OldLoc, NoteID);
return true;
}
}
Diag(NewLoc, DiagID);
- if (NoteID.getDiagID() != 0)
+ if (NoteID.getDiagID() != 0 && OldLoc.isValid())
Diag(OldLoc, NoteID);
return true;
}
return false;
}
Diag(NewLoc, DiagID);
- if (NoteID.getDiagID() != 0)
+ if (NoteID.getDiagID() != 0 && OldLoc.isValid())
Diag(OldLoc, NoteID);
return true;
}
#endif
}
+#if __cplusplus >= 201103L
+// dr1948: yes
+// FIXME: This diagnostic could be improved.
+void *operator new(__SIZE_TYPE__) noexcept { return nullptr; } // expected-error{{exception specification in declaration does not match previous declaration}}
+#endif
+
#if __cplusplus >= 201103L
namespace dr1968 { // dr1968: yes
static_assert(&typeid(int) == &typeid(int), ""); // expected-error{{not an integral constant expression}}
<td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/cwg_closed.html#1948">1948</a></td>
<td>NAD</td>
<td><I>exception-specification</I> of replacement global <TT>new</TT></td>
- <td class="none" align="center">Unknown</td>
+ <td class="full" align="center">Yes</td>
</tr>
<tr class="open" id="1949">
<td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/cwg_active.html#1949">1949</a></td>