summaryrefslogtreecommitdiffstats
path: root/clang/test/OpenMP/parallel_sections_ast_print.cpp
diff options
context:
space:
mode:
authorSerge Pavlov <sepavloff@gmail.com>2016-04-19 06:19:52 +0000
committerSerge Pavlov <sepavloff@gmail.com>2016-04-19 06:19:52 +0000
commit7dcc97e7ac0a7184f527c77178ecc9db7b412dc8 (patch)
tree25b03f63bb0010920c7624e5ec6478f67b2d953f /clang/test/OpenMP/parallel_sections_ast_print.cpp
parent77fa84eadd926bd95b9893c9fba949eb01bd50be (diff)
downloadbcm5719-llvm-7dcc97e7ac0a7184f527c77178ecc9db7b412dc8.tar.gz
bcm5719-llvm-7dcc97e7ac0a7184f527c77178ecc9db7b412dc8.zip
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
Diffstat (limited to 'clang/test/OpenMP/parallel_sections_ast_print.cpp')
-rw-r--r--clang/test/OpenMP/parallel_sections_ast_print.cpp3
1 files changed, 3 insertions, 0 deletions
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<int, 5>(b, &b) + tmain<long, 1>(x, &x);
}
+template<typename T>
+T S<T>::TS = 0;
+
#endif
OpenPOWER on IntegriCloud