This is an archive of the discontinued LLVM Phabricator instance.

[analyzer] Suppress more C++17-related crashes.
ClosedPublic

Authored by NoQ on Mar 21 2018, 1:32 PM.

Details

Summary

This is assertion removal. The assertion was saying that a function's return value is always a temporary object - which is not true when copy elision is happening, C++17 mandatory copy elision in particular (we don't support other forms of copy elision yet, but we have no choice but to support this one).

Diff Detail

Repository
rL LLVM

Event Timeline

NoQ created this revision.Mar 21 2018, 1:32 PM
lib/StaticAnalyzer/Core/ExprEngine.cpp
480 ↗(On Diff #139361)

I'm a bit confused as to what is going on here; maybe a short comment would be helpful?
What I don't understand is that we go through that branch when construction context is supplied only to completely ignore it [..because we know better?..]

NoQ updated this revision to Diff 139378.Mar 21 2018, 3:01 PM

Add a comment for the confusing part.

NoQ marked an inline comment as done.Mar 21 2018, 3:02 PM
george.karpenkov accepted this revision.Mar 21 2018, 4:29 PM
This revision is now accepted and ready to land.Mar 21 2018, 4:29 PM
This revision was automatically updated to reflect the committed changes.