summaryrefslogtreecommitdiffstats
path: root/clang/test/Sema/constructor-attribute.c
diff options
context:
space:
mode:
authorAaron Ballman <aaron@aaronballman.com>2014-07-22 14:09:34 +0000
committerAaron Ballman <aaron@aaronballman.com>2014-07-22 14:09:34 +0000
commitadfdde5ba6b8072d4f3e5894edab12d6d10e0395 (patch)
tree0764dbe794ae930dca0dda611b628b7856673c3e /clang/test/Sema/constructor-attribute.c
parent446867ee4e831ba8df0bbe46762e57b20993c035 (diff)
downloadbcm5719-llvm-adfdde5ba6b8072d4f3e5894edab12d6d10e0395.tar.gz
bcm5719-llvm-adfdde5ba6b8072d4f3e5894edab12d6d10e0395.zip
Improve the checkUInt32Argument() helper function so that it diagnoses integer constants larger than 32-bits.
llvm-svn: 213658
Diffstat (limited to 'clang/test/Sema/constructor-attribute.c')
-rw-r--r--clang/test/Sema/constructor-attribute.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/clang/test/Sema/constructor-attribute.c b/clang/test/Sema/constructor-attribute.c
index 1bb69fc4aa5..9460c75e32a 100644
--- a/clang/test/Sema/constructor-attribute.c
+++ b/clang/test/Sema/constructor-attribute.c
@@ -5,6 +5,7 @@ int f() __attribute__((constructor));
int f() __attribute__((constructor(1)));
int f() __attribute__((constructor(1,2))); // expected-error {{'constructor' attribute takes no more than 1 argument}}
int f() __attribute__((constructor(1.0))); // expected-error {{'constructor' attribute requires an integer constant}}
+int f() __attribute__((constructor(0x100000000))); // expected-error {{integer constant is larger than the largest 32-bit unsigned integer type}}
int x __attribute__((destructor)); // expected-warning {{'destructor' attribute only applies to functions}}
int f() __attribute__((destructor));
OpenPOWER on IntegriCloud