HomePhabricator

[analyzer] Make CloneDetector consider macro expansions.

Description

[analyzer] Make CloneDetector consider macro expansions.

So far macro-generated code was treated by the CloneDetector as normal code.
This caused that some macros where reported as false-positive clones because
large chunks of code coming from otherwise concise macro expansions were treated
as copy-pasted code.

This patch ensures that macros are treated in the same way as literals/function
calls. This prevents macros that expand into multiple statements
from being reported as clones.

Patch by Raphael Isemann!

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

Details

Committed
dergachevAug 20 2016, 3:06 AM
Differential Revision
D23316: [analyzer] Fixed the false-positives caused by macro generated code.
Parents
rL279366: [analyzer] Make CloneDetector consider template arguments.
Branches
Unknown
Tags
Unknown