diff options
author | dim <dim@FreeBSD.org> | 2016-01-06 20:02:26 +0000 |
---|---|---|
committer | dim <dim@FreeBSD.org> | 2016-01-06 20:02:26 +0000 |
commit | fc74ff5a0792641885551a63d9ddf8cbfdf76e3c (patch) | |
tree | 955a1295c3fd4378a49478ad5835ca21b769417e /test/Sema | |
parent | 3176e97f130184ece0e1a21352c8124cc83ff24a (diff) | |
download | FreeBSD-src-fc74ff5a0792641885551a63d9ddf8cbfdf76e3c.zip FreeBSD-src-fc74ff5a0792641885551a63d9ddf8cbfdf76e3c.tar.gz |
Vendor import of clang trunk r256945:
https://llvm.org/svn/llvm-project/cfe/trunk@256945
Diffstat (limited to 'test/Sema')
-rw-r--r-- | test/Sema/attr-ownership.c | 12 | ||||
-rw-r--r-- | test/Sema/implicit-builtin-freestanding.c | 2 | ||||
-rw-r--r-- | test/Sema/warn-documentation-crlf.c | 26 |
3 files changed, 21 insertions, 19 deletions
diff --git a/test/Sema/attr-ownership.c b/test/Sema/attr-ownership.c index f7969d4..fa21b03 100644 --- a/test/Sema/attr-ownership.c +++ b/test/Sema/attr-ownership.c @@ -9,7 +9,7 @@ void f6(void) __attribute__((ownership_holds(foo, 1, 2, 3))); // expected-error void f7(void) __attribute__((ownership_takes(foo))); // expected-error {{'ownership_takes' attribute takes at least 2 arguments}} void f8(int *i, int *j, int k) __attribute__((ownership_holds(foo, 1, 2, 4))); // expected-error {{'ownership_holds' attribute parameter 3 is out of bounds}} -int f9 __attribute__((ownership_takes(foo, 1))); // expected-warning {{'ownership_takes' attribute only applies to non-K&R-style functions}}
+int f9 __attribute__((ownership_takes(foo, 1))); // expected-warning {{'ownership_takes' attribute only applies to non-K&R-style functions}} void f10(int i) __attribute__((ownership_holds(foo, 1))); // expected-error {{'ownership_holds' attribute only applies to pointer arguments}} void *f11(float i) __attribute__((ownership_returns(foo, 1))); // expected-error {{'ownership_returns' attribute only applies to integer arguments}} @@ -19,8 +19,8 @@ void f13(int *i, int *j) __attribute__((ownership_holds(foo, 1))) __attribute__( void f14(int i, int j, int *k) __attribute__((ownership_holds(foo, 3))) __attribute__((ownership_takes(foo, 3))); // expected-error {{'ownership_holds' and 'ownership_takes' attributes are not compatible}} void f15(int, int) - __attribute__((ownership_returns(foo, 1))) // expected-note {{declared with index 1 here}}
- __attribute__((ownership_returns(foo, 2))); // expected-error {{'ownership_returns' attribute index does not match; here it is 2}}
-void f16(int *i, int *j) __attribute__((ownership_holds(foo, 1))) __attribute__((ownership_holds(foo, 1))); // OK, same index
-void f17(void*) __attribute__((ownership_takes(__, 1)));
-void f18() __attribute__((ownership_takes(foo, 1))); // expected-warning {{'ownership_takes' attribute only applies to non-K&R-style functions}}
+ __attribute__((ownership_returns(foo, 1))) // expected-note {{declared with index 1 here}} + __attribute__((ownership_returns(foo, 2))); // expected-error {{'ownership_returns' attribute index does not match; here it is 2}} +void f16(int *i, int *j) __attribute__((ownership_holds(foo, 1))) __attribute__((ownership_holds(foo, 1))); // OK, same index +void f17(void*) __attribute__((ownership_takes(__, 1))); +void f18() __attribute__((ownership_takes(foo, 1))); // expected-warning {{'ownership_takes' attribute only applies to non-K&R-style functions}} diff --git a/test/Sema/implicit-builtin-freestanding.c b/test/Sema/implicit-builtin-freestanding.c index 385cf1f..f77bccc 100644 --- a/test/Sema/implicit-builtin-freestanding.c +++ b/test/Sema/implicit-builtin-freestanding.c @@ -1,4 +1,6 @@ // RUN: %clang_cc1 -fsyntax-only -verify -ffreestanding %s +// RUN: %clang_cc1 -fsyntax-only -verify -fno-builtin %s +// RUN: %clang_cc1 -fsyntax-only -verify -fno-builtin-malloc %s // expected-no-diagnostics int malloc(int a) { return a; } diff --git a/test/Sema/warn-documentation-crlf.c b/test/Sema/warn-documentation-crlf.c index 99c0714..474901b 100644 --- a/test/Sema/warn-documentation-crlf.c +++ b/test/Sema/warn-documentation-crlf.c @@ -1,13 +1,13 @@ -// RUN: %clang_cc1 -fsyntax-only -Wdocumentation %s
-// The run line does not have '-verify' because we were crashing while printing
-// the diagnostic.
-
-// This file has DOS-style line endings (CR LF). Please don't change it to
-// Unix-style LF!
-
-// PR14591. Check that we don't crash on this.
-/**
- * @param abc
- */
-void nocrash1(int qwerty);
-
+// RUN: %clang_cc1 -fsyntax-only -Wdocumentation %s +// The run line does not have '-verify' because we were crashing while printing +// the diagnostic. + +// This file has DOS-style line endings (CR LF). Please don't change it to +// Unix-style LF! + +// PR14591. Check that we don't crash on this. +/** + * @param abc + */ +void nocrash1(int qwerty); + |