This is an archive of the discontinued LLVM Phabricator instance.

[MSVC] Crash fix: assigning of overloaded member function pointer caused assertion
ClosedPublic

Authored by ABataev on Aug 7 2015, 5:04 AM.

Diff Detail

Repository
rL LLVM

Event Timeline

ABataev updated this revision to Diff 31504.Aug 7 2015, 5:04 AM
ABataev retitled this revision from to [MSVC] Crash fix: assigning of overloaded member function pointer caused assertion.
ABataev updated this object.
ABataev added reviewers: rnk, majnemer, rsmith.
ABataev added a subscriber: cfe-commits.
majnemer added inline comments.Aug 7 2015, 8:27 AM
lib/Sema/SemaCast.cpp
1399–1400 ↗(On Diff #31504)

There is no need for else if here because the previous if uses return to exit the function: http://llvm.org/docs/CodingStandards.html#don-t-use-else-after-a-return

lib/Sema/SemaType.cpp
6479 ↗(On Diff #31504)

This change should be unnecessary because getAs already looks through typedefs: http://clang.llvm.org/doxygen/Type_8h_source.html#l05557

ABataev updated this revision to Diff 31631.Aug 9 2015, 8:29 PM
ABataev updated this object.

Update after review

majnemer accepted this revision.Aug 9 2015, 9:01 PM
majnemer edited edge metadata.

LGTM

This revision is now accepted and ready to land.Aug 9 2015, 9:01 PM
This revision was automatically updated to reflect the committed changes.