[analyzer] Use faster hashing (MD5) in CloneDetector.
authorArtem Dergachev <artem.dergachev@gmail.com>
Sat, 20 Aug 2016 17:35:53 +0000 (17:35 +0000)
committerArtem Dergachev <artem.dergachev@gmail.com>
Sat, 20 Aug 2016 17:35:53 +0000 (17:35 +0000)
commit5657486854d03116660ada0f07f315ac1b54827c
tree3b8ac918364c806f1b8f0d556d07d2188812d68b
parent8176ee9b5dda38504f0048cfe6df95fc13df3ec4
[analyzer] Use faster hashing (MD5) in CloneDetector.

This replaces the old approach of fingerprinting every AST node into a string,
which avoided collisions and was simple to implement, but turned out to be
extremely ineffective with respect to both performance and memory.

The collisions are now dealt with in a separate pass, which no longer causes
performance problems because collisions are rare.

Patch by Raphael Isemann!

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

llvm-svn: 279378
clang/include/clang/Analysis/CloneDetection.h
clang/lib/Analysis/CloneDetection.cpp
clang/lib/StaticAnalyzer/Checkers/CloneChecker.cpp