CodeQL library for C/C++
Search

Member predicate Comment::getCommentedElement

Gets the AST element this comment is associated with. For example, the comment in the following code is associated with the declaration of j.

int i;
int j; // Comment on j
Element getCommentedElement()