diff options
author | dim <dim@FreeBSD.org> | 2015-01-18 16:23:48 +0000 |
---|---|---|
committer | dim <dim@FreeBSD.org> | 2015-01-18 16:23:48 +0000 |
commit | c86b984ea8ecb3e944dc3de48539f4c1f65851ea (patch) | |
tree | 3eb853da77d46cc77c4b017525a422f9ddb1385b /test/SemaCXX/attr-optnone.cpp | |
parent | c696171ff15f0ee60dea4abfd99a135473c95656 (diff) | |
download | FreeBSD-src-c86b984ea8ecb3e944dc3de48539f4c1f65851ea.zip FreeBSD-src-c86b984ea8ecb3e944dc3de48539f4c1f65851ea.tar.gz |
Vendor import of clang RELEASE_360/rc1 tag r226102 (effectively, 3.6.0 RC1):
https://llvm.org/svn/llvm-project/cfe/tags/RELEASE_360/rc1@226102
Diffstat (limited to 'test/SemaCXX/attr-optnone.cpp')
-rw-r--r-- | test/SemaCXX/attr-optnone.cpp | 38 |
1 files changed, 32 insertions, 6 deletions
diff --git a/test/SemaCXX/attr-optnone.cpp b/test/SemaCXX/attr-optnone.cpp index eaa5000..58776ca 100644 --- a/test/SemaCXX/attr-optnone.cpp +++ b/test/SemaCXX/attr-optnone.cpp @@ -3,11 +3,37 @@ int foo() __attribute__((optnone)); int bar() __attribute__((optnone)) __attribute__((noinline)); -int baz() __attribute__((always_inline)) __attribute__((optnone)); // expected-error{{'always_inline' and 'optnone' attributes are not compatible}} -int quz() __attribute__((optnone)) __attribute__((always_inline)); // expected-error{{'optnone' and 'always_inline' attributes are not compatible}} +int baz() __attribute__((always_inline)) __attribute__((optnone)); // expected-warning{{'always_inline' attribute ignored}} expected-note{{conflicting attribute is here}} +int quz() __attribute__((optnone)) __attribute__((always_inline)); // expected-warning{{'always_inline' attribute ignored}} expected-note{{conflicting attribute is here}} -__forceinline __attribute__((optnone)) int bax(); // expected-error{{'__forceinline' and 'optnone' attributes are not compatible}} -__attribute__((optnone)) __forceinline int qux(); // expected-error{{'optnone' and '__forceinline' attributes are not compatible}} +__attribute__((always_inline)) int baz1(); // expected-warning{{'always_inline' attribute ignored}} +__attribute__((optnone)) int baz1() { return 1; } // expected-note{{conflicting attribute is here}} + +__attribute__((optnone)) int quz1(); // expected-note{{conflicting attribute is here}} +__attribute__((always_inline)) int quz1() { return 1; } // expected-warning{{'always_inline' attribute ignored}} + +int bay() __attribute__((minsize)) __attribute__((optnone)); // expected-warning{{'minsize' attribute ignored}} expected-note{{conflicting}} +int quy() __attribute__((optnone)) __attribute__((minsize)); // expected-warning{{'minsize' attribute ignored}} expected-note{{conflicting}} + +__attribute__((minsize)) int bay1(); // expected-warning{{'minsize' attribute ignored}} +__attribute__((optnone)) int bay1() { return 1; } // expected-note{{conflicting attribute is here}} + +__attribute__((optnone)) int quy1(); // expected-note{{conflicting attribute is here}} +__attribute__((minsize)) int quy1() { return 1; } // expected-warning{{'minsize' attribute ignored}} + +__attribute__((always_inline)) // expected-warning{{'always_inline' attribute ignored}} + __attribute__((minsize)) // expected-warning{{'minsize' attribute ignored}} +void bay2(); +__attribute__((optnone)) // expected-note 2 {{conflicting}} +void bay2() {} + +__forceinline __attribute__((optnone)) int bax(); // expected-warning{{'__forceinline' attribute ignored}} expected-note{{conflicting}} +__attribute__((optnone)) __forceinline int qux(); // expected-warning{{'__forceinline' attribute ignored}} expected-note{{conflicting}} + +__forceinline int bax2(); // expected-warning{{'__forceinline' attribute ignored}} +__attribute__((optnone)) int bax2() { return 1; } // expected-note{{conflicting}} +__attribute__((optnone)) int qux2(); // expected-note{{conflicting}} +__forceinline int qux2() { return 1; } // expected-warning{{'__forceinline' attribute ignored}} int globalVar __attribute__((optnone)); // expected-warning{{'optnone' attribute only applies to functions}} @@ -29,8 +55,8 @@ int foo2(); [[clang::optnone]] int bar2() __attribute__((noinline)); -[[clang::optnone]] -int baz2() __attribute__((always_inline)); // expected-error{{'always_inline' and 'optnone' attributes are not compatible}} +[[clang::optnone]] // expected-note {{conflicting}} +int baz2() __attribute__((always_inline)); // expected-warning{{'always_inline' attribute ignored}} [[clang::optnone]] int globalVar2; //expected-warning{{'optnone' attribute only applies to functions}} |