CodeQL library for C/C++
codeql/cpp-all 0.13.1 (changelog, source)

Member predicate PreprocessorBranchDirective::getIf

Gets the #if, #ifdef or #ifndef directive which matches this branching directive.

If this branch directive was unbalanced, then there will be no result. Conversely, if the branch matches different #if directives in different translation units, then there can be more than one result.

PreprocessorBranch getIf()