Home | History | Annotate | Download | only in Frontend
      1 // Basic test
      2 // RUN: rm -rf %t.dir
      3 // RUN: mkdir -p %t.dir/a/b
      4 // RUN: echo > %t.dir/a/b/x.h
      5 // RUN: cd %t.dir
      6 // RUN: %clang -MD -MF - %s -fsyntax-only -I a/b | FileCheck -check-prefix=CHECK-ONE %s
      7 // CHECK-ONE: {{ }}a/b{{[/\\]}}x.h
      8 
      9 // PR8974 (-include flag)
     10 // RUN: %clang -MD -MF - %s -fsyntax-only -include a/b/x.h -DINCLUDE_FLAG_TEST | FileCheck -check-prefix=CHECK-TWO %s
     11 // CHECK-TWO: {{ }}a/b/x.h
     12 
     13 // rdar://problem/9734352 (paths involving ".")
     14 // RUN: %clang -MD -MF - %s -fsyntax-only -I ./a/b | FileCheck -check-prefix=CHECK-THREE %s
     15 // CHECK-THREE: {{ }}a/b{{[/\\]}}x.h
     16 // RUN: %clang -MD -MF - %s -fsyntax-only -I .//./a/b/ | FileCheck -check-prefix=CHECK-FOUR %s
     17 // CHECK-FOUR: {{ }}a/b{{[/\\]}}x.h
     18 // RUN: %clang -MD -MF - %s -fsyntax-only -I a/b/. | FileCheck -check-prefix=CHECK-FIVE %s
     19 // CHECK-FIVE: {{ }}a/b/.{{[/\\]}}x.h
     20 // RUN: cd a/b
     21 // RUN: %clang -MD -MF - %s -fsyntax-only -I ./ | FileCheck -check-prefix=CHECK-SIX %s
     22 // CHECK-SIX: {{ }}x.h
     23 // RUN: echo "fun:foo" > %t.blacklist
     24 // RUN: %clang -MD -MF - %s -fsyntax-only -fsanitize=cfi-vcall -flto -fvisibility=hidden -fsanitize-blacklist=%t.blacklist -I ./ | FileCheck -check-prefix=CHECK-SEVEN %s
     25 // CHECK-SEVEN: .blacklist
     26 // CHECK-SEVEN: {{ }}x.h
     27 #ifndef INCLUDE_FLAG_TEST
     28 #include <x.h>
     29 #endif
     30