DeadCode
: Only consider a line dead if it is dead in every compilation
#715
Labels
Difficulty-High
A false positive or false negative report which is expected to take 1+ week effort to address
false positive/false negative
An issue related to observed false positives or false negatives.
Impact-Medium
Affected rules
M0-1-9
RULE-2-2
Description
When intercepting a build we may see the same file be compiled multiple times in different contexts. When this happens, CodeQL effectively creates an internal "copy" of the analyzed code, specialized for each context. For dead code queries, we should only flag a line of code as dead if it is dead in all such instances.
Example
header_debug.h
header.h
file.cpp
The text was updated successfully, but these errors were encountered: