-
Notifications
You must be signed in to change notification settings - Fork 71
Closed
Labels
Difficulty-LowA false positive or false negative report which is expected to take <1 day effort to addressA false positive or false negative report which is expected to take <1 day effort to addressImpact-Mediumfalse positive/false negativeAn issue related to observed false positives or false negatives.An issue related to observed false positives or false negatives.user-reportIssue reported by an end user of CodeQL Coding StandardsIssue reported by an end user of CodeQL Coding Standards
Description
Affected rules
A16-0-1
Description
We erroneously identify otherwise acceptable conditionals with #else or #elif preprocessor directives as invalid, as the #else and #elif are not considered de facto valid.
This should be addressed by:
- Always considering
#elseacceptable, and relying on reporting any issues in the#..ifdirective. - Considering
#elifan acceptable directive within a preprocessor conditional, but still considering the#elifon its own merits.
Example
#ifdef MACRO_ENABLED
#include "test1.h"
#else
#include "test2.h"
#endifMetadata
Metadata
Assignees
Labels
Difficulty-LowA false positive or false negative report which is expected to take <1 day effort to addressA false positive or false negative report which is expected to take <1 day effort to addressImpact-Mediumfalse positive/false negativeAn issue related to observed false positives or false negatives.An issue related to observed false positives or false negatives.user-reportIssue reported by an end user of CodeQL Coding StandardsIssue reported by an end user of CodeQL Coding Standards
Type
Projects
Status
Done