Page MenuHomePhabricator

Handle template instantiations better in clang-tidy check
Needs ReviewPublic

Authored by steveire on Wed, Nov 11, 3:12 PM.

Details

Reviewers
alexfh
Summary

readability-container-size-empty currently modifies source code based on
AST nodes in template instantiations, which means that it makes
transformations based on substituted types. This can lead to
transforming code to be broken.

Change the matcher implementation to ignore template instantiations
explicitly, and add a matcher to explicitly handle template declatations
instead of instantiations.

Diff Detail

Event Timeline

steveire created this revision.Wed, Nov 11, 3:12 PM
Herald added a project: Restricted Project. · View Herald TranscriptWed, Nov 11, 3:12 PM
Herald added a subscriber: cfe-commits. · View Herald Transcript
steveire requested review of this revision.Wed, Nov 11, 3:12 PM