Handle ImplicitCastExpr w/ invalid loc from Objective C code

Change-Id: I82cb8aa53ea5fd86d6ff46af876dd3f55e1123d1
This commit is contained in:
Stephan Bergmann
2014-02-21 23:40:22 +01:00
parent 411fcfff58
commit fa4afe020d

View File

@@ -180,7 +180,9 @@ bool Plugin::ignoreLocation( const Decl* decl )
inline
bool Plugin::ignoreLocation( const Stmt* stmt )
{
return ignoreLocation( stmt->getLocStart());
// Invalid location can happen at least for ImplicitCastExpr of
// ImplicitParam 'self' in Objective C method declarations:
return stmt->getLocStart().isValid() && ignoreLocation( stmt->getLocStart());
}
template< typename T >