HomePhabricator

[analyzer] Model trivial copy/move ctors with an aggregate bind.

Authored by jordan_rose on Jan 30 2013, 10:16 AM.

Description

[analyzer] Model trivial copy/move ctors with an aggregate bind.

This is faster for the analyzer to process than inlining the constructor
and performing a member-wise copy, and it also solves the problem of
warning when a partially-initialized POD struct is copied.

Before:

CGPoint p;
p.x = 0;
CGPoint p2 = p; <-- assigned value is garbage or undefined

After:

CGPoint p;
p.x = 0;
CGPoint p2 = p; // no-warning

This matches our behavior in C, where we don't see a field-by-field copy.

rdar://problem/12305288

llvm-svn: 173951

Details

Committed
jordan_roseJan 30 2013, 10:16 AM
Parents
rG2625cf06ffcd: Documentation: fix escaping in JSON example
Branches
Unknown
Tags
Unknown