r212243 - Address review feedback for r212238.

Nico Weber nicolasweber at gmx.de
Wed Jul 2 17:38:26 PDT 2014


Author: nico
Date: Wed Jul  2 19:38:25 2014
New Revision: 212243

URL: http://llvm.org/viewvc/llvm-project?rev=212243&view=rev
Log:
Address review feedback for r212238.

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.

Modified:
    cfe/trunk/lib/Sema/SemaInit.cpp

Modified: cfe/trunk/lib/Sema/SemaInit.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaInit.cpp?rev=212243&r1=212242&r2=212243&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/SemaInit.cpp (original)
+++ cfe/trunk/lib/Sema/SemaInit.cpp Wed Jul  2 19:38:25 2014
@@ -400,8 +400,7 @@ ExprResult InitListChecker::PerformEmpty
 
       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;
       }





More information about the cfe-commits mailing list