Commit c86899d
authored
[clang] Add support for
In MSVC, when `/d1initall` is enabled, `__declspec(no_init_all)` can be
applied to a type to suppress auto-initialization for all instances of
that type or to a function to suppress auto-initialization for all
locals within that function.
This change does the same for Clang, except that it applies to the
`-ftrivial-auto-var-init` flag instead.
NOTE: I did not add a Clang-specific spelling for this but would be
happy to make a followup PR if folks are interested in that.__declspec(no_init_all) (#116847)1 parent 905e831 commit c86899d
File tree
4 files changed
+90
-10
lines changed- clang
- include/clang/Basic
- lib/CodeGen
- test/CodeGenCXX
4 files changed
+90
-10
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4888 | 4888 | | |
4889 | 4889 | | |
4890 | 4890 | | |
| 4891 | + | |
| 4892 | + | |
| 4893 | + | |
| 4894 | + | |
| 4895 | + | |
| 4896 | + | |
| 4897 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8760 | 8760 | | |
8761 | 8761 | | |
8762 | 8762 | | |
| 8763 | + | |
| 8764 | + | |
| 8765 | + | |
| 8766 | + | |
| 8767 | + | |
| 8768 | + | |
| 8769 | + | |
| 8770 | + | |
| 8771 | + | |
| 8772 | + | |
| 8773 | + | |
| 8774 | + | |
8763 | 8775 | | |
8764 | 8776 | | |
8765 | 8777 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1899 | 1899 | | |
1900 | 1900 | | |
1901 | 1901 | | |
| 1902 | + | |
| 1903 | + | |
| 1904 | + | |
1902 | 1905 | | |
1903 | 1906 | | |
1904 | | - | |
| 1907 | + | |
| 1908 | + | |
| 1909 | + | |
1905 | 1910 | | |
1906 | | - | |
1907 | | - | |
1908 | | - | |
| 1911 | + | |
1909 | 1912 | | |
1910 | 1913 | | |
1911 | 1914 | | |
| |||
1944 | 1947 | | |
1945 | 1948 | | |
1946 | 1949 | | |
1947 | | - | |
1948 | | - | |
| 1950 | + | |
| 1951 | + | |
1949 | 1952 | | |
1950 | 1953 | | |
1951 | 1954 | | |
1952 | | - | |
1953 | | - | |
| 1955 | + | |
| 1956 | + | |
1954 | 1957 | | |
1955 | 1958 | | |
1956 | 1959 | | |
| |||
1967 | 1970 | | |
1968 | 1971 | | |
1969 | 1972 | | |
1970 | | - | |
1971 | | - | |
| 1973 | + | |
1972 | 1974 | | |
1973 | 1975 | | |
1974 | 1976 | | |
| |||
| 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 | + | |
| 58 | + | |
| 59 | + | |
0 commit comments