Go to file
Jordan Rose 8647ffcda5 [analyzer] Correctly handle destructors for lifetime-extended temporaries.
The lifetime of a temporary can be extended when it is immediately bound
to a local reference:

  const Value &MyVal = Value("temporary");

In this case, the temporary object's lifetime is extended for the entire
scope of the reference; at the end of the scope it is destroyed.

The analyzer was modeling this improperly in two ways:
- Since we don't model temporary constructors just yet, we create a fake
  temporary region when it comes time to "materialize" a temporary into
  a real object (lvalue). This wasn't taking base casts into account when
  the bindings being materialized was Unknown; now it always respects base
  casts except when the temporary region is itself a pointer.
- When actually destroying the region, the analyzer did not actually load
  from the reference variable -- it was basically destroying the reference
  instead of its referent. Now it does do the load.

This will be more useful whenever we finally start modeling temporaries,
or at least those that get bound to local reference variables.

<rdar://problem/13552274>

llvm-svn: 178697
2013-04-03 21:16:58 +00:00
clang [analyzer] Correctly handle destructors for lifetime-extended temporaries. 2013-04-03 21:16:58 +00:00
clang-tools-extra Unit test support for Clang extra tools 2013-04-03 15:11:08 +00:00
compiler-rt [Sanitizer] Fix OnPrint weak hook. Disable weak hooks for gotsan. 2013-04-03 13:22:54 +00:00
debuginfo-tests Remove IR scenario tests. 2013-03-15 20:52:10 +00:00
libclc Update the copyright coredits -- Happy new year 2013! 2013-01-01 10:00:19 +00:00
libcxx Fix stupid but harmless type-o. Fixes http://llvm.org/bugs/show_bug.cgi?id=15657. 2013-04-03 20:29:45 +00:00
libcxxabi Bruce Mitchener: Typo fixes. 2013-02-15 15:48:49 +00:00
lld Update for API change for handling mips64el. 2013-04-03 21:03:19 +00:00
lldb <rdar://problem/13561911> 2013-04-03 21:09:33 +00:00
llvm Implement the "mips endian" for r_info. 2013-04-03 21:02:51 +00:00
polly ScopDetection: Use isTopLevelRegion 2013-04-02 06:41:48 +00:00