qt5base-lts/qmake/generators
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
..
mac qmake: fix warning about duplicate references in project file 2017-07-20 21:24:29 +00:00
unix
win32 Add MSVC manifest backup file to "clean" target 2017-08-18 10:46:59 +00:00
makefile.cpp
makefile.h
makefiledeps.cpp Adapt qmake's raw-string parser to avoid confusion by macros 2017-08-24 14:27:50 +00:00
makefiledeps.h
metamakefile.cpp
metamakefile.h
projectgenerator.cpp
projectgenerator.h
xmloutput.cpp
xmloutput.h