Live data from Hacker News

Include-what-you-use: Clang tool to analyze includes in C and C++ source files

include-what-you-use.org

1–10 of 43 posts

Re: Include-what-you-use: Clang tool to analyze includes in C and C++ source files

#4
post #2

Hmm, I happen to know a colorful-logo company that has a internal unrecommended tool that has the same name and does the same thing :) Are they making this public?

seems so. https://github.com/include-what-you-use/include-what-you-use...

Re: Include-what-you-use: Clang tool to analyze includes in C and C++ source files

#7
post #2

Hmm, I happen to know a colorful-logo company that has a internal unrecommended tool that has the same name and does the same thing :) Are they making this public?

I'm pretty sure we open sourced it in 2011 actually ....

(I don't think this version has been kept up to date with the internal one, but i could be wrong)

Re: Include-what-you-use: Clang tool to analyze includes in C and C++ source files

#8
post #5

Personally I don't like this. Often enough there's includes in headers, which are an implementation detail for the functionality in the originally included header. Iwyu will just include that, increasing coupling between components.

I don't get it, can you give an example?

Re: Include-what-you-use: Clang tool to analyze includes in C and C++ source files

#9
post #5

Personally I don't like this. Often enough there's includes in headers, which are an implementation detail for the functionality in the originally included header. Iwyu will just include that, increasing coupling between components.

I don't think the program does that, if I understand your post. A more accurate name might b "exclude what you don't use." It doesn't add in chained includes, it just lets you know about superfluous includes.

Re: Include-what-you-use: Clang tool to analyze includes in C and C++ source files

#10
I'm trying to get into refactoring (and even semantic analysis, and code-generation) for large C++ codebases using libclang, libtool, and the ilk.

Any guides to get started, and/or best practices?

Does it increase productivity by order of magnitude? (I'd like to think so. I think it's madness not to use any AST tool when working on large codebases).

Also I'm assuming "white-box" C/C++ tools like libclang/libtooling are much more powerful than black-box ones (like eclipse CDT), because of extensibility/programmability. Any comments, experiences?

what I'm trying to say is that a non-IDE but programmable editor (vim/emacs) combined with programmable libclang/libtooling, would trump a prepackaged IDE (like Visual Studio, Eclipse+CDT) by a wide margin. (of course there would be quite a bit of programming involved though).

Post reply on HN