This is an archive of the discontinued LLVM Phabricator instance.

Clear should reset error to invalid instead of generic
ClosedPublic

Authored by chaoren on Jan 21 2015, 4:55 PM.

Diff Detail

Repository
rL LLVM

Event Timeline

chaoren updated this revision to Diff 18572.Jan 21 2015, 4:55 PM
chaoren retitled this revision from to Clear should reset error to invalid instead of generic.
chaoren updated this object.
chaoren edited the test plan for this revision. (Show Details)
chaoren added a subscriber: Unknown Object (MLST).
sivachandra added inline comments.
source/Core/Error.cpp
149 ↗(On Diff #18572)

Drive by comment:
While I do not know if this OK or not, you should explain why this change is required in your commit message.

It would help to see some context (eg generating the diff with -U999999. I
was trying to find the constructor, because I figure it should reset it to
whatever the constructor initializes it to, but I can't see that here.

Anyway, lgtm as long as this is what the constructor does.

It doesn't make much of a difference really, but the default type of an
error is invalid. It seems weird that clear doesn't produce the same thing
as the default constructor.

chaoren updated this revision to Diff 18623.Jan 22 2015, 10:19 AM

Here's more context. The default constructor uses eErrorTypeInvalid, so Clear() should also reset to eErrorTypeInvalid.

zturner accepted this revision.Jan 22 2015, 10:24 AM
zturner added a reviewer: zturner.

Thanks. lgtm

This revision is now accepted and ready to land.Jan 22 2015, 10:24 AM
clayborg accepted this revision.Jan 22 2015, 10:43 AM
clayborg edited edge metadata.

lgtm

Could someone commit this for me please? I don't think I have commit access.

This revision was automatically updated to reflect the committed changes.