Preprocessor Enginge: fix bug in pp-engine.cpp

Preprocessor variables __LINE__,__FILE__,__TIME__,__DATE__ where destroying
the following systems when affected variables were standing  within the
same line with those variables:
* highlighting
* refactoring
* local renaming

Task-number: QTCREATORBUG-8036
Change-Id: I1a4b919d15812872ca5a8e63b1031ec1ab144c22
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
This commit is contained in:
Simon Schäfer
2013-11-26 21:56:30 +01:00
committed by Nikolai Kosjar
parent e4d800ad4a
commit 1d834c1126
2 changed files with 1 additions and 61 deletions

View File

@@ -334,7 +334,6 @@ private slots:
void unfinished_function_like_macro_call();
void nasty_macro_expansion();
void glib_attribute();
void builtin__FILE__();
void blockSkipping();
void includes_1();
void dont_eagerly_expand();
@@ -784,23 +783,6 @@ void tst_Preprocessor::glib_attribute()
QCOMPARE(preprocessed, result____);
}
void tst_Preprocessor::builtin__FILE__()
{
Client *client = 0; // no client.
Environment env;
Preprocessor preprocess(client, &env);
QByteArray preprocessed = preprocess.run(
QLatin1String("some-file.c"),
QByteArray("const char *f = __FILE__\n"
));
const QByteArray result____ =
"# 1 \"some-file.c\"\n"
"const char *f = \"some-file.c\"\n";
QCOMPARE(preprocessed, result____);
}
void tst_Preprocessor::comparisons_data()
{
QTest::addColumn<QString>("infile");