This is an archive of the discontinued LLVM Phabricator instance.

[include-cleaner] Report references to operator calls as implicit
ClosedPublic

Authored by kadircet on Mar 29 2023, 5:09 AM.

Details

Summary

Missing these references can result in false negatives in the used-ness
analysis and break builds.

Diff Detail

Event Timeline

kadircet created this revision.Mar 29 2023, 5:09 AM
Herald added a project: Restricted Project. · View Herald TranscriptMar 29 2023, 5:09 AM
kadircet requested review of this revision.Mar 29 2023, 5:09 AM
Herald added a project: Restricted Project. · View Herald TranscriptMar 29 2023, 5:09 AM
Herald added a subscriber: cfe-commits. · View Herald Transcript
hokein accepted this revision.Mar 29 2023, 1:12 PM
hokein added inline comments.
clang-tools-extra/include-cleaner/lib/WalkAST.cpp
102–110

I will be more defensive for nullptr (llvm::cast doesn't allow nullptr), use the cast_if_present in case where S->getCalleeDecl() returns a nullptr

This revision is now accepted and ready to land.Mar 29 2023, 1:12 PM
kadircet updated this revision to Diff 510474.Apr 3 2023, 6:17 AM
kadircet marked an inline comment as done.
  • Update to treat operator calls to members as "explicit" fater offline discussions. This better aligns with what we do for regular member exprs.
hokein accepted this revision.Apr 3 2023, 6:29 AM

still LG.