No uninitialized warning for member variable and getter #78129
Labels
clang:diagnostics
New/improved warning or error message in Clang, but not in clang-tidy or static analyzer
compiler-rt:ubsan
Undefined behavior sanitizer
clang does not generate any warning, even with optimizations enabled.
It generates a warning if
a() : i(get_i()){}
is changed toa() : i(i){}
.Example on godbolt, with comparison with GCC, which does generate a warning when optimizations are enabled
https://godbolt.org/z/6E43zroWj
The text was updated successfully, but these errors were encountered: