diff --git a/interpreter/cling/lib/Interpreter/ASTNodeEraser.cpp b/interpreter/cling/lib/Interpreter/ASTNodeEraser.cpp index dff4bcaff5641b0e7b5565283843211924acc510..5de321759b28884a4005a46729c6cb9f4eaae7f5 100644 --- a/interpreter/cling/lib/Interpreter/ASTNodeEraser.cpp +++ b/interpreter/cling/lib/Interpreter/ASTNodeEraser.cpp @@ -347,8 +347,7 @@ namespace cling { // If the decl was removed make sure that we fix the lookup if (Successful) { - Scope* S = m_Sema->getScopeForContext(DC); - if (S) + if (Scope* S = m_Sema->getScopeForContext(DC)) S->RemoveDecl(ND); if (isOnScopeChains(ND))