diff options
author | Aaron Ballman <aaron@aaronballman.com> | 2013-11-21 01:50:40 +0000 |
---|---|---|
committer | Aaron Ballman <aaron@aaronballman.com> | 2013-11-21 01:50:40 +0000 |
commit | b2dbde5962eb4f3c21c17d18af81a19770f49d94 (patch) | |
tree | 1ac739b92643d578dcdec23a71394db0f53390da /test/Sema | |
parent | 884e34114c0178a6bb8ae6f85c27f90e489536c8 (diff) | |
download | clang-b2dbde5962eb4f3c21c17d18af81a19770f49d94.tar.gz |
Refactored integer argument checking code into a helper method. Removes a considerable amount of duplicated code.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@195302 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Sema')
-rw-r--r-- | test/Sema/constructor-attribute.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/test/Sema/constructor-attribute.c b/test/Sema/constructor-attribute.c index 382591654d..6a950979d3 100644 --- a/test/Sema/constructor-attribute.c +++ b/test/Sema/constructor-attribute.c @@ -4,12 +4,12 @@ int x __attribute__((constructor)); // expected-warning {{'constructor' attribut int f() __attribute__((constructor)); int f() __attribute__((constructor(1))); int f() __attribute__((constructor(1,2))); // expected-error {{attribute takes no more than 1 argument}} -int f() __attribute__((constructor(1.0))); // expected-error {{'constructor' attribute requires parameter 1 to be an integer constant}} +int f() __attribute__((constructor(1.0))); // expected-error {{'constructor' attribute requires an integer constant}} int x __attribute__((destructor)); // expected-warning {{'destructor' attribute only applies to functions}} int f() __attribute__((destructor)); int f() __attribute__((destructor(1))); int f() __attribute__((destructor(1,2))); // expected-error {{attribute takes no more than 1 argument}} -int f() __attribute__((destructor(1.0))); // expected-error {{'destructor' attribute requires parameter 1 to be an integer constant}} +int f() __attribute__((destructor(1.0))); // expected-error {{'destructor' attribute requires an integer constant}} |