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

2016-04-18 Thread Serge Pavlov via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL266719: Warn if function or variable cannot be implicitly instantiated (authored by sepavloff). Changed prior to commit: http://reviews.llvm.org/D16396?vs=54085&id=54163#toc Repository: rL LLVM http

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

2016-04-18 Thread Richard Smith via cfe-commits
rsmith accepted this revision. rsmith added a comment. This revision is now accepted and ready to land. Thanks! http://reviews.llvm.org/D16396 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe

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

2016-04-18 Thread Serge Pavlov via cfe-commits
sepavloff updated this revision to Diff 54085. sepavloff added a comment. Updated patch Changed text of messages as proposed by reviewer. As a result, printing template parameters is not needed anymore, related code is removed. http://reviews.llvm.org/D16396 Files: include/clang/AST/DeclBase

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

2016-04-15 Thread Richard Smith via cfe-commits
On Fri, Apr 15, 2016 at 12:56 AM, Serge Pavlov via cfe-commits < cfe-commits@lists.llvm.org> wrote: > 2016-04-14 2:44 GMT+06:00 Richard Smith : > >> rsmith added a comment. >> >> I would prefer to avoid adding the `%qt` format if we can. But if we do >> provide it, the template parameter names we

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

2016-04-15 Thread Richard Smith via cfe-commits
rsmith added a comment. I have a lingering concern with this style of formatting, because it risks making our diagnostics (more) ambiguous. Consider this: template struct X {}; struct T {}; X xt; If we give a diagnostic talking about `X`, it's ambiguous whether we're referring to the

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

2016-04-15 Thread Serge Pavlov via cfe-commits
sepavloff updated this revision to Diff 53853. sepavloff added a comment. Herald added a subscriber: klimek. Updated patch Get rid of '%qt' format, instead print template parameters always. It requires about 10 tests to be fixed. However printing parameters still can be suppressed, it is required

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

2016-04-15 Thread Serge Pavlov via cfe-commits
2016-04-14 2:44 GMT+06:00 Richard Smith : > rsmith added a comment. > > I would prefer to avoid adding the `%qt` format if we can. But if we do > provide it, the template parameter names we use should match what was > written in the declaration of the template itself. > > New format was not a good

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

2016-04-13 Thread Richard Smith via cfe-commits
rsmith added a comment. I would prefer to avoid adding the `%qt` format if we can. But if we do provide it, the template parameter names we use should match what was written in the declaration of the template itself. Comment at: lib/AST/Decl.cpp:1423 @@ +1422,3 @@ +/// +/// is

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

2016-04-13 Thread Serge Pavlov via cfe-commits
sepavloff updated this revision to Diff 53547. sepavloff added a comment. Updated patch according to review notes. The patch adds diagnostics for undefined function templates, in a similar way as for template variables. These two warnings are classified into different groups. Warnings on undefin

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

2016-03-19 Thread Richard Smith via cfe-commits
rsmith added a comment. Are you planning on extending this to also cover templated functions? Comment at: include/clang/Basic/DiagnosticGroups.td:78 @@ -77,2 +77,3 @@ DiagGroup<"gnu-string-literal-operator-template">; +def UnavailableTemplate : DiagGroup<"unavailable-template

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

2016-02-29 Thread Serge Pavlov via cfe-commits
Any feedback? Thanks, --Serge 2016-01-21 14:33 GMT+06:00 Serge Pavlov : > 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

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

2016-02-29 Thread Serge Pavlov via cfe-commits
sepavloff added a subscriber: sepavloff. sepavloff added a comment. Any feedback? Thanks, --Serge http://reviews.llvm.org/D16396 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2016-01-21 Thread Serge Pavlov via cfe-commits
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 impleme