2011-07-09 04:17:28 +08:00
|
|
|
// Basic test
|
2011-02-24 07:52:14 +08:00
|
|
|
// RUN: rm -rf %t.dir
|
2011-02-24 10:39:40 +08:00
|
|
|
// RUN: mkdir -p %t.dir/a/b
|
|
|
|
// RUN: echo > %t.dir/a/b/x.h
|
|
|
|
// RUN: cd %t.dir
|
2011-07-09 04:17:28 +08:00
|
|
|
// RUN: %clang -MD -MF - %s -fsyntax-only -I a/b | FileCheck -check-prefix=CHECK-ONE %s
|
2018-09-13 22:27:32 +08:00
|
|
|
// CHECK-ONE: {{ }}a{{[/\\]}}b{{[/\\]}}x.h
|
2011-07-09 04:17:28 +08:00
|
|
|
|
|
|
|
// PR8974 (-include flag)
|
|
|
|
// RUN: %clang -MD -MF - %s -fsyntax-only -include a/b/x.h -DINCLUDE_FLAG_TEST | FileCheck -check-prefix=CHECK-TWO %s
|
2018-09-13 22:27:32 +08:00
|
|
|
// CHECK-TWO: {{ }}a{{[/\\]}}b{{[/\\]}}x.h
|
2011-07-09 04:17:28 +08:00
|
|
|
|
|
|
|
// rdar://problem/9734352 (paths involving ".")
|
|
|
|
// RUN: %clang -MD -MF - %s -fsyntax-only -I ./a/b | FileCheck -check-prefix=CHECK-THREE %s
|
2018-09-13 22:27:32 +08:00
|
|
|
// CHECK-THREE: {{ }}a{{[/\\]}}b{{[/\\]}}x.h
|
2011-07-09 04:17:28 +08:00
|
|
|
// RUN: %clang -MD -MF - %s -fsyntax-only -I .//./a/b/ | FileCheck -check-prefix=CHECK-FOUR %s
|
2018-09-13 22:27:32 +08:00
|
|
|
// CHECK-FOUR: {{ }}a{{[/\\]}}b{{[/\\]}}x.h
|
2011-07-09 04:17:28 +08:00
|
|
|
// RUN: %clang -MD -MF - %s -fsyntax-only -I a/b/. | FileCheck -check-prefix=CHECK-FIVE %s
|
2018-09-13 22:27:32 +08:00
|
|
|
// CHECK-FIVE: {{ }}a{{[/\\]}}b{{[/\\]}}.{{[/\\]}}x.h
|
2011-07-09 04:17:28 +08:00
|
|
|
// RUN: cd a/b
|
|
|
|
// RUN: %clang -MD -MF - %s -fsyntax-only -I ./ | FileCheck -check-prefix=CHECK-SIX %s
|
|
|
|
// CHECK-SIX: {{ }}x.h
|
2021-05-04 21:50:43 +08:00
|
|
|
// RUN: echo "fun:foo" > %t.ignorelist
|
|
|
|
// RUN: %clang -MD -MF - %s -fsyntax-only -resource-dir=%S/Inputs/resource_dir_with_sanitizer_ignorelist -fsanitize=undefined -flto -fvisibility=hidden -fsanitize-ignorelist=%t.ignorelist -I ./ | FileCheck -check-prefix=CHECK-SEVEN %s
|
|
|
|
// CHECK-SEVEN: .ignorelist
|
2015-08-13 12:04:37 +08:00
|
|
|
// CHECK-SEVEN: {{ }}x.h
|
2011-07-09 04:17:28 +08:00
|
|
|
#ifndef INCLUDE_FLAG_TEST
|
|
|
|
#include <x.h>
|
|
|
|
#endif
|
2019-11-09 06:16:15 +08:00
|
|
|
|
2021-05-04 21:50:43 +08:00
|
|
|
// RUN: echo "fun:foo" > %t.ignorelist1
|
|
|
|
// RUN: echo "fun:foo" > %t.ignorelist2
|
|
|
|
// RUN: %clang -MD -MF - %s -fsyntax-only -resource-dir=%S/Inputs/resource_dir_with_sanitizer_ignorelist -fsanitize=undefined -flto -fvisibility=hidden -fsanitize-ignorelist=%t.ignorelist1 -fsanitize-ignorelist=%t.ignorelist2 -I ./ | FileCheck -check-prefix=TWO-IGNORE-LISTS %s
|
|
|
|
// TWO-IGNORE-LISTS: dependency-gen.o:
|
|
|
|
// TWO-IGNORE-LISTS-DAG: ignorelist1
|
|
|
|
// TWO-IGNORE-LISTS-DAG: ignorelist2
|
|
|
|
// TWO-IGNORE-LISTS-DAG: x.h
|
|
|
|
// TWO-IGNORE-LISTS-DAG: dependency-gen.c
|
2019-11-09 06:16:15 +08:00
|
|
|
|
2021-05-04 21:50:43 +08:00
|
|
|
// RUN: %clang -MD -MF - %s -fsyntax-only -resource-dir=%S/Inputs/resource_dir_with_sanitizer_ignorelist -fsanitize=undefined -flto -fvisibility=hidden -I ./ | FileCheck -check-prefix=USER-AND-SYS-DEPS %s
|
2019-11-09 06:16:15 +08:00
|
|
|
// USER-AND-SYS-DEPS: dependency-gen.o:
|
2021-05-04 21:50:43 +08:00
|
|
|
// USER-AND-SYS-DEPS-DAG: ubsan_ignorelist.txt
|
2019-11-09 06:16:15 +08:00
|
|
|
|
2021-05-04 21:50:43 +08:00
|
|
|
// RUN: %clang -MMD -MF - %s -fsyntax-only -resource-dir=%S/Inputs/resource_dir_with_sanitizer_ignorelist -fsanitize=undefined -flto -fvisibility=hidden -I ./ | FileCheck -check-prefix=ONLY-USER-DEPS %s
|
2019-11-09 06:16:15 +08:00
|
|
|
// ONLY-USER-DEPS: dependency-gen.o:
|
2021-05-04 21:50:43 +08:00
|
|
|
// NOT-ONLY-USER-DEPS: ubsan_ignorelist.txt
|