diff options
Diffstat (limited to 'test/SemaCXX/return.cpp')
-rw-r--r-- | test/SemaCXX/return.cpp | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/test/SemaCXX/return.cpp b/test/SemaCXX/return.cpp new file mode 100644 index 000000000000..03b0ddb87965 --- /dev/null +++ b/test/SemaCXX/return.cpp @@ -0,0 +1,18 @@ +// RUN: clang-cc %s -fsyntax-only -verify + +int test1() { + throw; +} + +// PR5071 +template<typename T> T f() { } + +template<typename T> +void g(T t) { + return t * 2; // okay +} + +template<typename T> +T h() { + return 17; +} |