[clang] Handle __declspec() attributes in using
[llvm-project.git] / clang / test / ClangScanDeps / diagnostics.c
blobb5ca499192a2a4f0800347fb73249505fbe136a6
1 // RUN: rm -rf %t && mkdir %t
2 // RUN: cp %S/Inputs/diagnostics/* %t
4 // RUN: sed "s|DIR|%/t|g" %S/Inputs/diagnostics/cdb.json.template > %t/cdb.json
5 // RUN: clang-scan-deps -compilation-database %t/cdb.json -format experimental-full 2>&1 > %t/result.json
6 // RUN: cat %t/result.json | sed 's:\\\\\?:/:g' | FileCheck %s -DPREFIX=%/t
8 // Check that the '-Wno-error=invalid-ios-deployment-target' option is being
9 // respected and invalid arguments like '-target i386-apple-ios14.0-simulator'
10 // do not result in an error.
12 // CHECK-NOT: error:
13 // CHECK: {
14 // CHECK-NEXT: "modules": [
15 // CHECK-NEXT: {
16 // CHECK-NEXT: "clang-module-deps": [],
17 // CHECK-NEXT: "clang-modulemap-file": "[[PREFIX]]/module.modulemap",
18 // CHECK-NEXT: "command-line": [
19 // CHECK-NEXT: "-cc1"
20 // CHECK: ],
21 // CHECK-NEXT: "context-hash": "[[HASH_MOD:.*]]",
22 // CHECK-NEXT: "file-deps": [
23 // CHECK-NEXT: "[[PREFIX]]/mod.h"
24 // CHECK-NEXT: "[[PREFIX]]/module.modulemap"
25 // CHECK-NEXT: ],
26 // CHECK-NEXT: "name": "mod"
27 // CHECK-NEXT: }
28 // CHECK-NEXT: ],
29 // CHECK-NEXT: "translation-units": [
30 // CHECK-NEXT: {
31 // CHECK: "clang-context-hash": "[[HASH_TU:.*]],
32 // CHECK-NEXT: "clang-module-deps": [
33 // CHECK-NEXT: {
34 // CHECK-NEXT: "context-hash": "[[HASH_MOD]]",
35 // CHECK-NEXT: "module-name": "mod"
36 // CHECK-NEXT: }
37 // CHECK-NEXT: ],
38 // CHECK-NEXT: "command-line": [
39 // CHECK-NOT: "-fimplicit-modules"
40 // CHECK-NOT: "-fimplicit-module-maps"
41 // CHECK: ],
42 // CHECK: "file-deps": [
43 // CHECK-NEXT: "[[PREFIX]]/tu.c"
44 // CHECK-NEXT: ],
45 // CHECK-NEXT: "input-file": "[[PREFIX]]/tu.c"
46 // CHECK-NEXT: }