Refactor OnExit utility class in ClangUserExpression
authorRaphael Isemann <teemperor@gmail.com>
Tue, 19 Jun 2018 21:25:59 +0000 (21:25 +0000)
committerRaphael Isemann <teemperor@gmail.com>
Tue, 19 Jun 2018 21:25:59 +0000 (21:25 +0000)
commit1246890964c78b6ee1a453dc2746e8af0ec9479e
tree30c7c82318fd3830e4d720ea62bea2d34b986fd3
parent8befa295ea5436dcf4643a02f0fb6ec125f7cff3
Refactor OnExit utility class in ClangUserExpression

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.

Subscribers: lldb-commits

Differential Revision: https://reviews.llvm.org/D48337

llvm-svn: 335078
lldb/source/Plugins/ExpressionParser/Clang/ClangUserExpression.cpp