This is an archive of the discontinued LLVM Phabricator instance.

[include-cleaner] Ignore the ParmVarDecl itself in WalkAST.cpp
ClosedPublic

Authored by hokein on Jun 20 2023, 4:14 AM.

Details

Summary

This will fix a false positive where a ParamVarDecl happend to be the
same name of some C standard symbol and has a global namespace.

using A = int(int time); // we suggest <ctime> for the `int time`.

Diff Detail

Event Timeline

hokein created this revision.Jun 20 2023, 4:14 AM
Herald added a project: Restricted Project. · View Herald TranscriptJun 20 2023, 4:14 AM
hokein requested review of this revision.Jun 20 2023, 4:14 AM
Herald added a project: Restricted Project. · View Herald TranscriptJun 20 2023, 4:14 AM
kadircet accepted this revision.Jun 20 2023, 5:13 AM

thanks!

clang-tools-extra/include-cleaner/lib/WalkAST.cpp
219

s/isa/llvm::isa/

clang-tools-extra/include-cleaner/unittests/AnalysisTest.cpp
102

no need for this one, as we already have a param in bar. can you just move the comment near that one instead?

This revision is now accepted and ready to land.Jun 20 2023, 5:13 AM