FailedChanges

Summary

  1. Mark the newly added '__libcpp_is_constant_evaluated' as 'inline', since it can be included multiple times by multiple headers, and we don't want 'duplicate definition' errors.
  2. Revert Remove scudo standalone tests from check-all This reverts r364877 (git commit dfae3705b75e6b5e1e163c78ab2df705a3388d89) This didn't solve my problem so I've reverted it.
  3. Remove scudo standalone tests from check-all They appear to fail to link in various 32-bit configurations for unknown reasons. This change was already reverted, and it seems preferable to me to make forward progress and remove this once the problems are fully understood.
  4. Revert Recommit [PowerPC] Update P9 vector costs for insert/extract element This reverts r364557 (git commit 9f7f5858fe46b8e706e87a83e2fd0a2678be619e) This crashes as reported on the commit thread. Repro instructions TBD.
  5. [analyzer] Support kfree in MallocChecker Summary: kmalloc is freed with kfree in the linux kernel. kmalloc support was added in r204832, but kfree was not. Adding kfree fixes incorrectly detected memory leaks. Reviewers: NoQ, nickdesaulniers, dcoughlin, Szelethus Reviewed By: NoQ, Szelethus Subscribers: xazax.hun, baloghadamsoftware, szepet, a.sidorin, mikhail.ramalho, Szelethus, donat.nagy, dkrupp, Charusso, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D64030
  6. [TSan] Improve handling of stack pointer mangling in {set,long}jmp, pt.3 Remove unnecessary computation of mangled SP for x86_64 architecture. Reviewed By: dvyukov Differential Revision: https://reviews.llvm.org/D63944
  7. Add a private call '__libcpp_is_constant_evaluated' which 'works' for old language versions and w/o any compiler support. 'Working', in this case, means that it returns false in those cases.
  8. [cmake] With utils disabled, don't build tblgen in cross mode Summary: In cross mode, we build a separate NATIVE tblgen that runs on the host and is used during the build. Separately, we have a flag that disables building all executables in utils/. Of course generally, this doesn't turn off tblgen, since we need that during the build. In cross mode, however, that tblegen is useless since we never actually use it. Furthermore, it can be actively problematic if the cross toolchain doesn't like building executables for whatever reason. And even if building executables works fine, we can at least save compile time by omitting it from the target build. There's two changes needed to make this happen: - Stop creating a dependency from the native tool to the target tool. No such dependency is required for a correct build, so I'm not entirely sure why it was there in the first place. - If utils were disabled on the CMake command line and we're in cross mode, respect that by excluding it from the install target (using EXCLUDE_FROM_ALL). Reviewers: smeenai Differential Revision: https://reviews.llvm.org/D64032
  9. [analyzer] exploded-graph-rewriter: NFC: Add a forgotten test file. This fell off of r364865.
  10. [analyzer] Fix invalidation when returning into a ctor initializer. Due to RVO the target region of a function that returns an object by value isn't necessarily a temporary object region; it may be an arbitrary memory region. In particular, it may be a field of a bigger object. Make sure we don't invalidate the bigger object when said function is evaluated conservatively. Differential Revision: https://reviews.llvm.org/D63968
  11. [analyzer] NonnullGlobalConstants: Don't be confused by a _Nonnull attribute. The NonnullGlobalConstants checker models the rule "it doesn't make sense to make a constant global pointer and initialize it to null"; it makes sure that whatever it's initialized with is known to be non-null. Ironically, annotating the type of the pointer as _Nonnull breaks the checker. Fix handling of the _Nonnull annotation so that it was instead one more reason to believe that the value is non-null. Differential Revision: https://reviews.llvm.org/D63956
  12. [analyzer] CStringChecker: Modernize to use CallDescriptions. This patch uses the new CDF_MaybeBuiltin flag to handle C library functions. It's mostly an NFC/refactoring pass, but it does fix a bug in handling memset() when it expands to __builtin___memset_chk() because the latter has one more argument and memset() handling code was trying to match the exact number of arguments. Now the code is deduplicated and there's less room for mistakes. Differential Revision: https://reviews.llvm.org/D62557
  13. [analyzer] NFC: CallDescription: Implement describing C library functions. When matching C standard library functions in the checker, it's easy to forget that they are often implemented as macros that are expanded to builtins. Such builtins would have a different name, so matching the callee identifier would fail, or may sometimes have more arguments than expected, so matching the exact number of arguments would fail, but this is fine as long as we have all the arguments that we need in their respective places. This patch adds a set of flags to the CallDescription class so that to handle various special matching rules, and adds the first flag into this set, which enables a more fuzzy matching for functions that may be implemented as compiler builtins. Differential Revision: https://reviews.llvm.org/D62556
  14. [analyzer] NFC: Add a convenient CallDescriptionMap class. It encapsulates the procedure of figuring out whether a call event corresponds to a function that's modeled by a checker. Checker developers no longer need to worry about performance of lookups into their own custom maps. Add unittests - which finally test CallDescription itself as well. Differential Revision: https://reviews.llvm.org/D62441
  15. [analyzer] exploded-graph-rewriter: Add support for dynamic types. Slightly cleanup emission of horizontal lines and unhardcode the title for generic maps. Differential Revision: https://reviews.llvm.org/D64041
  16. [analyzer] exploded-graph-rewriter: Implement program point tags. Keep them on a separate line for more visibility. Differential Revision: https://reviews.llvm.org/D63965
  17. Update status for bit operations
  18. Bit Operations: P0556, P0553 and P1355. Reviewed as: https://reviews.llvm.org/D51262
  19. [PGO] Update ICP pass for recent byval type changes Fixes verifier errors encountered in PR42413. Reviewers: xur, t.p.northover, inglorion, gbiv, george.burgess.iv Differential Revision: https://reviews.llvm.org/D63842
Revision 364879 by marshall:
Mark the newly added '__libcpp_is_constant_evaluated' as 'inline', since it can be included multiple times by multiple headers, and we don't want 'duplicate definition' errors.
Change TypePath in RepositoryPath in Workspace
The file was modified/libcxx/trunk/include/type_traits (diff)libcxx.src/include/type_traits
Revision 364878 by rnk:
Revert Remove scudo standalone tests from check-all

This reverts r364877 (git commit dfae3705b75e6b5e1e163c78ab2df705a3388d89)

This didn't solve my problem so I've reverted it.
Change TypePath in RepositoryPath in Workspace
The file was modified/compiler-rt/trunk/lib/scudo/standalone/tests/CMakeLists.txt (diff)compiler-rt.src/lib/scudo/standalone/tests/CMakeLists.txt
Revision 364877 by rnk:
Remove scudo standalone tests from check-all

They appear to fail to link in various 32-bit configurations for unknown
reasons. This change was already reverted, and it seems preferable to me
to make forward progress and remove this once the problems are fully
understood.
Change TypePath in RepositoryPath in Workspace
The file was modified/compiler-rt/trunk/lib/scudo/standalone/tests/CMakeLists.txt (diff)compiler-rt.src/lib/scudo/standalone/tests/CMakeLists.txt
Revision 364876 by rupprecht:
Revert Recommit [PowerPC] Update P9 vector costs for insert/extract element

This reverts r364557 (git commit 9f7f5858fe46b8e706e87a83e2fd0a2678be619e)

This crashes as reported on the commit thread. Repro instructions TBD.
Change TypePath in RepositoryPath in Workspace
The file was modified/llvm/trunk/lib/Target/PowerPC/PPCTargetTransformInfo.cpp (diff)llvm.src/lib/Target/PowerPC/PPCTargetTransformInfo.cpp
The file was modified/llvm/trunk/test/Analysis/CostModel/PowerPC/insert_extract.ll (diff)llvm.src/test/Analysis/CostModel/PowerPC/insert_extract.ll
Revision 364875 by nathan-huckleberry:
[analyzer] Support kfree in MallocChecker

Summary:
kmalloc is freed with kfree in the linux kernel. kmalloc support was
added in r204832, but kfree was not. Adding kfree fixes incorrectly
detected memory leaks.

Reviewers: NoQ, nickdesaulniers, dcoughlin, Szelethus

Reviewed By: NoQ, Szelethus

Subscribers: xazax.hun, baloghadamsoftware, szepet, a.sidorin, mikhail.ramalho, Szelethus, donat.nagy, dkrupp, Charusso, cfe-commits

Tags: #clang

Differential Revision: https://reviews.llvm.org/D64030
Change TypePath in RepositoryPath in Workspace
The file was modified/cfe/trunk/lib/StaticAnalyzer/Checkers/MallocChecker.cpp (diff)clang.src/lib/StaticAnalyzer/Checkers/MallocChecker.cpp
The file was modified/cfe/trunk/test/Analysis/kmalloc-linux.c (diff)clang.src/test/Analysis/kmalloc-linux.c
Revision 364874 by yln:
[TSan] Improve handling of stack pointer mangling in {set,long}jmp, pt.3

Remove unnecessary computation of mangled SP for x86_64 architecture.

Reviewed By: dvyukov

Differential Revision: https://reviews.llvm.org/D63944
Change TypePath in RepositoryPath in Workspace
The file was modified/compiler-rt/trunk/lib/tsan/rtl/tsan_interceptors.cc (diff)compiler-rt.src/lib/tsan/rtl/tsan_interceptors.cc
The file was modified/compiler-rt/trunk/lib/tsan/rtl/tsan_rtl_amd64.S (diff)compiler-rt.src/lib/tsan/rtl/tsan_rtl_amd64.S
Revision 364873 by marshall:
Add a private call '__libcpp_is_constant_evaluated' which 'works' for old language versions and w/o any compiler support. 'Working', in this case, means that it returns false in those cases.
Change TypePath in RepositoryPath in Workspace
The file was modified/libcxx/trunk/include/type_traits (diff)libcxx.src/include/type_traits
The file was added/libcxx/trunk/test/libcxx/type_traits/is_constant_evaluated.pass.cpplibcxx.src/test/libcxx/type_traits/is_constant_evaluated.pass.cpp
Revision 364872 by kfischer:
[cmake] With utils disabled, don't build tblgen in cross mode

Summary:
In cross mode, we build a separate NATIVE tblgen that runs on the
host and is used during the build. Separately, we have a flag that
disables building all executables in utils/. Of course generally,
this doesn't turn off tblgen, since we need that during the build.
In cross mode, however, that tblegen is useless since we never
actually use it. Furthermore, it can be actively problematic if the
cross toolchain doesn't like building executables for whatever reason.
And even if building executables works fine, we can at least save
compile time by omitting it from the target build. There's two changes
needed to make this happen:
- Stop creating a dependency from the native tool to the target tool.
  No such dependency is required for a correct build, so I'm not entirely
  sure why it was there in the first place.
- If utils were disabled on the CMake command line and we're in cross mode,
  respect that by excluding it from the install target (using EXCLUDE_FROM_ALL).

Reviewers: smeenai
Differential Revision: https://reviews.llvm.org/D64032
Change TypePath in RepositoryPath in Workspace
The file was modified/llvm/trunk/cmake/modules/TableGen.cmake (diff)llvm.src/cmake/modules/TableGen.cmake
Revision 364871 by dergachev:
[analyzer] exploded-graph-rewriter: NFC: Add a forgotten test file.

This fell off of r364865.
Change TypePath in RepositoryPath in Workspace
The file was added/cfe/trunk/test/Analysis/exploded-graph-rewriter/dynamic_types.cppclang.src/test/Analysis/exploded-graph-rewriter/dynamic_types.cpp
Revision 364870 by dergachev:
[analyzer] Fix invalidation when returning into a ctor initializer.

Due to RVO the target region of a function that returns an object by
value isn't necessarily a temporary object region; it may be an
arbitrary memory region. In particular, it may be a field of a bigger
object.

Make sure we don't invalidate the bigger object when said function is
evaluated conservatively.

Differential Revision: https://reviews.llvm.org/D63968
Change TypePath in RepositoryPath in Workspace
The file was modified/cfe/trunk/lib/StaticAnalyzer/Core/ExprEngineCallAndReturn.cpp (diff)clang.src/lib/StaticAnalyzer/Core/ExprEngineCallAndReturn.cpp
The file was added/cfe/trunk/test/Analysis/rvo.cppclang.src/test/Analysis/rvo.cpp
Revision 364869 by dergachev:
[analyzer] NonnullGlobalConstants: Don't be confused by a _Nonnull attribute.

The NonnullGlobalConstants checker models the rule "it doesn't make sense
to make a constant global pointer and initialize it to null"; it makes sure
that whatever it's initialized with is known to be non-null.

Ironically, annotating the type of the pointer as _Nonnull breaks the checker.

Fix handling of the _Nonnull annotation so that it was instead one more reason
to believe that the value is non-null.

Differential Revision: https://reviews.llvm.org/D63956
Change TypePath in RepositoryPath in Workspace
The file was modified/cfe/trunk/lib/StaticAnalyzer/Checkers/NonnullGlobalConstantsChecker.cpp (diff)clang.src/lib/StaticAnalyzer/Checkers/NonnullGlobalConstantsChecker.cpp
The file was modified/cfe/trunk/test/Analysis/nonnull-global-constants.mm (diff)clang.src/test/Analysis/nonnull-global-constants.mm
Revision 364868 by dergachev:
[analyzer] CStringChecker: Modernize to use CallDescriptions.

This patch uses the new CDF_MaybeBuiltin flag to handle C library functions.
It's mostly an NFC/refactoring pass, but it does fix a bug in handling memset()
when it expands to __builtin___memset_chk() because the latter has
one more argument and memset() handling code was trying to match
the exact number of arguments. Now the code is deduplicated and there's
less room for mistakes.

Differential Revision: https://reviews.llvm.org/D62557
Change TypePath in RepositoryPath in Workspace
The file was modified/cfe/trunk/lib/StaticAnalyzer/Checkers/CStringChecker.cpp (diff)clang.src/lib/StaticAnalyzer/Checkers/CStringChecker.cpp
The file was modified/cfe/trunk/test/Analysis/string.c (diff)clang.src/test/Analysis/string.c
Revision 364867 by dergachev:
[analyzer] NFC: CallDescription: Implement describing C library functions.

When matching C standard library functions in the checker, it's easy to forget
that they are often implemented as macros that are expanded to builtins.

Such builtins would have a different name, so matching the callee identifier
would fail, or may sometimes have more arguments than expected, so matching
the exact number of arguments would fail, but this is fine as long as we have
all the arguments that we need in their respective places.

This patch adds a set of flags to the CallDescription class so that to handle
various special matching rules, and adds the first flag into this set,
which enables a more fuzzy matching for functions that
may be implemented as compiler builtins.

Differential Revision: https://reviews.llvm.org/D62556
Change TypePath in RepositoryPath in Workspace
The file was modified/cfe/trunk/include/clang/StaticAnalyzer/Core/PathSensitive/CallEvent.h (diff)clang.src/include/clang/StaticAnalyzer/Core/PathSensitive/CallEvent.h
The file was modified/cfe/trunk/lib/StaticAnalyzer/Core/CallEvent.cpp (diff)clang.src/lib/StaticAnalyzer/Core/CallEvent.cpp
The file was modified/cfe/trunk/unittests/StaticAnalyzer/CallDescriptionTest.cpp (diff)clang.src/unittests/StaticAnalyzer/CallDescriptionTest.cpp
Revision 364866 by dergachev:
[analyzer] NFC: Add a convenient CallDescriptionMap class.

It encapsulates the procedure of figuring out whether a call event
corresponds to a function that's modeled by a checker.

Checker developers no longer need to worry about performance of
lookups into their own custom maps.

Add unittests - which finally test CallDescription itself as well.

Differential Revision: https://reviews.llvm.org/D62441
Change TypePath in RepositoryPath in Workspace
The file was modified/cfe/trunk/include/clang/StaticAnalyzer/Core/PathSensitive/CallEvent.h (diff)clang.src/include/clang/StaticAnalyzer/Core/PathSensitive/CallEvent.h
The file was modified/cfe/trunk/lib/StaticAnalyzer/Core/CallEvent.cpp (diff)clang.src/lib/StaticAnalyzer/Core/CallEvent.cpp
The file was modified/cfe/trunk/unittests/StaticAnalyzer/CMakeLists.txt (diff)clang.src/unittests/StaticAnalyzer/CMakeLists.txt
The file was added/cfe/trunk/unittests/StaticAnalyzer/CallDescriptionTest.cppclang.src/unittests/StaticAnalyzer/CallDescriptionTest.cpp
The file was modified/cfe/trunk/unittests/StaticAnalyzer/Reusables.h (diff)clang.src/unittests/StaticAnalyzer/Reusables.h
Revision 364865 by dergachev:
[analyzer] exploded-graph-rewriter: Add support for dynamic types.

Slightly cleanup emission of horizontal lines and unhardcode the title
for generic maps.

Differential Revision: https://reviews.llvm.org/D64041
Change TypePath in RepositoryPath in Workspace
The file was modified/cfe/trunk/test/Analysis/exploded-graph-rewriter/constraints.dot (diff)clang.src/test/Analysis/exploded-graph-rewriter/constraints.dot
The file was modified/cfe/trunk/test/Analysis/exploded-graph-rewriter/constraints_diff.dot (diff)clang.src/test/Analysis/exploded-graph-rewriter/constraints_diff.dot
The file was modified/cfe/trunk/test/Analysis/exploded-graph-rewriter/environment.dot (diff)clang.src/test/Analysis/exploded-graph-rewriter/environment.dot
The file was modified/cfe/trunk/test/Analysis/exploded-graph-rewriter/environment_diff.dot (diff)clang.src/test/Analysis/exploded-graph-rewriter/environment_diff.dot
The file was modified/cfe/trunk/test/Analysis/exploded-graph-rewriter/store.dot (diff)clang.src/test/Analysis/exploded-graph-rewriter/store.dot
The file was modified/cfe/trunk/test/Analysis/exploded-graph-rewriter/store_diff.dot (diff)clang.src/test/Analysis/exploded-graph-rewriter/store_diff.dot
The file was modified/cfe/trunk/utils/analyzer/exploded-graph-rewriter.py (diff)clang.src/utils/analyzer/exploded-graph-rewriter.py
Revision 364864 by dergachev:
[analyzer] exploded-graph-rewriter: Implement program point tags.

Keep them on a separate line for more visibility.

Differential Revision: https://reviews.llvm.org/D63965
Change TypePath in RepositoryPath in Workspace
The file was modified/cfe/trunk/test/Analysis/exploded-graph-rewriter/program_points.dot (diff)clang.src/test/Analysis/exploded-graph-rewriter/program_points.dot
The file was modified/cfe/trunk/utils/analyzer/exploded-graph-rewriter.py (diff)clang.src/utils/analyzer/exploded-graph-rewriter.py
Revision 364863 by marshall:
Update status for bit operations
Change TypePath in RepositoryPath in Workspace
The file was modified/libcxx/trunk/www/cxx2a_status.html (diff)libcxx.src/www/cxx2a_status.html
Revision 364862 by marshall:
Bit Operations: P0556, P0553 and P1355. Reviewed as: https://reviews.llvm.org/D51262
Change TypePath in RepositoryPath in Workspace
The file was modified/libcxx/trunk/include/bit (diff)libcxx.src/include/bit
The file was added/libcxx/trunk/test/std/numerics/bitlibcxx.src/test/std/numerics/bit
The file was added/libcxx/trunk/test/std/numerics/bit/bit.pow.twolibcxx.src/test/std/numerics/bit/bit.pow.two
The file was added/libcxx/trunk/test/std/numerics/bit/bit.pow.two/ceil2.fail.cpplibcxx.src/test/std/numerics/bit/bit.pow.two/ceil2.fail.cpp
The file was added/libcxx/trunk/test/std/numerics/bit/bit.pow.two/ceil2.pass.cpplibcxx.src/test/std/numerics/bit/bit.pow.two/ceil2.pass.cpp
The file was added/libcxx/trunk/test/std/numerics/bit/bit.pow.two/floor2.pass.cpplibcxx.src/test/std/numerics/bit/bit.pow.two/floor2.pass.cpp
The file was added/libcxx/trunk/test/std/numerics/bit/bit.pow.two/ispow2.pass.cpplibcxx.src/test/std/numerics/bit/bit.pow.two/ispow2.pass.cpp
The file was added/libcxx/trunk/test/std/numerics/bit/bit.pow.two/log2p1.pass.cpplibcxx.src/test/std/numerics/bit/bit.pow.two/log2p1.pass.cpp
The file was added/libcxx/trunk/test/std/numerics/bit/bitops.countlibcxx.src/test/std/numerics/bit/bitops.count
The file was added/libcxx/trunk/test/std/numerics/bit/bitops.count/countl_one.pass.cpplibcxx.src/test/std/numerics/bit/bitops.count/countl_one.pass.cpp
The file was added/libcxx/trunk/test/std/numerics/bit/bitops.count/countl_zero.pass.cpplibcxx.src/test/std/numerics/bit/bitops.count/countl_zero.pass.cpp
The file was added/libcxx/trunk/test/std/numerics/bit/bitops.count/countr_one.pass.cpplibcxx.src/test/std/numerics/bit/bitops.count/countr_one.pass.cpp
The file was added/libcxx/trunk/test/std/numerics/bit/bitops.count/countr_zero.pass.cpplibcxx.src/test/std/numerics/bit/bitops.count/countr_zero.pass.cpp
The file was added/libcxx/trunk/test/std/numerics/bit/bitops.count/popcount.pass.cpplibcxx.src/test/std/numerics/bit/bitops.count/popcount.pass.cpp
The file was added/libcxx/trunk/test/std/numerics/bit/bitops.rotlibcxx.src/test/std/numerics/bit/bitops.rot
The file was added/libcxx/trunk/test/std/numerics/bit/bitops.rot/rotl.pass.cpplibcxx.src/test/std/numerics/bit/bitops.rot/rotl.pass.cpp
The file was added/libcxx/trunk/test/std/numerics/bit/bitops.rot/rotr.pass.cpplibcxx.src/test/std/numerics/bit/bitops.rot/rotr.pass.cpp
The file was added/libcxx/trunk/test/std/numerics/bit/nothing_to_do.pass.cpplibcxx.src/test/std/numerics/bit/nothing_to_do.pass.cpp
Revision 364861 by rnk:
[PGO] Update ICP pass for recent byval type changes

Fixes verifier errors encountered in PR42413.

Reviewers: xur, t.p.northover, inglorion, gbiv, george.burgess.iv

Differential Revision: https://reviews.llvm.org/D63842
Change TypePath in RepositoryPath in Workspace
The file was modified/llvm/trunk/lib/Transforms/Utils/CallPromotionUtils.cpp (diff)llvm.src/lib/Transforms/Utils/CallPromotionUtils.cpp
The file was added/llvm/trunk/test/Transforms/PGOProfile/indirect_call_promotion_byval.llllvm.src/test/Transforms/PGOProfile/indirect_call_promotion_byval.ll