This is an archive of the discontinued LLVM Phabricator instance.

Fix for PR18393 - emit error when abstract type is returned by value
Needs ReviewPublic

Authored by matekm on Aug 3 2014, 7:03 AM.

Details

Reviewers
rsmith
Summary

Clang doesn't emit error message when return type of declared method is an abstract type. This error is catched when method is defined but it would be cool to catch it as soon as possible.

This patch removes check that prevented checking if method return type is abstract in record context. I also added additional test to prevent regression in this context.

Br,
Robert

Diff Detail

Event Timeline

matekm updated this revision to Diff 12146.Aug 3 2014, 7:03 AM
matekm retitled this revision from to Fix for PR18393 - emit error when abstract type is returned by value.
matekm updated this object.
matekm edited the test plan for this revision. (Show Details)
matekm added a subscriber: Unknown Object (MLST).
matekm updated this revision to Diff 12147.Aug 3 2014, 7:25 AM

Update diff as tests were not complete - check for note was missing

rsmith edited edge metadata.Sep 23 2014, 4:42 PM

We need to defer this check in the case where the type in question is still being defined.

lib/Sema/SemaDecl.cpp
6497–6498

This comment describes how this case is intended to be handled; we need more digging to figure out what's actually wrong here.