From 222e2a7620e6520ffaf4fc4e69d79c18da31542e Mon Sep 17 00:00:00 2001 From: "Zancanaro; Carlo" Date: Mon, 24 Sep 2012 09:58:17 +1000 Subject: Add the clang library to the repo (with some of my changes, too). --- clang/test/Driver/cc-log-diagnostics.c | 35 ++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 clang/test/Driver/cc-log-diagnostics.c (limited to 'clang/test/Driver/cc-log-diagnostics.c') diff --git a/clang/test/Driver/cc-log-diagnostics.c b/clang/test/Driver/cc-log-diagnostics.c new file mode 100644 index 0000000..88c99f5 --- /dev/null +++ b/clang/test/Driver/cc-log-diagnostics.c @@ -0,0 +1,35 @@ +// RUN: rm -f %t.log +// RUN: env RC_DEBUG_OPTIONS=1 \ +// RUN: CC_LOG_DIAGNOSTICS=1 CC_LOG_DIAGNOSTICS_FILE=%t.log \ +// RUN: %clang -Wfoobar -no-canonical-prefixes -target x86_64-apple-darwin10 -fsyntax-only %s +// RUN: FileCheck %s < %t.log + +int f0() {} + +// CHECK: +// CHECK: main-file +// CHECK: {{.*}}cc-log-diagnostics.c +// CHECK: dwarf-debug-flags +// CHECK: {{.*}}clang{{.*}}-fsyntax-only{{.*}} +// CHECK: diagnostics +// CHECK: +// CHECK: +// CHECK: level +// CHECK: warning +// CHECK: message +// CHECK: unknown warning option '-Wfoobar'; did you mean '-W{{.*}}'? +// CHECK: +// CHECK: +// CHECK: level +// CHECK: warning +// CHECK: filename +// CHECK: {{.*}}cc-log-diagnostics.c +// CHECK: line +// CHECK: 7 +// CHECK: column +// CHECK: 11 +// CHECK: message +// CHECK: control reaches end of non-void function +// CHECK: +// CHECK: +// CHECK: -- cgit v1.2.3