From: Aaron Ballman Date: Tue, 7 Jul 2015 13:19:10 +0000 (+0000) Subject: Appease MSVC 2013 a few more times, which was complaining about a syntax error with... X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=04936365ad960a3b5120d3b7c39a69bae78abf97;p=clang Appease MSVC 2013 a few more times, which was complaining about a syntax error with an unexpected close curly brace. For some reason, the range-based for loop requires curly braces to compile in MSVC. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@241579 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/include/clang/AST/DataRecursiveASTVisitor.h b/include/clang/AST/DataRecursiveASTVisitor.h index 0d47771eb3..dd167fe27c 100644 --- a/include/clang/AST/DataRecursiveASTVisitor.h +++ b/include/clang/AST/DataRecursiveASTVisitor.h @@ -940,8 +940,9 @@ DEF_TRAVERSE_TYPE(ObjCObjectType, { // type is itself. if (T->getBaseType().getTypePtr() != T) TRY_TO(TraverseType(T->getBaseType())); - for (auto typeArg : T->getTypeArgsAsWritten()) + for (auto typeArg : T->getTypeArgsAsWritten()) { TRY_TO(TraverseType(typeArg)); + } }) DEF_TRAVERSE_TYPE(ObjCObjectPointerType, @@ -1312,8 +1313,9 @@ DEF_TRAVERSE_DECL(ObjCCompatibleAliasDecl, {// FIXME: implement DEF_TRAVERSE_DECL(ObjCCategoryDecl, {// FIXME: implement if (ObjCTypeParamList *typeParamList = D->getTypeParamList()) { - for (auto typeParam : *typeParamList) + for (auto typeParam : *typeParamList) { TRY_TO(TraverseObjCTypeParamDecl(typeParam)); + } } return true; }) @@ -1326,8 +1328,9 @@ DEF_TRAVERSE_DECL(ObjCImplementationDecl, {// FIXME: implement DEF_TRAVERSE_DECL(ObjCInterfaceDecl, {// FIXME: implement if (ObjCTypeParamList *typeParamList = D->getTypeParamListAsWritten()) { - for (auto typeParam : *typeParamList) + for (auto typeParam : *typeParamList) { TRY_TO(TraverseObjCTypeParamDecl(typeParam)); + } } if (TypeSourceInfo *superTInfo = D->getSuperClassTInfo()) { diff --git a/include/clang/AST/RecursiveASTVisitor.h b/include/clang/AST/RecursiveASTVisitor.h index 785bd59b78..1017656b66 100644 --- a/include/clang/AST/RecursiveASTVisitor.h +++ b/include/clang/AST/RecursiveASTVisitor.h @@ -1008,8 +1008,9 @@ DEF_TRAVERSE_TYPE(ObjCObjectType, { // type is itself. if (T->getBaseType().getTypePtr() != T) TRY_TO(TraverseType(T->getBaseType())); - for (auto typeArg : T->getTypeArgsAsWritten()) + for (auto typeArg : T->getTypeArgsAsWritten()) { TRY_TO(TraverseType(typeArg)); + } }) DEF_TRAVERSE_TYPE(ObjCObjectPointerType, @@ -1401,8 +1402,9 @@ DEF_TRAVERSE_DECL(ObjCImplementationDecl, {// FIXME: implement DEF_TRAVERSE_DECL(ObjCInterfaceDecl, {// FIXME: implement if (ObjCTypeParamList *typeParamList = D->getTypeParamListAsWritten()) { - for (auto typeParam : *typeParamList) + for (auto typeParam : *typeParamList) { TRY_TO(TraverseObjCTypeParamDecl(typeParam)); + } } if (TypeSourceInfo *superTInfo = D->getSuperClassTInfo()) {