CodeQL library for C/C++
Search

Predicate startsWithIfndef

Holds if hf begins with an #ifndef or #if directive ifndef, to test the macro named macroName.

Import path

import semmle.code.cpp.headers.MultipleInclusion
predicate startsWithIfndef(HeaderFile hf, PreprocessorDirective ifndef, string macroName)