Whole Tomato Software Forums
Whole Tomato Software Forums
Main Site | Profile | Register | Active Topics | Members | Search | FAQ
 All Forums
 Visual Assist
 Technical Support
 Included header is not used directly

You must be registered to post a reply.
Click here to register.

Screensize:
UserName:
Password:
Format: BoldItalicizeUnderlineStrikethrough Align leftCenterAlign right Insert horizontal ruleUpload and insert imageInsert hyperlinkInsert email addressInsert codeInsert quoted textInsert listInsert Emoji
   
Message:

Forum code is on.
Html is off.

 
Check to subscribe to this topic.
   

T O P I C    R E V I E W
sosedada Posted - Dec 18 2025 : 10:28:49 AM
I have a love/hate relationship with this inspection. I love removing unnecessary headers (I might be a little obsessed in our large 30 year old codebase), but the false positives are so frustrating!

The most common cause is templates. So many complaints about <vector>, <boost/shared_ptr.hpp>, or one of our common `class Foo: XMLPersistent<Foo>` patterns claiming the XMLPersistent header is unnecessary.

I figured this was already on a todo list, but then remembered what they say about assuming. I look forward to being able to move this to my Level 1 category that I just automatically do whenever I see one appear (which would be another feature request for me).

LMK if you need more specific details.
1   L A T E S T    R E P L I E S    (Newest First)
feline Posted - Dec 18 2025 : 11:55:40 AM
Do you have a simple code sample that shows a false positive? That would be helpful.

We are using clang-tidy for Code Inspection, and sometimes the "bad" behaviour is coming from clang-tidy its self. Other times there is a bug in our implementation. So these things need to be considered on a case by case basis.

I am not seeing an open bug report for this, which looks to be the check "misc-include-cleaner". I know people have mentioned it, but without an actual reproducible bug to study, I am not going to rush to put in a bug report for this.

© 2023 Whole Tomato Software, LLC Go To Top Of Page
Snitz Forums 2000