| 1 |
// RUN: %clang_cc1 -Wno-error=return-type -fsyntax-only -I %S/Inputs/SystemHeaderPrefix/.. %s 2>&1 | FileCheck -DROOT_ABSOLUTE=%s -check-prefix=NORMAL -check-prefix=CHECK %s |
| 2 |
// RUN: %clang_cc1 -Wno-error=return-type -fsyntax-only -I %S/Inputs/SystemHeaderPrefix/.. -fdiagnostics-absolute-paths %s 2>&1 | FileCheck -DROOT_ABSOLUTE=%s -check-prefix=ABSOLUTE -check-prefix=CHECK %s |
| 3 |
|
| 4 |
#include "absolute-paths-import.h" |
| 5 |
// NORMAL: In file included from {{.*}}absolute-paths.c:4: |
| 6 |
// NORMAL-NOT: In file included from [[ROOT_ABSOLUTE]]:4: |
| 7 |
// ABSOLUTE: In file included from [[ROOT_ABSOLUTE]]:4: |
| 8 |
|
| 9 |
#include "absolute-paths.h" |
| 10 |
|
| 11 |
// Check whether the diagnostic from the header above includes the dummy |
| 12 |
// directory in the path. |
| 13 |
// NORMAL: SystemHeaderPrefix |
| 14 |
// ABSOLUTE-NOT: SystemHeaderPrefix |
| 15 |
// CHECK: warning: non-void function does not return a value |
| 16 |
|
| 17 |
|
| 18 |
// For files which don't exist, just print the filename. |
| 19 |
#line 123 "non-existant.c" |
| 20 |
int g(void) {} |
| 21 |
// NORMAL: non-existant.c:123:14: warning: non-void function does not return a value |
| 22 |
// ABSOLUTE: non-existant.c:123:14: warning: non-void function does not return a value |