qt5base-lts/tests/auto/tools/qmake
Edward Welbourne 515b905150 Adapt qmake's raw-string parser to avoid confusion by macros
A macro name ending in R might expand to a string; if this precedes a
string constant, we're juxtaposing the strings.  My first parser for
raw strings would mistake it for a raw string instead, ignoring the
part of the identifier before R.  Re-worked the exploration of what
came before the string to catch these cases, too.

The backwards parsing would also allow any messy jumble of [RLUu8]* as
prefix for the string; but in fact R must (if present) be last in the
prefix and *it* can have at most one prefix, [LUu] or u8.  Anything
else is an identifier that happens to precede the string.  Reworked
the parsing to allow only one prefix and not treat R specially unless
it's immediately (modulo BSNL) before the string's open-quotes.

Add link to the cppreference page about string literals, on which the
grammar now parsed is based.

Added a test for the issue this addresses.
Verified that this fails on 5.6, dev and 5.9 without the fix.
Expanded the existing test to cover R-with-prefix cases.

Task-number: QTBUG-55633
Change-Id: I541486c2ec909cfb42050907c84bee83ead4a2f4
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2017-08-24 14:27:50 +00:00
..
testdata Adapt qmake's raw-string parser to avoid confusion by macros 2017-08-24 14:27:50 +00:00
.gitignore
qmake.pro Tests: Remove CONFIG += parallel_test. 2015-09-05 07:16:50 +00:00
testcompiler.cpp Updated license headers 2016-01-21 18:55:18 +00:00
testcompiler.h Updated license headers 2016-01-21 18:55:18 +00:00
tst_qmake.cpp Preserve last modification timestamps of installed files 2017-04-12 15:50:51 +00:00