This is an archive of the discontinued LLVM Phabricator instance.

Ensure virtual-near-miss does not crash on functions without names
AbandonedPublic

Authored by aaron.ballman on Jan 20 2016, 2:44 PM.

Details

Reviewers
congliu
alexfh
Summary

Special member functions don't always have names, and so calling FunctionDecl::getName() can cause assertions. This patch addresses the issue by assuming any such function needs to have the rest of its signature checked, regardless of the function name. The test case was pulled from MSVC's STL headers, where this check is causing failed assertions.

Diff Detail

Event Timeline

aaron.ballman retitled this revision from to Ensure virtual-near-miss does not crash on functions without names.
aaron.ballman updated this object.
aaron.ballman added reviewers: congliu, alexfh.
aaron.ballman added a subscriber: cfe-commits.

Now checking that both the base *and* the derived functions have names.

alexfh edited edge metadata.Jan 22 2016, 2:37 PM
alexfh added a subscriber: alexfh.

Should be fixed in http://reviews.llvm.org/D16179.

aaron.ballman abandoned this revision.Jan 23 2016, 10:00 AM

You are correct, this was fixed with http://reviews.llvm.org/D16179. Thanks!