Commit 538e9e8
authored
[clang][Modules] Reporting Errors for Duplicating Link Declarations in
This PR teaches the modulemap parsing logic to report warnings that
default to errors if the parsing logic sees duplicating link
declarations in the same module. Specifically, duplicating link
declarations means multiple link declarations with the same
string-literal in the same module. No errors are reported if a same link
declaration exist in a submodule and its enclosing module.
The warning can be disabled with `-Wno-module-link-redeclaration`.
rdar://155880064modulemaps (#148959)1 parent c984132 commit 538e9e8
File tree
3 files changed
+92
-4
lines changed- clang
- include/clang/Basic
- lib/Lex
- test/ClangScanDeps
3 files changed
+92
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
912 | 912 | | |
913 | 913 | | |
914 | 914 | | |
| 915 | + | |
| 916 | + | |
| 917 | + | |
| 918 | + | |
| 919 | + | |
915 | 920 | | |
916 | 921 | | |
917 | 922 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
118 | 118 | | |
119 | 119 | | |
120 | 120 | | |
121 | | - | |
| 121 | + | |
| 122 | + | |
122 | 123 | | |
123 | 124 | | |
124 | 125 | | |
| |||
325 | 326 | | |
326 | 327 | | |
327 | 328 | | |
| 329 | + | |
328 | 330 | | |
329 | 331 | | |
330 | 332 | | |
| |||
405 | 407 | | |
406 | 408 | | |
407 | 409 | | |
408 | | - | |
| 410 | + | |
| 411 | + | |
| 412 | + | |
409 | 413 | | |
410 | 414 | | |
411 | 415 | | |
| |||
822 | 826 | | |
823 | 827 | | |
824 | 828 | | |
825 | | - | |
| 829 | + | |
| 830 | + | |
826 | 831 | | |
827 | 832 | | |
828 | 833 | | |
| |||
838 | 843 | | |
839 | 844 | | |
840 | 845 | | |
| 846 | + | |
841 | 847 | | |
842 | 848 | | |
843 | 849 | | |
844 | 850 | | |
845 | | - | |
| 851 | + | |
| 852 | + | |
| 853 | + | |
846 | 854 | | |
| 855 | + | |
| 856 | + | |
| 857 | + | |
| 858 | + | |
| 859 | + | |
| 860 | + | |
| 861 | + | |
| 862 | + | |
| 863 | + | |
| 864 | + | |
| 865 | + | |
| 866 | + | |
| 867 | + | |
| 868 | + | |
| 869 | + | |
| 870 | + | |
| 871 | + | |
| 872 | + | |
847 | 873 | | |
848 | 874 | | |
849 | 875 | | |
| |||
| 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 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
0 commit comments