Skip to content

Commit

Permalink
For the CMS mutable member checker the hash for a field declaration s…
Browse files Browse the repository at this point in the history
…hould be scoped. (#12) (#13)

* For the CMS mutable member checker the hash for a field declaration should be scoped.
This leads to reports for variables with the same name in different
classes in the same translation unit getting the same hash. The output
name of the report uses the hash so the last report was the only report
for that variable.

* Move to grouped Decl::'s remove Decl ending add Var
  • Loading branch information
gartung authored Jun 4, 2023
1 parent d88fe2a commit 7304230
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions clang/lib/Analysis/IssueHash.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,8 @@ static std::string GetEnclosingDeclContextSignature(const Decl *D) {
case Decl::Record:
case Decl::CXXRecord:
case Decl::Enum:
case Decl::Field:
case Decl::Var:
DeclName = ND->getQualifiedNameAsString();
break;
case Decl::CXXConstructor:
Expand Down

0 comments on commit 7304230

Please sign in to comment.