@@ -5121,8 +5121,9 @@ class TestTokenizer : public TestFixture {
51215121 const char code[] = " void __attribute__((pure)) __attribute__((nothrow)) __attribute__((const)) func1();\n "
51225122 " void __attribute__((__pure__)) __attribute__((__nothrow__)) __attribute__((__const__)) func2();\n "
51235123 " void __attribute__((nothrow)) __attribute__((pure)) __attribute__((const)) func3();\n "
5124- " void __attribute__((__nothrow__)) __attribute__((__pure__)) __attribute__((__const__)) func4();" ;
5125- const char expected[] = " void func1 ( ) ; void func2 ( ) ; void func3 ( ) ; void func4 ( ) ;" ;
5124+ " void __attribute__((__nothrow__)) __attribute__((__pure__)) __attribute__((__const__)) func4();\n "
5125+ " void __attribute__((noreturn)) func5();" ;
5126+ const char expected[] = " void func1 ( ) ; void func2 ( ) ; void func3 ( ) ; void func4 ( ) ; void func5 ( ) ;" ;
51265127
51275128 errout.str (" " );
51285129
@@ -5140,19 +5141,22 @@ class TestTokenizer : public TestFixture {
51405141 const Token * func2 = Token::findsimplematch (tokenizer.tokens (), " func2" );
51415142 const Token * func3 = Token::findsimplematch (tokenizer.tokens (), " func3" );
51425143 const Token * func4 = Token::findsimplematch (tokenizer.tokens (), " func4" );
5144+ const Token * func5 = Token::findsimplematch (tokenizer.tokens (), " func5" );
51435145
51445146 ASSERT (func1 && func1->isAttributePure () && func1->isAttributeNothrow () && func1->isAttributeConst ());
51455147 ASSERT (func2 && func2->isAttributePure () && func2->isAttributeNothrow () && func2->isAttributeConst ());
51465148 ASSERT (func3 && func3->isAttributePure () && func3->isAttributeNothrow () && func3->isAttributeConst ());
51475149 ASSERT (func4 && func4->isAttributePure () && func4->isAttributeNothrow () && func4->isAttributeConst ());
5150+ ASSERT (func5 && func5->isAttributeNoreturn ());
51485151 }
51495152
51505153 void functionAttributeAfter () {
51515154 const char code[] = " void func1() __attribute__((pure)) __attribute__((nothrow)) __attribute__((const));\n "
51525155 " void func2() __attribute__((__pure__)) __attribute__((__nothrow__)) __attribute__((__const__));\n "
51535156 " void func3() __attribute__((nothrow)) __attribute__((pure)) __attribute__((const));\n "
5154- " void func4() __attribute__((__nothrow__)) __attribute__((__pure__)) __attribute__((__const__));" ;
5155- const char expected[] = " void func1 ( ) ; void func2 ( ) ; void func3 ( ) ; void func4 ( ) ;" ;
5157+ " void func4() __attribute__((__nothrow__)) __attribute__((__pure__)) __attribute__((__const__));"
5158+ " void func5() __attribute__((noreturn));" ;
5159+ const char expected[] = " void func1 ( ) ; void func2 ( ) ; void func3 ( ) ; void func4 ( ) ; void func5 ( ) ;" ;
51565160
51575161 errout.str (" " );
51585162
@@ -5170,11 +5174,13 @@ class TestTokenizer : public TestFixture {
51705174 const Token * func2 = Token::findsimplematch (tokenizer.tokens (), " func2" );
51715175 const Token * func3 = Token::findsimplematch (tokenizer.tokens (), " func3" );
51725176 const Token * func4 = Token::findsimplematch (tokenizer.tokens (), " func4" );
5177+ const Token * func5 = Token::findsimplematch (tokenizer.tokens (), " func5" );
51735178
51745179 ASSERT (func1 && func1->isAttributePure () && func1->isAttributeNothrow () && func1->isAttributeConst ());
51755180 ASSERT (func2 && func2->isAttributePure () && func2->isAttributeNothrow () && func2->isAttributeConst ());
51765181 ASSERT (func3 && func3->isAttributePure () && func3->isAttributeNothrow () && func3->isAttributeConst ());
51775182 ASSERT (func4 && func4->isAttributePure () && func4->isAttributeNothrow () && func4->isAttributeConst ());
5183+ ASSERT (func5 && func5->isAttributeNoreturn ());
51785184 }
51795185
51805186 void cpp0xtemplate1 () {
0 commit comments