This is an archive of the discontinued LLVM Phabricator instance.

Refactor OnExit utility class in ClangUserExpression
ClosedPublic

Authored by teemperor on Jun 19 2018, 2:29 PM.

Details

Summary

OnExit ensures we call ResetDeclMap before this method ends. However,
we also have a few manual calls to ResetDeclMap in there that are actually unnecessary
because of this (calling the method multiple times has no effect). This patch also moves
the class out of the method that we can reuse it for the upcoming method that handles
parsing for completion.

Diff Detail

Repository
rL LLVM

Event Timeline

teemperor created this revision.Jun 19 2018, 2:29 PM
This revision was not accepted when it landed; it landed in state Needs Review.Jun 19 2018, 2:30 PM
This revision was automatically updated to reflect the committed changes.
labath added a subscriber: labath.Jun 19 2018, 2:42 PM

How is this class different from lldb_private::CleanUp? Shouldn't we just delete it and replace all uses with the pre-existing class?