summaryrefslogtreecommitdiffstats
path: root/clang/test/Sema/alloc-size.c
diff options
context:
space:
mode:
authorChandler Carruth <chandlerc@gmail.com>2016-12-20 08:28:19 +0000
committerChandler Carruth <chandlerc@gmail.com>2016-12-20 08:28:19 +0000
commitd7738fe6ad9739e750127080a22294df39307429 (patch)
tree9698fe0b95d43a9d6f1566fdd999cc759f2d79f5 /clang/test/Sema/alloc-size.c
parent881989cb69c405ca92ddabccea547d91491a2d14 (diff)
downloadbcm5719-llvm-d7738fe6ad9739e750127080a22294df39307429.tar.gz
bcm5719-llvm-d7738fe6ad9739e750127080a22294df39307429.zip
Revert r290149: Add the alloc_size attribute to clang.
This commit fails MSan when running test/CodeGen/object-size.c in a confusing way. After some discussion with George, it isn't really clear what is going on here. We can make the MSan failure go away by testing for the invalid bit, but *why* things are invalid isn't clear. And yet, other code in the surrounding area is doing precisely this and testing for invalid. George is going to take a closer look at this to better understand the nature of the failure and recommit it, for now backing it out to clean up MSan builds. llvm-svn: 290169
Diffstat (limited to 'clang/test/Sema/alloc-size.c')
-rw-r--r--clang/test/Sema/alloc-size.c23
1 files changed, 0 insertions, 23 deletions
diff --git a/clang/test/Sema/alloc-size.c b/clang/test/Sema/alloc-size.c
deleted file mode 100644
index 600ef6870e9..00000000000
--- a/clang/test/Sema/alloc-size.c
+++ /dev/null
@@ -1,23 +0,0 @@
-// RUN: %clang_cc1 %s -verify
-
-void *fail1(int a) __attribute__((alloc_size)); //expected-error{{'alloc_size' attribute takes at least 1 argument}}
-void *fail2(int a) __attribute__((alloc_size())); //expected-error{{'alloc_size' attribute takes at least 1 argument}}
-
-void *fail3(int a) __attribute__((alloc_size(0))); //expected-error{{'alloc_size' attribute parameter 0 is out of bounds}}
-void *fail4(int a) __attribute__((alloc_size(2))); //expected-error{{'alloc_size' attribute parameter 2 is out of bounds}}
-
-void *fail5(int a, int b) __attribute__((alloc_size(0, 1))); //expected-error{{'alloc_size' attribute parameter 0 is out of bounds}}
-void *fail6(int a, int b) __attribute__((alloc_size(3, 1))); //expected-error{{'alloc_size' attribute parameter 3 is out of bounds}}
-
-void *fail7(int a, int b) __attribute__((alloc_size(1, 0))); //expected-error{{'alloc_size' attribute parameter 0 is out of bounds}}
-void *fail8(int a, int b) __attribute__((alloc_size(1, 3))); //expected-error{{'alloc_size' attribute parameter 3 is out of bounds}}
-
-int fail9(int a) __attribute__((alloc_size(1))); //expected-warning{{'alloc_size' attribute only applies to return values that are pointers}}
-
-int fail10 __attribute__((alloc_size(1))); //expected-warning{{'alloc_size' attribute only applies to non-K&R-style functions}}
-
-void *fail11(void *a) __attribute__((alloc_size(1))); //expected-error{{'alloc_size' attribute argument may only refer to a function parameter of integer type}}
-
-void *fail12(int a) __attribute__((alloc_size("abc"))); //expected-error{{'alloc_size' attribute requires parameter 1 to be an integer constant}}
-void *fail12(int a) __attribute__((alloc_size(1, "abc"))); //expected-error{{'alloc_size' attribute requires parameter 2 to be an integer constant}}
-void *fail13(int a) __attribute__((alloc_size(1U<<31))); //expected-error{{integer constant expression evaluates to value 2147483648 that cannot be represented in a 32-bit signed integer type}}
OpenPOWER on IntegriCloud