summaryrefslogtreecommitdiff
path: root/dwarflint
diff options
context:
space:
mode:
authorMark Wielaard <mjw@redhat.com>2011-04-08 11:16:11 +0200
committerMark Wielaard <mjw@redhat.com>2011-04-08 11:16:11 +0200
commit2c3b5027681e6c47b51e5605dd80184e2c3a4865 (patch)
treebe4d027be29eb2e00394e2b24a52d4f6a70ee97f /dwarflint
parentf6645b9f38e1c63a50689f861ee0c58dbe52b066 (diff)
downloadelfutils-2c3b5027681e6c47b51e5605dd80184e2c3a4865.tar.gz
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.
Diffstat (limited to 'dwarflint')
-rw-r--r--dwarflint/check_dups_abstract_origin.cc9
1 files changed, 9 insertions, 0 deletions
diff --git a/dwarflint/check_dups_abstract_origin.cc b/dwarflint/check_dups_abstract_origin.cc
index 080d2f18..9615cbdd 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;
}