summaryrefslogtreecommitdiff
path: root/test/SemaTemplate
diff options
context:
space:
mode:
authorReid Kleckner <reid@kleckner.net>2013-09-10 22:21:37 +0000
committerReid Kleckner <reid@kleckner.net>2013-09-10 22:21:37 +0000
commite8bcd4c8e5a867c52bef3837731e44b88eba6a36 (patch)
treeed1b4538fff83c054be50fd9bbc4e6615938136a /test/SemaTemplate
parent812d6bcbd13190e6e5c2c915bf1499038d56b44b (diff)
downloadclang-e8bcd4c8e5a867c52bef3837731e44b88eba6a36.tar.gz
Ignore noreturn when checking function template specializations
As requested when applying the same logic to calling conventions. Reviewers: rsmith Differential Revision: http://llvm-reviews.chandlerc.com/D1634 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@190441 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/SemaTemplate')
-rw-r--r--test/SemaTemplate/function-template-specialization-noreturn.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/test/SemaTemplate/function-template-specialization-noreturn.cpp b/test/SemaTemplate/function-template-specialization-noreturn.cpp
new file mode 100644
index 0000000000..3e1f61855a
--- /dev/null
+++ b/test/SemaTemplate/function-template-specialization-noreturn.cpp
@@ -0,0 +1,8 @@
+// RUN: %clang_cc1 -fsyntax-only -verify %s
+
+// Split from function-template-specialization.cpp because the noreturn warning
+// requires analysis-based warnings, which the other errors in that test case
+// disable.
+
+template <int N> void __attribute__((noreturn)) f3() { __builtin_unreachable(); }
+template <> void f3<1>() { } // expected-warning {{function declared 'noreturn' should not return}}