Commit Graph

8 Commits

Author SHA1 Message Date
Gabor Horvath 1157fbd7d6 [analyzer] Use the signature of the primary template for issue hash calculation
Now when a template is instantiated more times and there is a bug found in the
instantiations the issue hash will be different for each instantiation even if
every other property of the bug (path, message, location) is the same.

This patch aims to resolve this issue. Note that explicit specializations still
generate different hashes but that is intended.

Differential Revision: https://reviews.llvm.org/D38728


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@316900 91177308-0d34-0410-b5e6-96231b3b80d8
2017-10-30 12:16:07 +00:00
Mehdi Amini 2e23251d3e [NFC] Header cleanup
Summary: Removed unused headers, replaced some headers with forward class declarations

Patch by: Eugene <claprix@yandex.ru>

Differential Revision: https://reviews.llvm.org/D20100

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@275882 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-18 19:02:11 +00:00
Gabor Horvath a26e4e76c2 [analyzer] Fix an assertion fail in hash generation.
In case the (uniqueing) location of the diagnostic is in a line that only
contains whitespaces there was an assertion fail during issue hash generation.

Unfortunately I am unable to reproduce this error with the built in checkers, 
so no there is no failing test case with this patch. It would be possible to
write a debug checker for that purpuse but it does not worth the effort.

Differential Revision: http://reviews.llvm.org/D18210


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@264851 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-30 10:08:59 +00:00
Craig Topper d5237ff501 Convert an unsigned to Twine instead of using utostr since we're already building a Twine. NFC
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@259309 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-31 00:20:24 +00:00
Gabor Horvath d69b791aec [analyzer] Fix IssueHash generation.
Differential Revision: http://reviews.llvm.org/D14919 

Original patch by: Gyorgy Orban!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@254394 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-01 09:00:41 +00:00
Davide Italiano 9761f6f082 [StaticAnalyzer] Use llvm::utostr and not to_string.
The latter seems unsupported (at least) on MinGW and FreeBSD (where
I hit this failure). We can't have nice things.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@251115 91177308-0d34-0410-b5e6-96231b3b80d8
2015-10-23 16:43:18 +00:00
Gabor Horvath dd00a0a858 Attempt to fix build bot test failures.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@251014 91177308-0d34-0410-b5e6-96231b3b80d8
2015-10-22 13:23:18 +00:00
Gabor Horvath 61a690a04f [analyzer] Bug identification
This patch adds hashes to the plist and html output to be able to identfy bugs
for suppressing false positives or diff results against a baseline. This hash
aims to be resilient for code evolution and is usable to identify bugs in two
different snapshots of the same software. One missing piece however is a 
permanent unique identifier of the checker that produces the warning. Once that
issue is resolved, the hashes generated are going to change. Until that point
this feature is marked experimental, but it is suitable for early adoption.

Differential Revision: http://reviews.llvm.org/D10305 

Original patch by: Bence Babati!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@251011 91177308-0d34-0410-b5e6-96231b3b80d8
2015-10-22 11:53:04 +00:00