File: experimental_diagnostics_unreferenced_cmacros.swift

package info (click to toggle)
swiftlang 6.0.3-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 2,519,992 kB
  • sloc: cpp: 9,107,863; ansic: 2,040,022; asm: 1,135,751; python: 296,500; objc: 82,456; f90: 60,502; lisp: 34,951; pascal: 19,946; sh: 18,133; perl: 7,482; ml: 4,937; javascript: 4,117; makefile: 3,840; awk: 3,535; xml: 914; fortran: 619; cs: 573; ruby: 573
file content (32 lines) | stat: -rw-r--r-- 2,954 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
// RUN: not %target-swift-frontend(mock-sdk: %clang-importer-sdk) -typecheck %s 2>&1 | %FileCheck %s --strict-whitespace

import macros

_ = INVALID_INTEGER_LITERAL_2

// Test that experimental diagnostics for the function like macro in the same header is suppressed.
// CHECK: macros.h:{{[0-9]+}}:{{[0-9]+}}: note: macro 'INVALID_INTEGER_LITERAL_2' unavailable (cannot import)
// CHECK-NOT: macros.h:{{[0-9]+}}:{{[0-9]+}}: note: macro 'FUNC_LIKE_MACRO' not imported: function like macros not supported
// CHECK-NOT: #define FUNC_LIKE_MACRO() 0
// CHECK-NOT: macros.h:{{[0-9]+}}:{{[0-9]+}}: note: macro 'FUNC_LIKE_MACRO' not imported: function like macros not supported
// CHECK-NOT: macros.h:{{[0-9]+}}:{{[0-9]+}}: note: macro 'INVALID_ARITHMETIC_1' unavailable (cannot import)
// CHECK-NOT: macros.h:{{[0-9]+}}:{{[0-9]+}}: note: invalid arithmetic operand; only valid integers supported
// CHECK-NOT: macros.h:{{[0-9]+}}:{{[0-9]+}}: note: macro 'INVALID_ARITHMETIC_2' unavailable (cannot import)
// CHECK-NOT: macros.h:{{[0-9]+}}:{{[0-9]+}}: note: invalid arithmetic operand; only valid integers supported
// CHECK-NOT: macros.h:{{[0-9]+}}:{{[0-9]+}}: note: macro 'INVALID_ARITHMETIC_3' unavailable (cannot import)
// CHECK-NOT: macros.h:{{[0-9]+}}:{{[0-9]+}}: note: invalid arithmetic operand; only valid integers supported
// CHECK-NOT: macros.h:{{[0-9]+}}:{{[0-9]+}}: note: macro 'INVALID_ARITHMETIC_4' unavailable (cannot import)
// CHECK-NOT: macros.h:{{[0-9]+}}:{{[0-9]+}}: note: invalid arithmetic operand; only valid integers supported
// CHECK-NOT: macros.h:{{[0-9]+}}:{{[0-9]+}}: note: macro 'INVALID_ARITHMETIC_5' unavailable (cannot import)
// CHECK-NOT: macros.h:{{[0-9]+}}:{{[0-9]+}}: note: invalid arithmetic operand; only valid integers supported
// CHECK-NOT: macros.h:{{[0-9]+}}:{{[0-9]+}}: note: macro 'INVALID_ARITHMETIC_6' unavailable (cannot import)
// CHECK-NOT: macros.h:{{[0-9]+}}:{{[0-9]+}}: note: invalid arithmetic operand; only valid integers supported
// CHECK-NOT: macros.h:{{[0-9]+}}:{{[0-9]+}}: note: macro 'INVALID_ARITHMETIC_7' unavailable (cannot import)
// CHECK-NOT: macros.h:{{[0-9]+}}:{{[0-9]+}}: note: operator '%' not supported in macro arithmetic
// CHECK-NOT: macros.h:{{[0-9]+}}:{{[0-9]+}}: note: macro 'CHAR_LITERAL' unavailable (cannot import)
// CHECK-NOT: macros.h:{{[0-9]+}}:{{[0-9]+}}: note: only numeric and string macro literals supported
// CHECK-NOT: macros.h:{{[0-9]+}}:{{[0-9]+}}: note: macro 'UNSUPPORTED_1' not imported: structure not supported
// CHECK-NOT: macros.h:{{[0-9]+}}:{{[0-9]+}}: note: macro 'UNSUPPORTED_2' not imported: structure not supported
// CHECK-NOT: macros.h:{{[0-9]+}}:{{[0-9]+}}: note: macro 'UNSUPPORTED_3' not imported: structure not supported
// CHECK-NOT: macros.h:{{[0-9]+}}:{{[0-9]+}}: note: macro 'UNSUPPORTED_4' not imported: structure not supported
// CHECK-NOT: macros.h:{{[0-9]+}}:{{[0-9]+}}: note: macro 'UNSUPPORTED_5' not imported: structure not supported