Clang Project

clang_source_code/test/Frontend/absolute-paths.c
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
4#include "absolute-paths.h"
5
6// Check whether the diagnostic from the header above includes the dummy
7// directory in the path.
8// NORMAL: SystemHeaderPrefix
9// ABSOLUTE-NOT: SystemHeaderPrefix
10// CHECK: warning: control reaches end of non-void function
11
12
13// For files which don't exist, just print the filename.
14#line 123 "non-existant.c"
15int g() {}
16// NORMAL: non-existant.c:123:10: warning: control reaches end of non-void function
17// ABSOLUTE: non-existant.c:123:10: warning: control reaches end of non-void function
18