[clang-tidy] Optimize misc-confusable-identifiers
This is final optimization for this check. Main improvements comes from changing a logic order in mayShadow function, to first validate result of mayShadowImpl, then search primary context in a vectors. Secondary improvement comes from excluding all implicit code by using TK_IgnoreUnlessSpelledInSource. All other changes are just cosmetic improvements. Tested on Cataclysm-DDA open source project, result in check execution time reduction from 3682 seconds to 100 seconds (~0.25s per TU). That's 97.2% reduction for this change alone. Resulting in cumulative improvement for this check around -99.6%, finally bringing this check into a cheap category. Reviewed By: serge-sans-paille Differential Revision: https://reviews.llvm.org/D151594
parent
7ffeb8ef
Please register or sign in to comment