-
Notifications
You must be signed in to change notification settings - Fork 68
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
#else
acceptable, and relying on reporting any issues in the#..if
directive. - Considering
#elif
an acceptable directive within a preprocessor conditional, but still considering the#elif
on its own merits.
Example
#ifdef MACRO_ENABLED
#include "test1.h"
#else
#include "test2.h"
#endif
Metadata
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