r241579 - 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.

Aaron Ballman aaron at aaronballman.com
Tue Jul 7 06:19:11 PDT 2015


Author: aaronballman
Date: Tue Jul  7 08:19:10 2015
New Revision: 241579

URL: http://llvm.org/viewvc/llvm-project?rev=241579&view=rev
Log:
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.

Modified:
    cfe/trunk/include/clang/AST/DataRecursiveASTVisitor.h
    cfe/trunk/include/clang/AST/RecursiveASTVisitor.h

Modified: cfe/trunk/include/clang/AST/DataRecursiveASTVisitor.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/AST/DataRecursiveASTVisitor.h?rev=241579&r1=241578&r2=241579&view=diff
==============================================================================
--- cfe/trunk/include/clang/AST/DataRecursiveASTVisitor.h (original)
+++ cfe/trunk/include/clang/AST/DataRecursiveASTVisitor.h Tue Jul  7 08:19:10 2015
@@ -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(ObjCCompatibleAliasDec
 
 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
 
 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()) {

Modified: cfe/trunk/include/clang/AST/RecursiveASTVisitor.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/AST/RecursiveASTVisitor.h?rev=241579&r1=241578&r2=241579&view=diff
==============================================================================
--- cfe/trunk/include/clang/AST/RecursiveASTVisitor.h (original)
+++ cfe/trunk/include/clang/AST/RecursiveASTVisitor.h Tue Jul  7 08:19:10 2015
@@ -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
 
 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()) {





More information about the cfe-commits mailing list