Index: lib/Format/TokenAnnotator.cpp =================================================================== --- lib/Format/TokenAnnotator.cpp +++ lib/Format/TokenAnnotator.cpp @@ -67,12 +67,6 @@ Left->MatchingParen = CurrentToken; CurrentToken->MatchingParen = Left; CurrentToken->Type = TT_TemplateCloser; - if (CurrentToken->Previous->is(TT_CastRParen) && - CurrentToken->Previous->MatchingParen) { - // Fix incorrect cast detection - CurrentToken->Previous->Type = TT_Unknown; - CurrentToken->Previous->MatchingParen->Type = TT_Unknown; - } next(); return true; } Index: unittests/Format/FormatTest.cpp =================================================================== --- unittests/Format/FormatTest.cpp +++ unittests/Format/FormatTest.cpp @@ -8398,8 +8398,6 @@ verifyFormat("call( x, y, z );", Spaces); verifyFormat("call();", Spaces); verifyFormat("std::function callback;", Spaces); - verifyFormat("void inFunction() { std::function fct; }", - Spaces); verifyFormat("while ( (bool)1 )\n" " continue;", Spaces); @@ -10635,9 +10633,6 @@ verifyFormat("f< int, float >();", Spaces); verifyFormat("template <> g() {}", Spaces); verifyFormat("template < std::vector< int > > f() {}", Spaces); - verifyFormat("std::function< void(int, int) > fct;", Spaces); - verifyFormat("void inFunction() { std::function< void(int, int) > fct; }", - Spaces); Spaces.Standard = FormatStyle::LS_Cpp03; Spaces.SpacesInAngles = true;