diff options
author | Balazs Benics <benicsbalazs@gmail.com> | 2022-11-25 10:24:56 +0100 |
---|---|---|
committer | Balazs Benics <benicsbalazs@gmail.com> | 2022-11-25 10:24:56 +0100 |
commit | 36481758390caa19d54bbab94d2f5e927fbec1c2 (patch) | |
tree | 377cd55f35f772847a9ecb83dbf2af2ca943691a /llvm/lib/Support/TargetParser.cpp | |
parent | a89c9bafe67f102f224560daad28651684fed516 (diff) | |
download | llvm-36481758390caa19d54bbab94d2f5e927fbec1c2.zip llvm-36481758390caa19d54bbab94d2f5e927fbec1c2.tar.gz llvm-36481758390caa19d54bbab94d2f5e927fbec1c2.tar.bz2 |
[analyzer] Consider single-elem arrays as FAMs by default
According to my measurement in https://reviews.llvm.org/D108230#3933232,
it seems like there is no drawback to enabling this analyzer-config by default.
Actually, enabling this by default would make it consistent with the
codegen of clang, which according to `-fstrict-flex-arrays`, assumes
by default that all trailing arrays could be FAMs, let them be of size
undefined, zero, one, or anything else.
Speaking of `-fstrict-flex-arrays`, in the next patch I'll deprecate
the analyzer-config FAM option in favor of that flag. That way, CSA will
always be in sync with what the codegen will think of FAMs.
So, if a new codebase sets `-fstrict-flex-arrays` to some value above 0,
CSA will also make sure that only arrays of the right size will be
considered as FAMs.
Reviewed By: xazax.hun
Differential Revision: https://reviews.llvm.org/D138657
Diffstat (limited to 'llvm/lib/Support/TargetParser.cpp')
0 files changed, 0 insertions, 0 deletions