forked from qt-creator/qt-creator
Fix invalid decltype error recovery which resulted in crashes.
Task-number: QTCREATORBUG-7174 Change-Id: I653db71adc45586cd8518ffd96118425fd3763be Reviewed-by: Roberto Raggi <roberto.raggi@nokia.com>
This commit is contained in:
@@ -101,6 +101,7 @@ private slots:
|
||||
void gcc_attributes_1();
|
||||
void gcc_attributes_2();
|
||||
void gcc_attributes_3();
|
||||
void crash_test_1();
|
||||
|
||||
// expressions
|
||||
void simple_name_1();
|
||||
@@ -212,6 +213,13 @@ void tst_AST::gcc_attributes_3()
|
||||
QCOMPARE(unit->tokenKind(link->rbrace_token), (int) T_RBRACE);
|
||||
}
|
||||
|
||||
void tst_AST::crash_test_1()
|
||||
{
|
||||
QSharedPointer<TranslationUnit> unit(parseStatement("decltype auto\n"));
|
||||
AST *ast = unit->ast();
|
||||
QVERIFY(ast);
|
||||
}
|
||||
|
||||
void tst_AST::simple_declaration_1()
|
||||
{
|
||||
QSharedPointer<TranslationUnit> unit(parseStatement("\n"
|
||||
|
||||
Reference in New Issue
Block a user