Commit fe53a03
[Clang] Warn on deprecated specializations used in system headers. (llvm#70353)
When the top of the instantiation stack is in user code.
The goal of this PR is to allow deprecation of some char_traits
specializations in libc++ as done in https://reviews.llvm.org/D157058
which was later reverted by
llvm#66153 (comment)
as Clang never emitted the libc++ warnings.
Because Clang likes to eagerly instantiate, we can look for the location
of the top of the instantiation stack, and emit a warning if that
location is in user code.
The warning emission is forced by temporarily instructing the diag
engine not to silence warning in system headers.1 parent 9d30831 commit fe53a03
File tree
5 files changed
+77
-0
lines changed- clang
- docs
- include/clang/Sema
- lib/Sema
- test/SemaCXX
5 files changed
+77
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
459 | 459 | | |
460 | 460 | | |
461 | 461 | | |
| 462 | + | |
| 463 | + | |
462 | 464 | | |
463 | 465 | | |
464 | 466 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8464 | 8464 | | |
8465 | 8465 | | |
8466 | 8466 | | |
| 8467 | + | |
| 8468 | + | |
8467 | 8469 | | |
8468 | 8470 | | |
8469 | 8471 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
536 | 536 | | |
537 | 537 | | |
538 | 538 | | |
| 539 | + | |
| 540 | + | |
| 541 | + | |
| 542 | + | |
| 543 | + | |
| 544 | + | |
| 545 | + | |
| 546 | + | |
| 547 | + | |
| 548 | + | |
| 549 | + | |
| 550 | + | |
| 551 | + | |
| 552 | + | |
| 553 | + | |
| 554 | + | |
| 555 | + | |
| 556 | + | |
| 557 | + | |
| 558 | + | |
| 559 | + | |
| 560 | + | |
| 561 | + | |
539 | 562 | | |
540 | 563 | | |
541 | 564 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11601 | 11601 | | |
11602 | 11602 | | |
11603 | 11603 | | |
| 11604 | + | |
| 11605 | + | |
| 11606 | + | |
| 11607 | + | |
| 11608 | + | |
| 11609 | + | |
| 11610 | + | |
| 11611 | + | |
| 11612 | + | |
| 11613 | + | |
| 11614 | + | |
| 11615 | + | |
| 11616 | + | |
| 11617 | + | |
| 11618 | + | |
| 11619 | + | |
| 11620 | + | |
| 11621 | + | |
| 11622 | + | |
| 11623 | + | |
| 11624 | + | |
| 11625 | + | |
Lines changed: 28 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
0 commit comments