[PATCH] D16579: Warn if friend function depends on template parameters.
Serge Pavlov via cfe-commits
cfe-commits at lists.llvm.org
Thu Mar 17 09:21:44 PDT 2016
Ping.
Thanks,
--Serge
2016-02-26 12:20 GMT+06:00 Serge Pavlov <sepavloff at gmail.com>:
> Could someone provide a feedback?
>
> Thanks,
> --Serge
>
> 2016-01-26 20:55 GMT+06:00 Serge Pavlov <sepavloff at gmail.com>:
>
>> 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<typename T> class C1 {
>> friend void func(T x);
>> };
>>
>> It may be not obvious for user, so compiler could emit a warning in
>> such case. This patch implements appropriate warning, the wording is
>> taken from GCC message. The patch fixes PR23342.
>>
>> 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/CXX/drs/dr5xx.cpp
>> test/CXX/temp/temp.decls/temp.friend/p1.cpp
>> test/PCH/cxx-templates.cpp
>> test/PCH/cxx-templates.h
>> test/SemaCXX/friend.cpp
>> test/SemaCXX/overload-call.cpp
>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20160317/17d10461/attachment.html>
More information about the cfe-commits
mailing list