diff options
Diffstat (limited to 'clang/test')
-rw-r--r-- | clang/test/Driver/cl-options.c | 2 | ||||
-rw-r--r-- | clang/test/Frontend/Inputs/absolute-paths.h | 3 | ||||
-rw-r--r-- | clang/test/Frontend/absolute-paths.c | 17 |
3 files changed, 21 insertions, 1 deletions
diff --git a/clang/test/Driver/cl-options.c b/clang/test/Driver/cl-options.c index 25974ba0af1..5f7849ab7df 100644 --- a/clang/test/Driver/cl-options.c +++ b/clang/test/Driver/cl-options.c @@ -339,7 +339,6 @@ // RUN: /FAs \ // RUN: /FAu \ // RUN: /favor:blend \ -// RUN: /FC \ // RUN: /Fifoo \ // RUN: /Fmfoo \ // RUN: /FpDebug\main.pch \ @@ -491,6 +490,7 @@ // RUN: -fdiagnostics-color \ // RUN: -fno-diagnostics-color \ // RUN: -fdiagnostics-parseable-fixits \ +// RUN: -fdiagnostics-absolute-paths \ // RUN: -ferror-limit=10 \ // RUN: -fmsc-version=1800 \ // RUN: -fno-strict-aliasing \ diff --git a/clang/test/Frontend/Inputs/absolute-paths.h b/clang/test/Frontend/Inputs/absolute-paths.h new file mode 100644 index 00000000000..5e682c73470 --- /dev/null +++ b/clang/test/Frontend/Inputs/absolute-paths.h @@ -0,0 +1,3 @@ +int f() { + // Oops, no return. +} diff --git a/clang/test/Frontend/absolute-paths.c b/clang/test/Frontend/absolute-paths.c new file mode 100644 index 00000000000..478216294ae --- /dev/null +++ b/clang/test/Frontend/absolute-paths.c @@ -0,0 +1,17 @@ +// RUN: %clang_cc1 -fsyntax-only -I %S/Inputs/SystemHeaderPrefix/.. %s 2>&1 | FileCheck -check-prefix=NORMAL -check-prefix=CHECK %s +// RUN: %clang_cc1 -fsyntax-only -I %S/Inputs/SystemHeaderPrefix/.. -fdiagnostics-absolute-paths %s 2>&1 | FileCheck -check-prefix=ABSOLUTE -check-prefix=CHECK %s + +#include "absolute-paths.h" + +// Check whether the diagnostic from the header above includes the dummy +// directory in the path. +// NORMAL: SystemHeaderPrefix +// ABSOLUTE-NOT: SystemHeaderPrefix +// CHECK: warning: control reaches end of non-void function + + +// For files which don't exist, just print the filename. +#line 123 "non-existant.c" +int g() {} +// NORMAL: non-existant.c:123:10: warning: control reaches end of non-void function +// ABSOLUTE: non-existant.c:123:10: warning: control reaches end of non-void function |