[clang-tools-extra] [include-cleaner] don't consider the associated header unused (PR #67228)

Vadim D. via cfe-commits cfe-commits at lists.llvm.org
Wed Feb 14 13:00:58 PST 2024


================
@@ -227,6 +230,7 @@ class PragmaIncludes::RecordPragma : public PPCallbacks, public CommentHandler {
       IncludedHeader = *File;
     checkForExport(HashFID, HashLine, std::move(IncludedHeader), File);
----------------
vvd170501 wrote:

`std::move` should be removed, because `IncludedHeader` is now also used for `checkForDeducedAssociated`.

Current implementation of `clang::include_cleaner::Header` is trivially movable, so `IncludedHeader` is unchanged, but it's safer to not rely on this fact.

https://github.com/llvm/llvm-project/pull/67228


More information about the cfe-commits mailing list