Go to file
Artem Dergachev 647804a84a [analyzer] When creating a temporary object, properly copy the value into it.
Adjustments should be considered properly; we should copy the unadjusted object
over the whole temporary base region. If the unadjusted object is no longer
available in the Environment, invalidate the temporary base region, and then
copy the adjusted object into the adjusted sub-region of the temporary region.

This fixes a regression introduced by r288263, that caused various
false positives, due to copying only adjusted object into the adjusted region;
the rest of the base region therefore remained undefined.
Before r288263, the adjusted value was copied over the unadjusted region,
which is incorrect, but accidentally worked better due to how region store
disregards compound value bindings to non-base regions.

An additional test machinery is introduced to make sure that despite making
two binds, we only notify checkers once for both of them, without exposing
the partially copied objects.

This fix is a hack over a hack. The proper fix would be to model C++ temporaries
in the CFG, and after that dealing with adjustments would no longer be
necessary, and the values we need would no longer disappear from the
Environment.

rdar://problem/30658168

Differential Revision: https://reviews.llvm.org/D30534

llvm-svn: 298924
2017-03-28 15:43:26 +00:00
clang [analyzer] When creating a temporary object, properly copy the value into it. 2017-03-28 15:43:26 +00:00
clang-tools-extra [clangd] Add support for vscode extension configuration 2017-03-24 09:29:00 +00:00
compiler-rt Reland "[Compiler-rt][Builtins] Implement lit-test support (part 2 of 2)" 2017-03-27 23:57:44 +00:00
debuginfo-tests New round of fixes for "Always compile debuginfo-tests for the host triple" 2014-10-18 23:47:59 +00:00
libclc math: Implement sinh function 2017-02-25 02:46:53 +00:00
libcxx Mark *pass tests as UNUSUPPORTED instead of XFAIL on old compilers 2017-03-27 10:44:33 +00:00
libcxxabi Fully Reformat fallback_malloc.cpp 2017-03-04 03:23:15 +00:00
libunwind [libunwind] Add sphinx docs 2017-03-28 15:21:43 +00:00
lld Sort. 2017-03-27 03:42:55 +00:00
lldb In FileSpec::Equal, short-cut GetNormalizedPath. 2017-03-27 19:12:25 +00:00
llgo [llgo] Remove support for LLVM attributes 2016-12-06 19:22:04 +00:00
llvm [SDAG] Avoid deleted SDNodes PromoteIntBinOp 2017-03-28 15:41:12 +00:00
openmp Fix for bug https://llvm.org/bugs/show_bug.cgi?id=30889 2017-03-28 13:35:42 +00:00
parallel-libs [Axccel] Remove -Wno-missing-braces in build 2016-12-19 21:34:07 +00:00
polly [ScopInfo] Introduce ScopStmt::contains(BB*). NFC. 2017-03-23 16:12:21 +00:00