The patch extends include-fixer's "-output-headers", and "-insert-headers"
command line options to make it dump more information (e.g. QualifiedSymbol),
so that vim-integration can add missing qualifiers.
Details
Diff Detail
- Repository
- rL LLVM
Event Timeline
include-fixer/IncludeFixerContext.cpp | ||
---|---|---|
54 ↗ | (On Diff #63788) | Drop the const ... |
57 ↗ | (On Diff #63788) | ... use std::move to move Symbols into place. |
include-fixer/IncludeFixerContext.h | ||
32 ↗ | (On Diff #63788) | Typo: qulifiers |
65 ↗ | (On Diff #63788) | s/informations/information/ |
include-fixer/tool/ClangIncludeFixer.cpp | ||
252 ↗ | (On Diff #63788) | Is it guaranteed that two headers with the same name are adjacent in the HeaderInfos vector? If so, point that out in a comment, otherwise adjacent_find isn't the right algorithm here. |
259 ↗ | (On Diff #63788) | "Expected exactly one unique header"? |
include-fixer/tool/clang-include-fixer.py | ||
119 ↗ | (On Diff #63788) | Reduplicate? |
include-fixer/tool/ClangIncludeFixer.cpp | ||
---|---|---|
252 ↗ | (On Diff #63789) | You are right. adjancent_find is not correct algorithm here. What I want to do is to check all elements' headers in HeaderInfos are equal. Change to std::equal, the same below. |
include-fixer/tool/clang-include-fixer.py | ||
119 ↗ | (On Diff #63789) | Should be Deduplicate. |
include-fixer/tool/ClangIncludeFixer.cpp | ||
---|---|---|
252 ↗ | (On Diff #63796) | In that case adjacent_find was the right choice, but std::equal also works, I read this wrong. There are multiple ways of doing this using standard algorithms and none of them is really obvious. Please add a comment here that you're checking that all elements are equal. |
Add comments for std::equal.
include-fixer/tool/ClangIncludeFixer.cpp | ||
---|---|---|
252 ↗ | (On Diff #63796) | Done. To me, equal is more obvious than adjacent_find. |
One nit, LGTM.
include-fixer/tool/ClangIncludeFixer.cpp | ||
---|---|---|
277 ↗ | (On Diff #63799) | the same qualified name |