Код: Выделить всё
Checks: >
clang-analyzer-*,
bugprone-*,
cppcoreguidelines-*,
misc-*,
performance-*,
portability-*,
cert-*,
-fuchsia-*,
-llvm-header-guard,
-hicpp-*,
-google-*
CheckOptions:
- key: cppcoreguidelines-pro-type-member-init.IgnorePOD
value: false
- key: cppcoreguidelines-pro-type-member-init.IgnoreArrays
value: false
WarningsAsErrors: ''
HeaderFilterRegex: '.*'
AnalyzeTemporaryDtors: false
FormatStyle: file
enter code here
struct GlobalCooldown
{
SchoolType school_type;
double expiry_time;
bool synced;
bool expired = false;
};
< /code>
Однако он не поймает и не сообщает здесь не инициализированные поля: < /p>
struct ProcData {
ProcFlags flags;
uint32 cast_id;
uint32 spell_id;
uint64 caster_guid;
uint64 target_guid;
[[nodiscard]] bool HasProcFlag(ProcFlags flag) const
{
return (static_cast(flags) & static_cast(flag)) != 0;
}
void SetProcFlag(ProcFlags flag)
{
flags |= flag;
}
void ClearProcFlag(ProcFlags flag)
{
flags = static_cast(static_cast(flags) & ~static_cast(flag));
}
void ClearAllProcFlags()
{
flags = static_cast(0);
}
};
< /code>
Так почему это, могу ли я обнаружить все не инициализированные участники?>
Подробнее здесь: https://stackoverflow.com/questions/796 ... ed-members