Commit 57687d8
committed
[clang-include-cleaner] Make cleanup attr report expr location
Instead of reporting the location of the attribute, let's report
the location of the function reference that's passed to the cleanup
attribute as the first argument. This is required as the attribute
might be coming from a macro which means clang-include-cleaner skips
the use as it gets attributed to the header file declaringt the macro
and not to the main file.
To make this work, we have to add a fake argument to the CleanupAttr
constructor so we can pass in the original Expr alongside the function
declaration.
Fixes #1402121 parent bca39f4 commit 57687d8
File tree
4 files changed
+17
-4
lines changed- clang-tools-extra/include-cleaner
- lib
- unittests
- clang
- include/clang/Basic
- lib/Sema
4 files changed
+17
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
322 | 322 | | |
323 | 323 | | |
324 | 324 | | |
325 | | - | |
| 325 | + | |
326 | 326 | | |
327 | 327 | | |
328 | 328 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
573 | 573 | | |
574 | 574 | | |
575 | 575 | | |
576 | | - | |
| 576 | + | |
577 | 577 | | |
578 | 578 | | |
579 | 579 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1354 | 1354 | | |
1355 | 1355 | | |
1356 | 1356 | | |
| 1357 | + | |
| 1358 | + | |
| 1359 | + | |
| 1360 | + | |
| 1361 | + | |
| 1362 | + | |
| 1363 | + | |
| 1364 | + | |
| 1365 | + | |
| 1366 | + | |
| 1367 | + | |
1357 | 1368 | | |
1358 | 1369 | | |
1359 | 1370 | | |
| |||
4815 | 4826 | | |
4816 | 4827 | | |
4817 | 4828 | | |
4818 | | - | |
| 4829 | + | |
4819 | 4830 | | |
4820 | 4831 | | |
4821 | 4832 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3620 | 3620 | | |
3621 | 3621 | | |
3622 | 3622 | | |
3623 | | - | |
| 3623 | + | |
| 3624 | + | |
| 3625 | + | |
3624 | 3626 | | |
3625 | 3627 | | |
3626 | 3628 | | |
| |||
0 commit comments