[PATCH] D16396: Warn if variable cannot be implicitly instantiated

Serge Pavlov via cfe-commits cfe-commits at lists.llvm.org
Mon Feb 29 09:27:25 PST 2016


Any feedback?

Thanks,
--Serge

2016-01-21 14:33 GMT+06:00 Serge Pavlov <sepavloff at gmail.com>:

> sepavloff created this revision.
> sepavloff added a reviewer: rsmith.
> sepavloff added subscribers: cfe-commits, silvas.
>
> Instantiation of static class members may be a source of user
> misunderstanding,
> especially in the case of using modules, PR24425 describes one of such
> examples.
> This patch implements warning if compiler tried to make implicit
> instantiation
> but could not find template definition. The implementation follows
> discussion
> of http://reviews.llvm.org/D12326.
>
> http://reviews.llvm.org/D16396
>
> Files:
>   include/clang/Basic/DiagnosticGroups.td
>   include/clang/Basic/DiagnosticSemaKinds.td
>   include/clang/Sema/Sema.h
>   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/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/unavailable-var-template.cpp
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20160229/68edcded/attachment.html>


More information about the cfe-commits mailing list