sepavloff marked 6 inline comments as done.
Comment at: include/clang/Sema/Sema.h:9469
@@ +9468,3 @@
+ /// of proper templates, but they are needed for checks.
+ SmallVector FriendsOfTemplates;
+
Do we really need it? When compiler is compiling a module containi
sepavloff updated this revision to Diff 63387.
sepavloff added a comment.
Repared file modes.
http://reviews.llvm.org/D16579
Files:
include/clang/AST/TypeInstantiationMatcher.h
include/clang/AST/TypeMatcher.h
include/clang/Basic/DiagnosticGroups.td
include/clang/Basic/DiagnosticSemaKind
sepavloff updated this revision to Diff 63386.
sepavloff added a comment.
Updated patch
http://reviews.llvm.org/D16579
Files:
include/clang/AST/TypeInstantiationMatcher.h
include/clang/AST/TypeMatcher.h
include/clang/Basic/DiagnosticGroups.td
include/clang/Basic/DiagnosticSemaKinds.td
rsmith added inline comments.
Comment at: include/clang/Basic/DiagnosticSemaKinds.td:1153
@@ +1152,3 @@
+def warn_non_template_friend : Warning<"friend declaration %q0 depends on "
+ "template parameter but is not a template function">,
+ InGroup;
template func
sepavloff updated this revision to Diff 56607.
sepavloff added a comment.
Changed implementation of friend function set.
Friend functions declared in template classes are not added to redeclaration
chains,
but access to them is needed to make some checks. This change allows using the
set of frie
sepavloff updated this revision to Diff 52527.
sepavloff added a comment.
Updated patch
Added a check for presence of template declaration corresponding to the friend
function. Presence of similar functions but with specializations as argument
types is also checked now.
Made an atempt to make me
2016-03-18 0:35 GMT+06:00 Arthur O'Dwyer :
> I'm not qualified to comment on the implementation, but I'm a bit
> skeptical that this warning is appropriate in the first place. I've often
> declared friend non-template functions, e.g. swap(). I've never intended to
> declare a friend *template spec
sepavloff updated this revision to Diff 51017.
sepavloff added a comment.
Do not emit warning on class methods.
http://reviews.llvm.org/D16579
Files:
include/clang/Basic/DiagnosticGroups.td
include/clang/Basic/DiagnosticSemaKinds.td
lib/Sema/SemaDecl.cpp
test/CXX/drs/dr3xx.cpp
test/CX
Ping.
Thanks,
--Serge
2016-02-26 12:20 GMT+06:00 Serge Pavlov :
> Could someone provide a feedback?
>
> Thanks,
> --Serge
>
> 2016-01-26 20:55 GMT+06:00 Serge Pavlov :
>
>> sepavloff created this revision.
>> sepavloff added a subscriber: cfe-commits.
>>
>> Declaration of friend function may dep
I'm not qualified to comment on the implementation, but I'm a bit skeptical
that this warning is appropriate in the first place. I've often declared
friend non-template functions, e.g. swap(). I've never intended to declare
a friend *template specialization*. Is declaring friend template
specializa
rsmith added a subscriber: rsmith.
rsmith added a comment.
It seems useful to warn on this, but I'm concerned that there are valid code
patterns that this will warn about where there is no reasonable way to rewrite
the code that would suppress the warning. For instance:
template class X {
Could someone provide a feedback?
Thanks,
--Serge
2016-01-26 20:55 GMT+06:00 Serge Pavlov :
> sepavloff created this revision.
> sepavloff added a subscriber: cfe-commits.
>
> Declaration of friend function may depend on template parameters,
> however it does not become a template function:
>
>
Any feedback?
Thanks,
--Serge
2016-01-26 20:55 GMT+06:00 Serge Pavlov :
> sepavloff created this revision.
> sepavloff added a subscriber: cfe-commits.
>
> Declaration of friend function may depend on template parameters,
> however it does not become a template function:
>
> template class C
13 matches
Mail list logo