aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorTed Kremenek <kremenek@apple.com>2011-02-25 01:28:26 +0000
committerTed Kremenek <kremenek@apple.com>2011-02-25 01:28:26 +0000
commit7decebfc7b9dc841f228c93cc2e41e3e62911ff8 (patch)
tree3888e867aa445da37081eecea528019eef96b900 /test
parent9e63d4aed8ce544ab105623ad8e36d43e1e11314 (diff)
Teach TextDiagnosticPrinter to print out '-Werror' in addition to the warning flag for a warning mapped to an error.
For example: t.c:7:9: error: using the result of an assignment as a condition without parentheses [-Werror,-Wparentheses] git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126466 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test')
-rw-r--r--test/Sema/parentheses.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/test/Sema/parentheses.c b/test/Sema/parentheses.c
index 6d6fa1d4bd..b45d8512f6 100644
--- a/test/Sema/parentheses.c
+++ b/test/Sema/parentheses.c
@@ -37,3 +37,7 @@ void bitwise_rel(unsigned i) {
(void)(i && i || 0); // no warning.
(void)(0 || i && i); // no warning.
}
+
+// RUN: %clang_cc1 -fsyntax-only -Wparentheses -Werror -fdiagnostics-show-option %s 2>&1 | FileCheck %s
+// CHECK: error: using the result of an assignment as a condition without parentheses [-Werror,-Wparentheses]
+