From: Mark Wielaard Date: Fri, 8 Apr 2011 09:16:11 +0000 (+0200) Subject: dwarflint: check_dups_abstract_origin allow subprogram defined outside body. X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=2c3b5027681e6c47b51e5605dd80184e2c3a4865;p=thirdparty%2Felfutils.git dwarflint: check_dups_abstract_origin allow subprogram defined outside body. A subprogram can be defined outside the body of the enclosing class, then file and/or line attributes can differ. --- diff --git a/dwarflint/check_dups_abstract_origin.cc b/dwarflint/check_dups_abstract_origin.cc index 080d2f189..9615cbdd7 100644 --- a/dwarflint/check_dups_abstract_origin.cc +++ b/dwarflint/check_dups_abstract_origin.cc @@ -74,6 +74,15 @@ namespace && ! same) return true; + // A subprogram can be defined outside the body of the enclosing + // class, then file and/or line attributes can differ. + if (tag == DW_TAG_subprogram + && from == DW_AT_specification + && (at == DW_AT_decl_line || at == DW_AT_decl_file) + && ! same) + return true; + + return false; }