]> granicus.if.org Git - clang/commitdiff
Address review feedback for r212238.
authorNico Weber <nicolasweber@gmx.de>
Thu, 3 Jul 2014 00:38:25 +0000 (00:38 +0000)
committerNico Weber <nicolasweber@gmx.de>
Thu, 3 Jul 2014 00:38:25 +0000 (00:38 +0000)
Also, forgot to say in the commit message of r212238: Library authors will
see a warning about this issue if they build with -Wsystem-headers.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@212243 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Sema/SemaInit.cpp

index 9feb9e060a438d8e44663f8b4685c2ad9d5adc77..c147034ed50943e06ca1dd709e1c4b5aafb6f7eb 100644 (file)
@@ -400,8 +400,7 @@ ExprResult InitListChecker::PerformEmptyInit(Sema &SemaRef,
 
       bool IsInStd = false;
       for (NamespaceDecl *ND = dyn_cast<NamespaceDecl>(R->getDeclContext());
-           ND && !IsInStd;
-          ND = dyn_cast<NamespaceDecl>(ND->getLexicalParent())) {
+           ND && !IsInStd; ND = dyn_cast<NamespaceDecl>(ND->getParent())) {
         if (SemaRef.getStdNamespace()->InEnclosingNamespaceSetOf(ND))
           IsInStd = true;
       }