// pointer or reference to a class currently being defined.
// In Microsoft mode, downgrade this to a warning.
unsigned DiagID = diag::err_incomplete_in_exception_spec;
- if (getLangOpts().MicrosoftExt)
+ bool ReturnValueOnError = true;
+ if (getLangOpts().MicrosoftExt) {
DiagID = diag::ext_incomplete_in_exception_spec;
+ ReturnValueOnError = false;
+ }
if (!(PointeeT->isRecordType() &&
PointeeT->getAs<RecordType>()->isBeingDefined()) &&
RequireCompleteType(Range.getBegin(), PointeeT, DiagID, Kind, Range))
- return true;
+ return ReturnValueOnError;
return false;
}
-// RUN: %clang_cc1 %s -fsyntax-only -verify -fms-extensions
+// RUN: %clang_cc1 %s -fsyntax-only -verify -fms-extensions -fexceptions -fcxx-exceptions
void f() throw(...) { }
namespace PR28080 {
-struct S; // expected-note {{forward declaration}}
-void fn() throw(S); // expected-warning {{incomplete type}}
+struct S; // expected-note {{forward declaration}}
+void fn() throw(S); // expected-warning {{incomplete type}} expected-note{{previous declaration}}
+void fn() throw(); // expected-warning {{does not match previous declaration}}
}