Daniel Dunbar | d7d5f02 | 2009-03-24 02:24:46 +0000 | [diff] [blame] | 1 | // RUN: clang-cc -fsyntax-only -verify %s |
Anton Korobeynikov | 2f40270 | 2008-12-26 00:52:02 +0000 | [diff] [blame] | 2 | |
| 3 | inline void __attribute__((dllexport)) foo1(){} // expected-warning{{dllexport attribute ignored}} |
| 4 | inline void __attribute__((dllimport)) foo2(){} // expected-warning{{dllimport attribute ignored}} |
| 5 | |
| 6 | void __attribute__((dllimport)) foo3(){} // expected-error{{dllimport attribute can be applied only to symbol declaration}} |
| 7 | |
| 8 | void __attribute__((dllimport, dllexport)) foo4(); // expected-warning{{dllimport attribute ignored}} |
| 9 | |
| 10 | void __attribute__((dllexport)) foo5(); |
| 11 | void __attribute__((dllimport)) foo5(); // expected-warning{{dllimport attribute ignored}} |
| 12 | |
Chris Lattner | 026dc96 | 2009-02-14 07:37:35 +0000 | [diff] [blame] | 13 | typedef int __attribute__((dllexport)) type6; // expected-warning{{'dllexport' attribute only applies to variable and function types}} |
Anton Korobeynikov | 2f40270 | 2008-12-26 00:52:02 +0000 | [diff] [blame] | 14 | |
Chris Lattner | 026dc96 | 2009-02-14 07:37:35 +0000 | [diff] [blame] | 15 | typedef int __attribute__((dllimport)) type7; // expected-warning{{'dllimport' attribute only applies to variable and function}} |
Anton Korobeynikov | 2f40270 | 2008-12-26 00:52:02 +0000 | [diff] [blame] | 16 | |
| 17 | void __attribute__((dllimport)) foo6(); |
| 18 | void foo6(){} // expected-warning {{'foo6' redeclared without dllimport attribute: previous dllimport ignored}} |