From 7dcc97e7ac0a7184f527c77178ecc9db7b412dc8 Mon Sep 17 00:00:00 2001 From: Serge Pavlov Date: Tue, 19 Apr 2016 06:19:52 +0000 Subject: Warn if function or variable cannot be implicitly instantiated With this patch compiler emits warning if it tries to make implicit instantiation of a template but cannot find the template definition. The warning can be suppressed by explicit instantiation declaration or by command line options -Wundefined-var-template and -Wundefined-func-template. The implementation follows the discussion of http://reviews.llvm.org/D12326. Differential Revision: http://reviews.llvm.org/D16396 llvm-svn: 266719 --- clang/test/OpenMP/parallel_sections_ast_print.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'clang/test/OpenMP/parallel_sections_ast_print.cpp') diff --git a/clang/test/OpenMP/parallel_sections_ast_print.cpp b/clang/test/OpenMP/parallel_sections_ast_print.cpp index 9f5c1fadbeb..a66b75ea6d7 100644 --- a/clang/test/OpenMP/parallel_sections_ast_print.cpp +++ b/clang/test/OpenMP/parallel_sections_ast_print.cpp @@ -141,4 +141,7 @@ int main(int argc, char **argv) { return tmain(b, &b) + tmain(x, &x); } +template +T S::TS = 0; + #endif -- cgit v1.2.3