Member predicate Element::Element::findRootCause

Gets the source of this element: either itself or a macro that expanded to this element.

If the element is not in a macro expansion, then the “root” is just the element itself. Otherwise, it is the definition of the innermost macro whose expansion the element is in.

This method is useful for filtering macro results in checks: simply blame e.findRootCause rather than e. This will report only bugs that are not in macros, and in addition report macros that (somewhere) expand to a bug.

Element findRootCause()