qt5base-lts/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
..
doc Doc: Update docs for QMAKE_MACOSX_DEPLOYMENT_TARGET in qmake Manual 2017-07-17 07:31:17 +00:00
generators Adapt qmake's raw-string parser to avoid confusion by macros 2017-08-24 14:27:50 +00:00
library Change source identifier type in ProString 2017-08-15 10:54:50 +00:00
cachekeys.h Updated license headers 2016-01-21 18:55:18 +00:00
main.cpp Simplify built-in qmake install command 2017-05-04 09:40:48 +00:00
Makefile.unix Merge remote-tracking branch 'origin/5.8' into 5.9 2017-02-14 11:33:02 +01:00
Makefile.unix.macos Merge remote-tracking branch 'origin/5.8' into dev 2016-12-13 09:39:20 +01:00
Makefile.unix.mingw configure: put more of the makefile contents into template files 2016-11-23 09:38:14 +00:00
Makefile.unix.unix configure: put more of the makefile contents into template files 2016-11-23 09:38:14 +00:00
Makefile.unix.win32 Merge remote-tracking branch 'origin/5.8' into dev 2017-01-25 20:06:06 +01:00
Makefile.win32 Merge remote-tracking branch 'origin/5.8' into 5.9 2017-03-21 19:07:53 +01:00
meta.cpp qmake: eradicate Q_FOREACH loops [needing qAsConst()] 2016-01-28 20:25:18 +00:00
meta.h Updated license headers 2016-01-21 18:55:18 +00:00
option.cpp qmake: Do not mix canonical and non canonical paths 2017-04-11 05:37:52 +00:00
option.h bump qmake version 2016-11-15 22:43:51 +00:00
project.cpp make qmake abort when $$prompt() gets EOF 2016-12-13 18:55:19 +00:00
project.h Merge remote-tracking branch 'origin/5.7' into dev 2016-07-19 20:14:40 +02:00
property.cpp move generation of qconfig.cpp (and qt.conf) to qmake-based configure 2016-12-13 18:56:12 +00:00
property.h move generation of qconfig.cpp (and qt.conf) to qmake-based configure 2016-12-13 18:56:12 +00:00
qmake_pch.h Updated license headers 2016-01-21 18:55:18 +00:00
qmake-aux.pro revert to building qmake with qconfig.cpp 2017-01-06 20:09:08 +00:00
qmake.pri rename qvector.cpp => qvector.qdoc 2017-02-09 14:56:01 +00:00
qmake.pro configure: delete some dead code and outdated comments 2016-11-23 09:38:09 +00:00