Details
-
Bug
-
Resolution: Cannot Reproduce
-
P2: Important
-
None
-
Qt Creator 3.0.0, Qt Creator 3.0.1, Qt Creator 3.1.0, Qt Creator 3.1.1, Qt Creator 3.1.2, Qt Creator 3.2.0, Qt Creator 3.2.1, Qt Creator 3.2.2, Qt Creator 3.3.0-beta1
-
None
Description
Since QtCreator 3.0, digraph (and some trigraphs) are now supported, see https://bugreports.qt-project.org/browse/QTCREATORBUG-2474.
It seems however that the digraph are parsed after preprocessor, instead of before. Thus if a macro argument starts with a collon, which get concatenated with the less sign in the macro.
The problem can be seen with the following code, which works perfectly fine with both GCC and Clang, but is shown with a parse error in QtCreator (on next line actually).
template<typename T> class Foo {}; class Bar {}; #define FOO(ARG) bool foo(Foo<ARG>& a1); FOO(::Bar) int y;
My understanding is that digraph should only be parsed before preprocessor, or generated by the preprocessor's concatenation operator. Esp. they should be ignored if they happen as the result of 'simple' macro argument replacement.