[cfe-dev] cfe-dev Digest, Vol 102, Issue 19

Curdeius Curdeius via cfe-dev cfe-dev at lists.llvm.org
Tue Dec 8 00:48:54 PST 2015


Hi Piotr,

I cannot give you a full answer, just a small insight into the issue.

At the first sight, one could thing that the problem is clang-tidy
containining some checks that are only aliases (synonyms) to other checks,
e.g. BracesAroundStatementsCheck is both in readability and google modules,
similarly NamespaceCommentCheck is both in llvm and google.
But apparently, it's not the case, since, AFAI, modernize/UseOverrideCheck
is not aliased anywhere.

Given that it happens in headers (and only in headers that are included
from different translation units I guess (?)), it must be that the header
is checked, fixes are saved (but not applied immediately), the file is
checked again and the history repeats itself. Finally, the fixes from two
(or more) passes are applied.

IMO, the fault is either in clang-tidy framework or in the check.
Personally I vote for the former, as it shouldn't be the check authors'
responsibility.
Unless I am mistaken, there are checks that handle this repetitive fixes
manually.

Correct me if I am wrong.

Best regards,
Marek

---------- Wiadomość przekazana dalej ----------
> From: Piotr Padlewski via cfe-dev <cfe-dev at lists.llvm.org>
> To: Clang Dev <cfe-dev at lists.llvm.org>
> Cc:
> Date: Mon, 7 Dec 2015 17:29:00 +0100
> Subject: Re: [cfe-dev] [Clang-tidy] applying fixes multiple times on same
> file
> Bump
> I can also say that this thing takes place in header files.
>
> Piotr
>
> 2015-11-26 21:18 GMT+01:00 Piotr Padlewski <piotr.padlewski at gmail.com>:
>
>> Hi,
>> So After running clang-tidy it did change some warnings very well, but
>> some of them were fixed multiple times like:
>>
>> -    Event(const std::shared_ptr<EventRecord> &record);
>> +    explicit explicit Event(const std::shared_ptr<EventRecord> &record);
>>
>>
>> -} // ga
>> +} // namespace gamespace ga
>>
>> -}
>> +}  // namespace ga // namespace ga  // namespace ga  // namespace ga
>>
>> -    RecordStream<ga::Event> getRecordStream();
>> +    RecordStream<ga::Event> getRecordStream() override override;
>>
>> Is it known feature? Am I doing something wrong?
>>
>> Piotr
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20151208/b516b779/attachment.html>


More information about the cfe-dev mailing list