Peter Collingbourne | 470d942 | 2015-05-13 22:07:22 +0000 | [diff] [blame] | 1 | // RUN: %clang_cc1 -std=c89 -fsyntax-only -x c -E -dM %s | FileCheck --check-prefix=GNU-INLINE %s |
| 2 | // RUN: %clang_cc1 -std=c99 -fsyntax-only -x c -E -dM %s | FileCheck --check-prefix=STDC-INLINE %s |
| 3 | // RUN: %clang_cc1 -std=c99 -fgnu89-inline -fsyntax-only -x c -E -dM %s | FileCheck --check-prefix=GNU-INLINE %s |
| 4 | // RUN: %clang_cc1 -fsyntax-only -x c++ -E -dM %s | FileCheck --check-prefix=GNU-INLINE %s |
| 5 | // RUN: not %clang_cc1 -fgnu89-inline -fsyntax-only -x c++ %s 2>&1 | FileCheck --check-prefix=CXX %s |
Richard Smith | b0fe704 | 2017-04-26 23:44:33 +0000 | [diff] [blame] | 6 | // RUN: not %clang_cc1 -fgnu89-inline -fsyntax-only -x objective-c++ %s 2>&1 | FileCheck --check-prefix=OBJCXX %s |
Peter Collingbourne | 470d942 | 2015-05-13 22:07:22 +0000 | [diff] [blame] | 7 | |
Richard Smith | b0fe704 | 2017-04-26 23:44:33 +0000 | [diff] [blame] | 8 | // CXX: '-fgnu89-inline' not allowed with 'C++' |
| 9 | // OBJCXX: '-fgnu89-inline' not allowed with 'Objective-C++' |
Peter Collingbourne | 470d942 | 2015-05-13 22:07:22 +0000 | [diff] [blame] | 10 | |
| 11 | // STDC-INLINE-NOT: __GNUC_GNU_INLINE__ |
| 12 | // STDC-INLINE: #define __GNUC_STDC_INLINE__ 1 |
| 13 | // STDC-INLINE-NOT: __GNUC_GNU_INLINE__ |
| 14 | |
| 15 | // GNU-INLINE-NOT: __GNUC_STDC_INLINE__ |
| 16 | // GNU-INLINE: #define __GNUC_GNU_INLINE__ 1 |
| 17 | // GNU-INLINE-NOT: __GNUC_STDC_INLINE__ |