From 8beb42cc90dd15131168ecf1220c69c9e57db7f3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Marjam=C3=A4ki?= Date: Sun, 28 Oct 2018 17:37:19 +0100 Subject: [PATCH] astyle formatting [ci skip] --- lib/templatesimplifier.cpp | 2 +- test/testtokenize.cpp | 42 +++++++++++++++++++------------------- 2 files changed, 22 insertions(+), 22 deletions(-) diff --git a/lib/templatesimplifier.cpp b/lib/templatesimplifier.cpp index dfcbecaaa..9a2b7188d 100644 --- a/lib/templatesimplifier.cpp +++ b/lib/templatesimplifier.cpp @@ -170,7 +170,7 @@ void TemplateSimplifier::checkComplicatedSyntaxErrorsInTemplates() // parse this statement and see if the '<' and '>' are matching unsigned int level = 0; for (const Token *tok2 = tok; tok2 && !Token::simpleMatch(tok2, ";"); tok2 = tok2->next()) { - if(Token::simpleMatch(tok2, "{") && (!Token::Match(tok2->previous(), ">|%type%") || Token::simpleMatch(tok2->link(), "} ;"))) + if (Token::simpleMatch(tok2, "{") && (!Token::Match(tok2->previous(), ">|%type%") || Token::simpleMatch(tok2->link(), "} ;"))) break; if (tok2->str() == "(") tok2 = tok2->link(); diff --git a/test/testtokenize.cpp b/test/testtokenize.cpp index 6f3cc2b5a..79e18c281 100644 --- a/test/testtokenize.cpp +++ b/test/testtokenize.cpp @@ -8653,33 +8653,33 @@ private: void checkEnableIf() { ASSERT_NO_THROW(tokenizeAndStringify( - "template<\n" - " typename U,\n" - " typename std::enable_if<\n" - " std::is_convertible{}>::type* = nullptr>\n" - "void foo(U x);\n")) + "template<\n" + " typename U,\n" + " typename std::enable_if<\n" + " std::is_convertible{}>::type* = nullptr>\n" + "void foo(U x);\n")) ASSERT_NO_THROW(tokenizeAndStringify( - "template\n" - "T f(const T a, const T b) {\n" - " return a < b ? b : a;\n" - "}\n")) + "template\n" + "T f(const T a, const T b) {\n" + " return a < b ? b : a;\n" + "}\n")) ASSERT_NO_THROW(tokenizeAndStringify( - "template\n" - "struct A {\n" - " T f(const T a, const T b) {\n" - " return a < b ? b : a;\n" - " }\n" - "};\n")) + "template\n" + "struct A {\n" + " T f(const T a, const T b) {\n" + " return a < b ? b : a;\n" + " }\n" + "};\n")) ASSERT_NO_THROW(tokenizeAndStringify( - "const int a = 1;\n" - "const int b = 2;\n" - "template\n" - "struct A {\n" - " int x = a < b ? b : a;" - "};\n")) + "const int a = 1;\n" + "const int b = 2;\n" + "template\n" + "struct A {\n" + " int x = a < b ? b : a;" + "};\n")) }