This is an archive of the discontinued LLVM Phabricator instance.

[Clang] Do not check if we are in a discared context in non-immediate contexts
ClosedPublic

Authored by cor3ntin on Dec 7 2021, 2:27 AM.

Details

Summary

This fixes in a regression introduced by 6eeda06c1.

When deducing the return type of nested function calls, only the
return type of the outermost expression should be ignored.

Instead of assuming all contextes nested in a discared statements
are themselves discarded, only assume that in immediate contexts.

Similarly, only consider contextes immediately in an immediate or
discarded statement as being themselves immediate.

Diff Detail

Event Timeline

cor3ntin requested review of this revision.Dec 7 2021, 2:27 AM
cor3ntin created this revision.
Herald added a project: Restricted Project. · View Herald TranscriptDec 7 2021, 2:27 AM
Herald added a subscriber: cfe-commits. · View Herald Transcript
cor3ntin updated this revision to Diff 392319.Dec 7 2021, 2:27 AM

clang-format

erichkeane accepted this revision.Dec 7 2021, 9:00 AM
This revision is now accepted and ready to land.Dec 7 2021, 9:00 AM
aaron.ballman accepted this revision.Dec 7 2021, 9:10 AM

LGTM me, I'll land shortly on your behalf.

aaron.ballman closed this revision.Dec 7 2021, 9:14 AM

Thanks for the quick fix! I've landed on your behalf in 2334314550724812bb94e36c6b5df7d665bdbd9d