From fb8b27d5303819ac6df89c1df07266151d9683bc Mon Sep 17 00:00:00 2001 From: Douglas Gregor Date: Fri, 9 Apr 2010 17:41:13 +0000 Subject: Remove all "used" static functions *after* we have performed all of the implicit template instantiations we need to perform. Otherwise, we end up erroneously diagnosing static functions as used if they were only used within an implicit template instantiation. Fixes a bunch of spurious failures when building Clang with Clang. llvm-svn: 100872 --- clang/test/SemaCXX/unused-functions.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 clang/test/SemaCXX/unused-functions.cpp (limited to 'clang/test/SemaCXX/unused-functions.cpp') diff --git a/clang/test/SemaCXX/unused-functions.cpp b/clang/test/SemaCXX/unused-functions.cpp new file mode 100644 index 00000000000..cefa9e118a4 --- /dev/null +++ b/clang/test/SemaCXX/unused-functions.cpp @@ -0,0 +1,8 @@ +// RUN: %clang_cc1 -fsyntax-only -Wunused -verify %s + +static int foo(int x) { return x; } + +template +T get_from_foo(T y) { return foo(y); } + +int g(int z) { return get_from_foo(z); } -- cgit v1.2.3