[analyzer] Include the bug uniqueing location in the issue_hash.
The issue here is that if we have 2 leaks reported at the same line for which we cannot print the corresponding region info, they will get treated as the same by issue_hash+description. We need to AUGMENT the issue_hash with the allocation info to differentiate the two issues. Add the "hash" (offset from the beginning of a function) representing allocation site to solve the issue. We might want to generalize solution in the future when we decide to track more than just the 2 locations from the diagnostics. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@171825 91177308-0d34-0410-b5e6-96231b3b80d8
Showing
- include/clang/StaticAnalyzer/Core/BugReporter/BugReporter.h 14 additions, 1 deletioninclude/clang/StaticAnalyzer/Core/BugReporter/BugReporter.h
- include/clang/StaticAnalyzer/Core/BugReporter/PathDiagnostic.h 17 additions, 1 deletion...de/clang/StaticAnalyzer/Core/BugReporter/PathDiagnostic.h
- lib/StaticAnalyzer/Checkers/MacOSKeychainAPIChecker.cpp 19 additions, 13 deletionslib/StaticAnalyzer/Checkers/MacOSKeychainAPIChecker.cpp
- lib/StaticAnalyzer/Checkers/MallocChecker.cpp 18 additions, 15 deletionslib/StaticAnalyzer/Checkers/MallocChecker.cpp
- lib/StaticAnalyzer/Core/BugReporter.cpp 6 additions, 3 deletionslib/StaticAnalyzer/Core/BugReporter.cpp
- lib/StaticAnalyzer/Core/PathDiagnostic.cpp 5 additions, 1 deletionlib/StaticAnalyzer/Core/PathDiagnostic.cpp
- lib/StaticAnalyzer/Core/PlistDiagnostics.cpp 15 additions, 2 deletionslib/StaticAnalyzer/Core/PlistDiagnostics.cpp
- test/Analysis/malloc-plist.c 16 additions, 14 deletionstest/Analysis/malloc-plist.c
Loading
Please register or sign in to comment