We already know the Symbol while parsing, passing a reference to it to
error() makes it simpler to construct the error message.
This fixes an issue where reporting an error about "NONSENSE" in e.g.:
Q_PROPERTY(Foo* foo NONSENSE foo)
would be off-by-one and the error message would say:
path/to/file.h:11:1: error: Parse error at "foo"
instead of 'at "NONSENSE"', which is where the parser actually found an
unexpected attribute.
Fixes: QTBUG-36367
Pick-to: 6.5
Change-Id: Ief70e544af41f7575fbeea9b936fa8197c3ef43d
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>