This is an archive of the discontinued LLVM Phabricator instance.

[clang-tidy] Fix another crash in make-unique check.
ClosedPublic

Authored by hokein on Aug 8 2017, 2:00 AM.

Details

Summary

The crash happens when calling reset method without any preceding
operation like "->" or ".", this could happen in a subclass of the
"std::unique_ptr".

Diff Detail

Repository
rL LLVM

Event Timeline

hokein created this revision.Aug 8 2017, 2:00 AM
alexfh accepted this revision.Aug 9 2017, 9:42 AM

Thank you for the fix!
Looks good!

test/clang-tidy/modernize-make-unique.cpp
419 ↗(On Diff #110152)

I suspected folks were doing weird stuff to cause this crash ;]

This revision is now accepted and ready to land.Aug 9 2017, 9:42 AM
This revision was automatically updated to reflect the committed changes.