]> granicus.if.org Git - clang/commitdiff
Work around MSVC parser bug by putting redundant braces around the body of
authorRichard Smith <richard-llvm@metafoo.co.uk>
Thu, 18 Sep 2014 03:49:06 +0000 (03:49 +0000)
committerRichard Smith <richard-llvm@metafoo.co.uk>
Thu, 18 Sep 2014 03:49:06 +0000 (03:49 +0000)
this range-based for loop.

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

include/clang/AST/DataRecursiveASTVisitor.h
include/clang/AST/RecursiveASTVisitor.h

index e8ef8064455627f2f8464ca07ebc5ca6c98d4c17..0833d7afbfc2a2264cf84f26ee57f12cd8b5eaf9 100644 (file)
@@ -2146,8 +2146,9 @@ bool RecursiveASTVisitor<Derived>::TraverseLambdaExpr(LambdaExpr *S) {
     }
 
     auto *T = Proto.getTypePtr();
-    for (const auto &E : T->exceptions())
+    for (const auto &E : T->exceptions()) {
       TRY_TO(TraverseType(E));
+    }
 
     if (Expr *NE = T->getNoexceptExpr())
       TRY_TO(TraverseStmt(NE));
index af0dd6dc22409301426146e5292f009d836ca717..5083cbf5de04a2879713f8b1e44e0404d06cf7d6 100644 (file)
@@ -2168,8 +2168,9 @@ bool RecursiveASTVisitor<Derived>::TraverseLambdaExpr(LambdaExpr *S) {
     }
 
     auto *T = Proto.getTypePtr();
-    for (const auto &E : T->exceptions())
+    for (const auto &E : T->exceptions()) {
       TRY_TO(TraverseType(E));
+    }
 
     if (Expr *NE = T->getNoexceptExpr())
       TRY_TO(TraverseStmt(NE));