Details
-
Bug
-
Resolution: Fixed
-
Not Evaluated
-
Qt Creator 4.7.1
-
None
Description
It seems like the clang code model uses the same value for the _LINE_ macro in every line of a source file (in my case 85). This leads to errors, e.g. if _LINE_ is sued to create a local variable in a macro like in the following constructed example:
#define FOO2(l) int x ## l = 0; #define FOO(l) FOO2(l) int main(){ FOO(_LINE_); FOO(_LINE_); }
A clang warning is printed in the editor "redefinition of 'x85'" for the second FOO(_LINE_)-line.