[all-commits] [llvm/llvm-project] 0b41e6: [clang-tidy] adjust treating of array-of-pointers ...
Nikita Popov via All-commits
all-commits at lists.llvm.org
Thu Sep 29 23:20:58 PDT 2022
Branch: refs/heads/release/15.x
Home: https://github.com/llvm/llvm-project
Commit: 0b41e633a3380676c821bca85ff0e8884fac5929
https://github.com/llvm/llvm-project/commit/0b41e633a3380676c821bca85ff0e8884fac5929
Author: Jonas Toth <development at jonas-toth.eu>
Date: 2022-09-30 (Fri, 30 Sep 2022)
Changed paths:
M clang-tools-extra/clang-tidy/misc/ConstCorrectnessCheck.cpp
M clang-tools-extra/test/clang-tidy/checkers/misc/const-correctness-pointer-as-values.cpp
M clang-tools-extra/test/clang-tidy/checkers/misc/const-correctness-values.cpp
Log Message:
-----------
[clang-tidy] adjust treating of array-of-pointers when 'AnalyzePointers' is deactivated
'misc-const-correctness' previously considered arrays as 'Values' independent of the type of the elements.
This is inconsistent with the configuration of the check to disable treating pointers as values.
This patch rectifies this inconsistency.
Fixes #56749
Reviewed By: njames93
Differential Revision: https://reviews.llvm.org/D130793
(cherry picked from commit e66345d54d5f5e803f54c1ace487d57bb11ee884)
Commit: d3e48d9320235275e9d9ca9d58e6b6ebc5fe0a35
https://github.com/llvm/llvm-project/commit/d3e48d9320235275e9d9ca9d58e6b6ebc5fe0a35
Author: Jonas Toth <development at jonas-toth.eu>
Date: 2022-09-30 (Fri, 30 Sep 2022)
Changed paths:
M clang-tools-extra/docs/clang-tidy/checks/misc/const-correctness.rst
Log Message:
-----------
[docs] improve documentation for misc-const-correctness
Improve the documentation for 'misc-const-correctness' to:
- include better examples
- improve the english
- fix links to other checks that were broken due to the directory-layout changes
- mention the limitation that the check does not run on `C` code.
Addresses #56749, #56958
Reviewed By: njames93
Differential Revision: https://reviews.llvm.org/D132244
(cherry picked from commit b5b750346346bfe95c7c6b1cceacc6cfccc8f4f4)
Commit: bcb9b9fc44e4d58877873b5b4b310b0c235017fe
https://github.com/llvm/llvm-project/commit/bcb9b9fc44e4d58877873b5b4b310b0c235017fe
Author: Gergely Nagy <ngg at ngg.hu>
Date: 2022-09-30 (Fri, 30 Sep 2022)
Changed paths:
M libcxx/include/__config
M libcxx/include/stdatomic.h
M libcxx/test/libcxx/include_as_c.sh.cpp
Log Message:
-----------
[libcxx] Make stdatomic.h work when included from a C source file
If a C source file includes the libc++ stdatomic.h, compilation will
break because (a) the C++ standard check will fail (which is expected),
and (b) `_LIBCPP_COMPILER_CLANG_BASED` won't be defined because the
logic defining it in `__config` is guarded by a `__cplusplus` check, so
we'll end up with a blank header. Move the detection logic outside of
the `__cplusplus` check to make the second check pass even in a C context
when you're using Clang. Note that `_LIBCPP_STD_VER` is not defined when
in C mode, hence stdatomic.h needs to check if in C++ mode before using
that macro to avoid a warning.
In an ideal world, a C source file wouldn't be including the libc++
header directory in its search path, so we'd never have this issue.
Unfortunately, certain build environments make this hard to guarantee,
and in this case it's easy to tweak this header to make it work in a C
context, so I'm hoping this is acceptable.
Fixes https://github.com/llvm/llvm-project/issues/57710.
Differential Revision: https://reviews.llvm.org/D134591
(cherry picked from commit afec0f0ec38a72bcc6a697c1cefb1dac0bbd02fb)
Commit: 6ba100a83f14e3a361c2dd298405dc747a4a02c4
https://github.com/llvm/llvm-project/commit/6ba100a83f14e3a361c2dd298405dc747a4a02c4
Author: Nikita Popov <npopov at redhat.com>
Date: 2022-09-30 (Fri, 30 Sep 2022)
Changed paths:
M llvm/test/Transforms/InstSimplify/floating-point-compare.ll
Log Message:
-----------
[InstSimplify] Add test for PR58046 (NFC)
Commit: 77ff99c10bee11a202dbe5fd1a08d8394d7828af
https://github.com/llvm/llvm-project/commit/77ff99c10bee11a202dbe5fd1a08d8394d7828af
Author: Nikita Popov <npopov at redhat.com>
Date: 2022-09-30 (Fri, 30 Sep 2022)
Changed paths:
M llvm/lib/Analysis/ValueTracking.cpp
M llvm/test/Transforms/InstSimplify/floating-point-compare.ll
Log Message:
-----------
[ValueTracking] Fix CannotBeOrderedLessThanZero() for fdiv (PR58046)
When checking the RHS of fdiv, we should set the SignBitOnly flag,
because a negative zero can become -Inf, which is ordered less
than zero.
Fixes https://github.com/llvm/llvm-project/issues/58046.
Differential Revision: https://reviews.llvm.org/D134876
Compare: https://github.com/llvm/llvm-project/compare/10a54971b0d3...77ff99c10bee
More information about the All-commits
mailing list