From 3f324d569bfceb8d38b609f529ec048208c22183 Mon Sep 17 00:00:00 2001 From: Douglas Gregor Date: Mon, 3 May 2010 18:51:14 +0000 Subject: Diagnose unused exception parameters under a different warning group (-Wunused-exception-parameter) than normal variables, since it's more common to name and then ignore an exception parameter. This warning is neither enabled by default nor by -Wall. Fixes . llvm-svn: 102931 --- clang/test/SemaObjC/warn-unused-exception-param.m | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 clang/test/SemaObjC/warn-unused-exception-param.m (limited to 'clang/test/SemaObjC/warn-unused-exception-param.m') diff --git a/clang/test/SemaObjC/warn-unused-exception-param.m b/clang/test/SemaObjC/warn-unused-exception-param.m new file mode 100644 index 00000000000..f649f8c8121 --- /dev/null +++ b/clang/test/SemaObjC/warn-unused-exception-param.m @@ -0,0 +1,4 @@ +// RUN: %clang_cc1 -fsyntax-only -verify -Wunused-exception-parameter %s +void f0() { + @try {} @catch(id a) {} // expected-warning{{unused exception parameter 'a'}} +} -- cgit v1.2.3