-
Bug
-
Resolution: Incomplete
-
P2: Important
-
None
-
Qt Creator 2.8.0
-
None
When the parser is run on non-preprocessed input, the line numbers that are returned by TranslationUnit::getPosition (and related methods) is 1 lower than the actual line number.
The reason is that the PPLine stores the start of the #line directives, while the _lineOffsets store the end. However, this off-by-one is pervasively corrected, esp. in the places where there are generated tokens.
See also tst_AST::line_and_column_1()