Daniel Dunbar | 8fbe78f | 2009-12-15 20:14:24 +0000 | [diff] [blame] | 1 | // RUN: %clang_cc1 %s -verify -fsyntax-only |
Anders Carlsson | 76187b4 | 2009-02-13 06:46:13 +0000 | [diff] [blame] | 2 | |
Nick Lewycky | 0859707 | 2012-07-24 01:40:49 +0000 | [diff] [blame] | 3 | int a __attribute__((nodebug)); |
| 4 | |
Paul Robinson | afd2dde | 2016-06-16 00:42:36 +0000 | [diff] [blame] | 5 | void b(int p __attribute__((nodebug))) { // expected-warning {{'nodebug' attribute only applies to variables and functions}} |
| 6 | int b __attribute__((nodebug)); |
Aaron Ballman | b724338 | 2013-07-23 19:30:11 +0000 | [diff] [blame] | 7 | } |
Anders Carlsson | 76187b4 | 2009-02-13 06:46:13 +0000 | [diff] [blame] | 8 | |
| 9 | void t1() __attribute__((nodebug)); |
| 10 | |
Aaron Ballman | b724338 | 2013-07-23 19:30:11 +0000 | [diff] [blame] | 11 | void t2() __attribute__((nodebug(2))); // expected-error {{'nodebug' attribute takes no arguments}} |