From 2c3b5027681e6c47b51e5605dd80184e2c3a4865 Mon Sep 17 00:00:00 2001 From: Mark Wielaard Date: Fri, 8 Apr 2011 11:16:11 +0200 Subject: [PATCH] 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. --- dwarflint/check_dups_abstract_origin.cc | 9 +++++++++ 1 file changed, 9 insertions(+) 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; } -- 2.39.5