// (C++98 8.3.5p3):
// All declarations for a function shall agree exactly in both the
// return type and the parameter-type-list.
- if (OldQType == NewQType)
+ // attributes should be ignored when comparing.
+ if (Context.getNoReturnType(OldQType, false) ==
+ Context.getNoReturnType(NewQType, false))
return MergeCompatibleFunctionDecls(New, Old);
// Fall through for conflicting redeclarations and redefinitions.
f3(f0); // okay
f3(f2); // expected-error{{no matching function for call}}
}
+
+
+class xpto {
+ int blah() __attribute__((noreturn));
+};
+
+int xpto::blah() {
+ return 3; // expected-warning {{function 'blah' declared 'noreturn' should not return}}
+}