[clang] Handle __declspec() attributes in using
[llvm-project.git] / clang / test / Driver / no-knr-functions.c
blob5ebcc8916be674bb86b50cc4149ad18cd2d34d91
1 // Ensure that we cannot disable strict prototypes, no matter how hard we try.
3 // RUN: not %clang -fno-no-knr-functions -x c++ %s 2>&1 | FileCheck --check-prefixes=NONO %s
4 // RUN: not %clang -fno-no-knr-functions -x c %s 2>&1 | FileCheck --check-prefixes=NONO %s
5 // RUN: not %clang -fno-no-knr-functions -std=c89 -x c %s 2>&1 | FileCheck --check-prefixes=NONO %s
6 // RUN: not %clang -fknr-functions -x c++ %s 2>&1 | FileCheck --check-prefixes=POS %s
7 // RUN: not %clang -fknr-functions -x c %s 2>&1 | FileCheck --check-prefixes=POS %s
8 // RUN: not %clang -fknr-functions -std=c89 -x c %s 2>&1 | FileCheck --check-prefixes=POS %s
10 // Ensure that the driver flag is actually accepted though.
11 // RUN: %clang -fno-knr-functions -### %s 2>&1 | FileCheck --check-prefixes=ACCEPTED %s
13 // NONO: error: unknown argument: '-fno-no-knr-functions'
14 // POS: error: unknown argument: '-fknr-functions'
15 // ACCEPTED-NOT: warning: argument unused during compilation: '-fno-knr-functions'