diff options
Diffstat (limited to 'compilerplugins')
-rw-r--r-- | compilerplugins/clang/plugin.hxx | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/compilerplugins/clang/plugin.hxx b/compilerplugins/clang/plugin.hxx index 796ebef74a11..b70fd7831db7 100644 --- a/compilerplugins/clang/plugin.hxx +++ b/compilerplugins/clang/plugin.hxx @@ -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 > |