blob: 90ed1456d24de07c0ed9a606c0af988dd258403b [file] [log] [blame]
Daniel Dunbard7d5f022009-03-24 02:24:46 +00001// RUN: clang-cc -fsyntax-only -verify %s
Anton Korobeynikov2f402702008-12-26 00:52:02 +00002
3inline void __attribute__((dllexport)) foo1(){} // expected-warning{{dllexport attribute ignored}}
4inline void __attribute__((dllimport)) foo2(){} // expected-warning{{dllimport attribute ignored}}
5
6void __attribute__((dllimport)) foo3(){} // expected-error{{dllimport attribute can be applied only to symbol declaration}}
7
8void __attribute__((dllimport, dllexport)) foo4(); // expected-warning{{dllimport attribute ignored}}
9
10void __attribute__((dllexport)) foo5();
11void __attribute__((dllimport)) foo5(); // expected-warning{{dllimport attribute ignored}}
12
Chris Lattner026dc962009-02-14 07:37:35 +000013typedef int __attribute__((dllexport)) type6; // expected-warning{{'dllexport' attribute only applies to variable and function types}}
Anton Korobeynikov2f402702008-12-26 00:52:02 +000014
Chris Lattner026dc962009-02-14 07:37:35 +000015typedef int __attribute__((dllimport)) type7; // expected-warning{{'dllimport' attribute only applies to variable and function}}
Anton Korobeynikov2f402702008-12-26 00:52:02 +000016
17void __attribute__((dllimport)) foo6();
18void foo6(){} // expected-warning {{'foo6' redeclared without dllimport attribute: previous dllimport ignored}}