print-header-includes.c 1.4 KB

1234567891011121314151617181920212223242526272829303132
  1. // RUN: %clang_cc1 -I%S -include Inputs/test3.h -E -H -o /dev/null %s 2> %t.stderr
  2. // RUN: FileCheck < %t.stderr %s
  3. // CHECK-NOT: test3.h
  4. // CHECK: . {{.*test.h}}
  5. // CHECK: .. {{.*test2.h}}
  6. // RUN: %clang_cc1 -I%S -include Inputs/test3.h --show-includes -o /dev/null %s | \
  7. // RUN: FileCheck --strict-whitespace --check-prefix=MS-STDOUT %s
  8. // MS-STDOUT-NOT: <command line>
  9. // MS-STDOUT: Note: including file: {{[^ ]*test3.h}}
  10. // MS-STDOUT: Note: including file: {{[^ ]*test.h}}
  11. // MS-STDOUT: Note: including file: {{[^ ]*test2.h}}
  12. // MS-STDOUT-NOT: Note
  13. // RUN: %clang_cc1 -I%S -include Inputs/test3.h -E --show-includes -o /dev/null %s 2> %t.stderr
  14. // RUN: FileCheck --strict-whitespace --check-prefix=MS-STDERR < %t.stderr %s
  15. // MS-STDERR-NOT: <command line>
  16. // MS-STDERR: Note: including file: {{[^ ]*test3.h}}
  17. // MS-STDERR: Note: including file: {{[^ ]*test.h}}
  18. // MS-STDERR: Note: including file: {{[^ ]*test2.h}}
  19. // MS-STDERR-NOT: Note
  20. // RUN: echo "fun:foo" > %t.blacklist
  21. // RUN: %clang_cc1 -I%S -fsanitize=address -fdepfile-entry=%t.blacklist --show-includes -o /dev/null %s | \
  22. // RUN: FileCheck --strict-whitespace --check-prefix=MS-BLACKLIST %s
  23. // MS-BLACKLIST: Note: including file: {{[^ ]*\.blacklist}}
  24. // MS-BLACKLIST: Note: including file: {{[^ ]*test.h}}
  25. // MS-BLACKLIST: Note: including file: {{[^ ]*test2.h}}
  26. // MS-BLACKLIST-NOT: Note
  27. #include "Inputs/test.h"