LLVM Bugzilla is read-only and represents the historical archive of all LLVM issues filled before November 26, 2021. Use github to submit LLVM bugs

Bug 25894 - modernize-redundant-void-arg doesn't detect problems inc included files
Summary: modernize-redundant-void-arg doesn't detect problems inc included files
Status: RESOLVED FIXED
Alias: None
Product: clang-tools-extra
Classification: Unclassified
Component: clang-tidy (show other bugs)
Version: unspecified
Hardware: PC Linux
: P normal
Assignee: Richard
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-12-18 20:22 PST by Eugene Zelenko
Modified: 2016-02-16 18:34 PST (History)
4 users (show)

See Also:
Fixed By Commit(s):


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Eugene Zelenko 2015-12-18 20:22:15 PST
modernize-redundant-void-arg doesn't detect problems inc included files (trunk version as of r255909).

Problem could be reproduced by moving part of test into other file and include it in test.
Comment 1 Richard 2015-12-21 11:05:45 PST
You can assign this to me, I'll probably have a fix ready for review over the Christmas break.
Comment 2 Richard 2015-12-21 11:06:17 PST
OK, looks like I can assign it to myself, so never mind :)
Comment 3 Alexander Kornienko 2015-12-23 08:00:11 PST
It looks like you just need to remove isExpansionInMainFile from all matchers in this check (and the readability-simplify-boolean-expr check as well). Clang-tidy takes care of filtering the results by file itself.
Comment 4 Eugene Zelenko 2016-01-27 18:07:30 PST
(In reply to comment #3)
> It looks like you just need to remove isExpansionInMainFile from all
> matchers in this check (and the readability-simplify-boolean-expr check as
> well). Clang-tidy takes care of filtering the results by file itself.

I tried to remove isExpansionInMainFile() from RedundantVoidArgCheck.cpp and check worked for me in case of included files.
Comment 5 Eugene Zelenko 2016-02-16 18:34:58 PST
Fixed in r260948.