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
|
2015-08-13 12:04:37 +08:00
|
|
|
// RUN: echo "fun:foo" > %t.blacklist
|
2020-01-15 03:12:32 +08:00
|
|
|
// RUN: %clang -MD -MF - %s -fsyntax-only -resource-dir=%S/Inputs/resource_dir_with_sanitizer_blacklist -fsanitize=undefined -flto -fvisibility=hidden -fsanitize-blacklist=%t.blacklist -I ./ | FileCheck -check-prefix=CHECK-SEVEN %s
|
2015-08-13 12:04:37 +08:00
|
|
|
// CHECK-SEVEN: .blacklist
|
|
|
|
// 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
|
|
|
|
|
|
|
// RUN: echo "fun:foo" > %t.blacklist1
|
|
|
|
// RUN: echo "fun:foo" > %t.blacklist2
|
2020-01-15 03:12:32 +08:00
|
|
|
// RUN: %clang -MD -MF - %s -fsyntax-only -resource-dir=%S/Inputs/resource_dir_with_sanitizer_blacklist -fsanitize=undefined -flto -fvisibility=hidden -fsanitize-blacklist=%t.blacklist1 -fsanitize-blacklist=%t.blacklist2 -I ./ | FileCheck -check-prefix=TWO-BLACK-LISTS %s
|
2019-11-09 06:16:15 +08:00
|
|
|
// TWO-BLACK-LISTS: dependency-gen.o:
|
|
|
|
// TWO-BLACK-LISTS-DAG: blacklist1
|
|
|
|
// TWO-BLACK-LISTS-DAG: blacklist2
|
|
|
|
// TWO-BLACK-LISTS-DAG: x.h
|
|
|
|
// TWO-BLACK-LISTS-DAG: dependency-gen.c
|
|
|
|
|
2020-01-15 03:12:32 +08:00
|
|
|
// RUN: %clang -MD -MF - %s -fsyntax-only -resource-dir=%S/Inputs/resource_dir_with_sanitizer_blacklist -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:
|
2020-01-15 03:12:32 +08:00
|
|
|
// USER-AND-SYS-DEPS-DAG: ubsan_blacklist.txt
|
2019-11-09 06:16:15 +08:00
|
|
|
|
2020-01-15 03:12:32 +08:00
|
|
|
// RUN: %clang -MMD -MF - %s -fsyntax-only -resource-dir=%S/Inputs/resource_dir_with_sanitizer_blacklist -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:
|
2020-01-15 03:12:32 +08:00
|
|
|
// NOT-ONLY-USER-DEPS: ubsan_blacklist.txt
|