Rikard Falkeborn
297360920a
Keep prefix in string and char literals ( #2272 )
...
Keeping the prefix in the token allows cppcheck to print the correct
string and char literals in debug and error messages.
To achieve this, move some of the helper functions from token.cpp to
utils.h so that checks that look at string and char literals can reuse
them. This is a large part of this commit.
Note that the only user visible change is that when string and char
literals are printed in error messages, the prefix is now included.
For example:
int f() {
return test.substr( 0 , 4 ) == U"Hello" ? 0 : 1 ;
};
now prints U"Hello" instead of "Hello" in the error message.
2019-10-16 11:41:33 +02:00
..
2019-10-15 16:02:28 +02:00
2019-09-12 09:32:24 +02:00
2017-06-05 13:23:00 +02:00
2019-04-23 13:26:48 +02:00
2019-10-08 21:38:10 +02:00
2019-09-11 19:25:09 +02:00
2019-06-29 07:49:14 +02:00
2019-06-29 07:49:14 +02:00
2018-01-14 15:37:52 +01:00
2019-02-09 07:24:06 +01:00
2019-03-09 16:50:50 +01:00
2019-08-30 18:32:45 +02:00
2019-10-14 19:41:51 +02:00
2019-10-06 09:57:31 +02:00
2019-03-09 20:00:31 +01:00
2019-10-07 09:17:12 +02:00
2019-05-01 19:33:47 +02:00
2019-09-27 09:55:56 +02:00
2019-07-31 22:35:51 +02:00
2019-09-24 08:15:03 +02:00
2019-10-09 08:17:47 +02:00
2019-09-20 21:57:16 +02:00
2019-08-18 16:33:32 +02:00
2019-03-16 07:19:48 +01:00
2019-10-14 19:41:32 +02:00
2019-02-09 07:24:06 +01:00
2019-09-25 15:25:19 +02:00
2019-09-12 20:52:39 +02:00
2019-08-17 15:12:49 +02:00
2019-05-21 10:43:33 +02:00
2019-10-04 12:30:11 +02:00
2019-09-11 19:25:09 +02:00
2019-09-22 21:50:02 +02:00
2019-08-01 20:56:02 +02:00
2019-10-16 11:41:33 +02:00
2019-09-25 15:25:19 +02:00
2019-10-01 08:39:08 +02:00
2019-03-26 20:28:40 +01:00
2019-10-08 17:48:09 +02:00
2019-02-09 07:24:06 +01:00
2019-02-09 07:24:06 +01:00
2019-02-09 07:24:06 +01:00
2019-03-27 21:42:50 +01:00
2019-09-19 20:29:33 +02:00
2019-06-29 07:49:14 +02:00
2019-09-19 19:40:00 +02:00
2019-09-19 19:40:00 +02:00
2019-02-09 07:24:06 +01:00
2019-10-04 12:30:11 +02:00
2019-10-16 11:41:33 +02:00
2019-10-14 19:41:51 +02:00
2019-10-08 19:30:41 +02:00
2019-02-26 21:06:44 +01:00
2019-09-11 19:25:09 +02:00
2019-10-16 11:41:33 +02:00
2019-09-19 20:29:33 +02:00
2019-09-26 16:01:01 +02:00
2019-09-25 15:25:19 +02:00
2019-10-15 19:33:25 +02:00
2019-02-09 07:24:06 +01:00
2019-02-09 07:24:06 +01:00
2019-10-16 11:41:33 +02:00
2019-10-16 11:41:33 +02:00
2019-02-09 07:24:06 +01:00
2019-09-25 20:16:04 +02:00
2019-09-12 13:29:52 +02:00
2019-09-16 06:34:45 +02:00
2019-07-22 10:26:55 +02:00
2019-08-04 10:21:16 +02:00
2019-09-20 21:57:16 +02:00
2019-03-16 09:17:50 +01:00
2019-10-05 15:42:47 +02:00
2019-10-06 12:45:42 +02:00