From 3ee0e7ba9bbf3d2f32768debcccc816d8a9b3ac4 Mon Sep 17 00:00:00 2001
From: Axel Naumann <Axel.Naumann@cern.ch>
Date: Thu, 10 Jan 2019 10:17:07 +0100
Subject: [PATCH] [cling] Reduce scope of local variable.

---
 interpreter/cling/lib/Interpreter/LookupHelper.cpp | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/interpreter/cling/lib/Interpreter/LookupHelper.cpp b/interpreter/cling/lib/Interpreter/LookupHelper.cpp
index 0058c68c9ec..c550bc9129c 100644
--- a/interpreter/cling/lib/Interpreter/LookupHelper.cpp
+++ b/interpreter/cling/lib/Interpreter/LookupHelper.cpp
@@ -976,7 +976,6 @@ namespace cling {
     //  Convert the passed decl into a nested name specifier,
     //  a scope spec, and a decl context.
     //
-    NestedNameSpecifier* classNNS = 0;
     if (isa<NamespaceDecl>(scopeDecl)) {
       return foundDC;
     }
@@ -987,7 +986,7 @@ namespace cling {
       } else {
         //const Type* T = Context.getRecordType(RD).getTypePtr();
         const Type* T = Context.getTypeDeclType(RD).getTypePtr();
-        classNNS = NestedNameSpecifier::Create(Context, 0, false, T);
+        NestedNameSpecifier* classNNS = NestedNameSpecifier::Create(Context, 0, false, T);
         // We pass a 'random' but valid source range.
         CXXScopeSpec SS;
         SS.MakeTrivial(Context, classNNS, scopeDecl->getSourceRange());
-- 
GitLab