Moc: Don't error out when parsing namespace __identifier(...)
Present for example in the Windows's Atlbase.h header. We should not abort the compilation, just ignore that construct Task-number: QTBUG-56634 Change-Id: Id6e4c9f03cb1cef46e330f4fbcae80ce4f3730c6 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
This commit is contained in:
parent
56a29f0e91
commit
a232251992
@ -559,6 +559,9 @@ void Moc::parse()
|
||||
if (test(EQ)) {
|
||||
// namespace Foo = Bar::Baz;
|
||||
until(SEMIC);
|
||||
} else if (test(LPAREN)) {
|
||||
// Ignore invalid code such as: 'namespace __identifier("x")' (QTBUG-56634)
|
||||
until(RPAREN);
|
||||
} else if (!test(SEMIC)) {
|
||||
NamespaceDef def;
|
||||
def.classname = nsName;
|
||||
|
@ -74,4 +74,8 @@ namespace FooNamespace {
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef Q_MOC_RUN
|
||||
namespace __identifier("<AtlImplementationDetails>") {} // QTBUG-56634
|
||||
#endif
|
||||
|
||||
#endif // NAMESPACE_H
|
||||
|
Loading…
Reference in New Issue
Block a user