Author: nico Date: Thu Apr 14 06:12:32 2016 New Revision: 266290 URL: http://llvm.org/viewvc/llvm-project?rev=266290&view=rev Log: Reapply r258505 after r266254, this time with a comment to make it more sticky.
Modified: cfe/trunk/include/clang/AST/RecursiveASTVisitor.h Modified: cfe/trunk/include/clang/AST/RecursiveASTVisitor.h URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/AST/RecursiveASTVisitor.h?rev=266290&r1=266289&r2=266290&view=diff ============================================================================== --- cfe/trunk/include/clang/AST/RecursiveASTVisitor.h (original) +++ cfe/trunk/include/clang/AST/RecursiveASTVisitor.h Thu Apr 14 06:12:32 2016 @@ -840,8 +840,14 @@ bool RecursiveASTVisitor<Derived>::Trave TRY_TO(TraverseStmt(Init->getInit())); if (getDerived().shouldVisitImplicitCode()) - for (VarDecl *VD : Init->getArrayIndices()) + // The braces for this one-line loop are required for MSVC2013. It + // refuses to compile + // for (int i : int_vec) + // do {} while(false); + // without braces on the for loop. + for (VarDecl *VD : Init->getArrayIndices()) { TRY_TO(TraverseDecl(VD)); + } return true; } _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits