Commit 77b463c
committed
[clang-tidy] Avoid expensive AST traversal in RedundantTypenameCheck
In Fuchsia, we have several files that take over 2 hours for this check
to run, where as it only takes 8 seconds to finish without the
RedundantTypenameCheck. We can avoid this exponential behavior by
limiting the use of hasAncestor to typeLocs for the types that are
actually used in the checking logic.
From the wall time for the check with --enable-profile goes from 6724
seconds (about 2 hours) to down to a reasonable 0.1753 seconds.1 parent 540fd18 commit 77b463c
File tree
1 file changed
+7
-3
lines changed- clang-tools-extra/clang-tidy/readability
1 file changed
+7
-3
lines changedLines changed: 7 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
21 | | - | |
22 | | - | |
23 | | - | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
24 | 28 | | |
25 | 29 | | |
26 | 30 | | |
| |||
0 commit comments