forked from qt-creator/qt-creator
C++: Fix highlighting for lines with predefined macros
This adds definitions for the macros __FILE__, __LINE__, __DATE__ and __TIME__ on demand. As a side effect, this also introduces highlighting for the uses of these macros. Task-number: QTCREATORBUG-8036 Change-Id: Ib7546c7d45d2eecbc50c7883fc684e3497154405 Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com> Reviewed-by: Eike Ziller <eike.ziller@digia.com> Reviewed-by: hjk <hjk121@nokiamail.com>
This commit is contained in:
@@ -796,7 +796,11 @@ void tst_Preprocessor::builtin__FILE__()
|
||||
));
|
||||
const QByteArray result____ =
|
||||
"# 1 \"some-file.c\"\n"
|
||||
"const char *f = \"some-file.c\"\n";
|
||||
"const char *f =\n"
|
||||
"# expansion begin 16,8 ~1\n"
|
||||
"\"some-file.c\"\n"
|
||||
"# expansion end\n"
|
||||
"# 2 \"some-file.c\"\n";
|
||||
|
||||
QCOMPARE(preprocessed, result____);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user