Commit 5e06336
committed
[RecursiveASTVisitor] Skip implicit instantiations.
In DEF_TRAVERSE_TMPL_SPEC_DECL, we attempted to skip implicit
instantiations by detecting that D->getTemplateArgsAsWritten() returns
nullptr, but as this test shows, it is possible for that to return a
non-null pointer even for implicit instantiations. Explicitly check for
this case instead.
Fixes #1105021 parent bc91f3c commit 5e06336
File tree
2 files changed
+30
-7
lines changed- clang-tools-extra/test/clang-tidy/checkers/modernize
- clang/include/clang/AST
2 files changed
+30
-7
lines changedLines changed: 21 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
17 | 20 | | |
18 | 21 | | |
19 | 22 | | |
20 | 23 | | |
21 | 24 | | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
22 | 33 | | |
23 | 34 | | |
24 | 35 | | |
| |||
117 | 128 | | |
118 | 129 | | |
119 | 130 | | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2069 | 2069 | | |
2070 | 2070 | | |
2071 | 2071 | | |
| 2072 | + | |
2072 | 2073 | | |
2073 | 2074 | | |
2074 | 2075 | | |
2075 | 2076 | | |
2076 | 2077 | | |
2077 | 2078 | | |
2078 | | - | |
2079 | | - | |
2080 | | - | |
2081 | | - | |
2082 | | - | |
2083 | | - | |
| 2079 | + | |
| 2080 | + | |
| 2081 | + | |
| 2082 | + | |
| 2083 | + | |
| 2084 | + | |
| 2085 | + | |
2084 | 2086 | | |
2085 | 2087 | | |
2086 | 2088 | | |
2087 | | - | |
| 2089 | + | |
2088 | 2090 | | |
2089 | 2091 | | |
2090 | 2092 | | |
| |||
0 commit comments