diff options
author | Douglas Gregor <dgregor@apple.com> | 2010-04-09 17:41:13 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2010-04-09 17:41:13 +0000 |
commit | fb8b27d5303819ac6df89c1df07266151d9683bc (patch) | |
tree | f0f0f8cc7689350471fcb8d6e5ba518dc64b7193 /clang/test/SemaCXX/unused-functions.cpp | |
parent | b29f78fb9eef3f0d1fa5fb5f1066bac7cf99a573 (diff) | |
download | bcm5719-llvm-fb8b27d5303819ac6df89c1df07266151d9683bc.tar.gz bcm5719-llvm-fb8b27d5303819ac6df89c1df07266151d9683bc.zip |
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
Diffstat (limited to 'clang/test/SemaCXX/unused-functions.cpp')
-rw-r--r-- | clang/test/SemaCXX/unused-functions.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
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<typename T> +T get_from_foo(T y) { return foo(y); } + +int g(int z) { return get_from_foo(z); } |