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.

Sebastian Redl sebastian.redl at getdesigned.at
Tue Jul 7 07:29:50 PDT 2015



On 07.07.2015 15:19, Aaron Ballman wrote:
> 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));
> +  }
>   })
>   

That's interesting. What does TRY_TO expand to? This looks like 
something a bug report could be written about.

Sebastian



More information about the cfe-commits mailing list