Class PreprocessorBlock
A chunk of code from one preprocessor branch (#if
, #ifdef
,
#ifndef
, #elif
or #else
) to the directive that closes it
(#elif
, #else
or #endif
). The getParent()
method
allows these blocks to be navigated as a tree, with the root
being the entire file.
Import path
import semmle.code.cpp.headers.PreprocBlock
Direct supertypes
Predicates
getAChild | Gets a |
getAMacro | Gets a macro definition that is directly in this |
getAnInclude | Gets an include directive that is directly in this |
getEndLine | Gets the end line number of this |
getFile | Gets the file this |
getParent | Gets the |
getStartLine | Gets the start line number of this |
hasLocationInfo | Holds if this element is at the specified location. The location spans column |
toString | Gets a textual representation of this element. |