absolute-paths.c 817 B

1234567891011121314151617
  1. // RUN: %clang_cc1 -fsyntax-only -I %S/Inputs/SystemHeaderPrefix/.. %s 2>&1 | FileCheck -check-prefix=NORMAL -check-prefix=CHECK %s
  2. // RUN: %clang_cc1 -fsyntax-only -I %S/Inputs/SystemHeaderPrefix/.. -fdiagnostics-absolute-paths %s 2>&1 | FileCheck -check-prefix=ABSOLUTE -check-prefix=CHECK %s
  3. #include "absolute-paths.h"
  4. // Check whether the diagnostic from the header above includes the dummy
  5. // directory in the path.
  6. // NORMAL: SystemHeaderPrefix
  7. // ABSOLUTE-NOT: SystemHeaderPrefix
  8. // CHECK: warning: control reaches end of non-void function
  9. // For files which don't exist, just print the filename.
  10. #line 123 "non-existant.c"
  11. int g() {}
  12. // NORMAL: non-existant.c:123:10: warning: control reaches end of non-void function
  13. // ABSOLUTE: non-existant.c:123:10: warning: control reaches end of non-void function