Copy elision occurs when
- a temporary object (with its corresponding temporary object construction context) is constructed and
- it is immediately copied or moved into any other object (with its own construction context, which can be any construction context).
Constructor on step 2 would then be called "elidable".
Copy elision consists in skipping ("eliding") the constructor on step 2 and performing the constructor on step 1 as if it was constructing the object of step 2. Additionally, destructors are skipped for the temporary object constructed on step 1.
The current patch modifies the temporary object construction context for constructor on step 1 to include information about the upcoming step 2. Only temporary object construction contexts would need to be updated because step 1 always has a temporary object construction context.
The updated context will include both a reference to the elidable construct-expression of step 2 and the construction context of step 2. This will allow the analyzer to both skip the elidable constructor itself when it's encountered and compute the correct target region associated with step 2 while modeling step 1.
TOTHINK: whether "temporary object construction context with elision" should be a separate construction context sub-class.