]> granicus.if.org Git - clang/commit
Warn if function or variable cannot be implicitly instantiated
authorSerge Pavlov <sepavloff@gmail.com>
Tue, 19 Apr 2016 06:19:52 +0000 (06:19 +0000)
committerSerge Pavlov <sepavloff@gmail.com>
Tue, 19 Apr 2016 06:19:52 +0000 (06:19 +0000)
commite7d59be72fa9bc8435da45f4e98c6048b1ffa661
treecc4e3b79e05554ac46826bd3e82022215c2c5f49
parent52a9fbe3d8fdd8cb22ef6d23c1b92b5e83abba29
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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@266719 91177308-0d34-0410-b5e6-96231b3b80d8
17 files changed:
include/clang/AST/DeclBase.h
include/clang/Basic/DiagnosticGroups.td
include/clang/Basic/DiagnosticSemaKinds.td
include/clang/Sema/Sema.h
lib/AST/DeclBase.cpp
lib/Sema/SemaOverload.cpp
lib/Sema/SemaTemplateInstantiateDecl.cpp
test/CXX/temp/temp.decls/temp.mem/p1.cpp
test/OpenMP/parallel_ast_print.cpp
test/OpenMP/parallel_sections_ast_print.cpp
test/OpenMP/target_parallel_ast_print.cpp
test/OpenMP/task_ast_print.cpp
test/OpenMP/teams_ast_print.cpp
test/OpenMP/threadprivate_ast_print.cpp
test/SemaCXX/PR10177.cpp
test/SemaCXX/undefined-internal.cpp
test/SemaTemplate/undefined-template.cpp [new file with mode: 0644]