diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2014-02-21 23:40:22 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2014-02-21 23:47:22 +0100 |
commit | fa4afe020d48ce872f6d7dfde946314c7b2a30c8 (patch) | |
tree | 5132cf1a9eedeb1859eaffd3b9b2b705effc0ea5 /compilerplugins | |
parent | 411fcfff58bc49699b525a0e43d75b9f6121da6f (diff) |
Handle ImplicitCastExpr w/ invalid loc from Objective C code
Change-Id: I82cb8aa53ea5fd86d6ff46af876dd3f55e1123d1
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 > |