[clang-tools-extra] r310559 - [clang-tidy] Minor documentation improvement
Gábor Horváth via cfe-commits
cfe-commits at lists.llvm.org
Thu Aug 10 08:53:23 PDT 2017
On 10 August 2017 at 17:40, Alexander Kornienko <alexfh at google.com> wrote:
>
>
> On Thu, Aug 10, 2017 at 11:13 AM, Gabor Horvath via cfe-commits <
> cfe-commits at lists.llvm.org> wrote:
>
>> Author: xazax
>> Date: Thu Aug 10 02:13:26 2017
>> New Revision: 310559
>>
>> URL: http://llvm.org/viewvc/llvm-project?rev=310559&view=rev
>> Log:
>> [clang-tidy] Minor documentation improvement
>>
>> Patch by: Lilla Barancsuk
>>
>> Modified:
>> clang-tools-extra/trunk/docs/clang-tidy/checks/readability-s
>> tatic-accessed-through-instance.rst
>> clang-tools-extra/trunk/test/clang-tidy/readability-static-a
>> ccessed-through-instance.cpp
>>
>> Modified: clang-tools-extra/trunk/docs/clang-tidy/checks/readability-s
>> tatic-accessed-through-instance.rst
>> URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/
>> docs/clang-tidy/checks/readability-static-accessed-through-
>> instance.rst?rev=310559&r1=310558&r2=310559&view=diff
>> ============================================================
>> ==================
>> --- clang-tools-extra/trunk/docs/clang-tidy/checks/readability-s
>> tatic-accessed-through-instance.rst (original)
>> +++ clang-tools-extra/trunk/docs/clang-tidy/checks/readability-s
>> tatic-accessed-through-instance.rst Thu Aug 10 02:13:26 2017
>> @@ -25,6 +25,7 @@ is changed to:
>>
>> .. code-block:: c++
>>
>> + C *c1 = new C();
>> C::foo();
>> C::x;
>>
>>
>> Modified: clang-tools-extra/trunk/test/clang-tidy/readability-static-a
>> ccessed-through-instance.cpp
>> URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/
>> test/clang-tidy/readability-static-accessed-through-
>> instance.cpp?rev=310559&r1=310558&r2=310559&view=diff
>> ============================================================
>> ==================
>> --- clang-tools-extra/trunk/test/clang-tidy/readability-static-accessed-through-instance.cpp
>> (original)
>> +++ clang-tools-extra/trunk/test/clang-tidy/readability-static-accessed-through-instance.cpp
>> Thu Aug 10 02:13:26 2017
>> @@ -116,7 +116,7 @@ using E = D;
>>
>> template <typename T> void f(T t, C c) {
>> t.x; // OK, t is a template parameter.
>> - c.x; // 1
>> + c.x;
>>
>
> This comment was there to make the CHECK-FIXES line unique so that it
> doesn't match wrong line in the test. Any specific reason to remove it?
>
There was no specific reason, this seemed to be redundant, and reducing
readability. But I just noticed there is a C::x; line far above, so it
looks like this was not redundant at all. Should I add this back or you are
fine with leaving it as is for now?
>
>
>> // CHECK-MESSAGES: :[[@LINE-1]]:3: warning: static member
>> // CHECK-FIXES: {{^}} C::x; // 1{{$}}
>> }
>>
>>
>> _______________________________________________
>> cfe-commits mailing list
>> cfe-commits at lists.llvm.org
>> http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20170810/409c8634/attachment.html>
More information about the cfe-commits
mailing list