23 lines · c
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 %s2// 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 %s3 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 dummy12// directory in the path.13// NORMAL: SystemHeaderPrefix14// ABSOLUTE-NOT: SystemHeaderPrefix15// CHECK: warning: non-void function does not return a value16 17 18// For files which don't exist, just print the filename.19#line 123 "non-existant.c"20int g(void) {}21// NORMAL: non-existant.c:123:14: warning: non-void function does not return a value22// ABSOLUTE: non-existant.c:123:14: warning: non-void function does not return a value23