MicrosoftExtensions.cpp revision 5b6f769a6abda4da44186cc8e6a2d6ed37dc9344
1// RUN: %clang_cc1 %s -fsyntax-only -verify -fms-extensions -fexceptions
2
3
4// ::type_info is predeclared with forward class declartion
5void f(const type_info &a);
6
7// The following three are all equivalent when ms-extensions are on
8void foo() throw(int);
9void foo() throw(int, long);
10void foo() throw(...);
11void foo(); // expected-note {{previous declaration}}
12
13// Only nothrow specification is treated specially.
14void foo() throw(); // expected-error {{exception specification in declaration does not match previous declaration}}
15
16// throw(...)
17void r3();
18void r3() throw(...);
19
20void r6() throw(...);
21void r6() throw(int); // okay
22
23struct Base {
24  virtual void f2();
25  virtual void f3() throw(...);
26};
27
28struct Derived : Base {
29  virtual void f2() throw(...);
30  virtual void f3();
31};
32