CodeQL library for C/C++

Predicate correctIncludeGuard

Holds if hf uses a valid include guard with the macro named includeGuard and the preprocessor directives ifndef, define, and endif. This analysis is also exposed in an object-oriented style through the class CorrectIncludeGuard.

Import path

import semmle.code.cpp.headers.MultipleInclusion
predicate correctIncludeGuard(HeaderFile hf, PreprocessorDirective ifndef, Macro define, PreprocessorEndif endif, string includeGuard)