30 const auto AllPointerTypes =
31 anyOf(hasType(hasUnqualifiedDesugaredType(pointerType())),
33 hasDeducedType(hasUnqualifiedDesugaredType(pointerType())))),
34 hasType(decltypeType(hasUnderlyingType(pointerType()))));
39 hasAnyOperatorName(
"+",
"-",
"+=",
"-="), AllPointerTypes,
40 unless(hasLHS(ignoringImpCasts(declRefExpr(to(isImplicit()))))))
45 if (!AllowIncrementDecrementOperators)
47 unaryOperator(hasAnyOperatorName(
"++",
"--"),
48 hasType(hasUnqualifiedDesugaredType(pointerType())),
49 unless(hasUnaryOperand(
50 ignoringImpCasts(declRefExpr(to(isImplicit()))))))
57 hasBase(ignoringImpCasts(
58 anyOf(AllPointerTypes,
59 hasType(decayedType(hasDecayedType(pointerType())))))),
60 hasIndex(hasType(isInteger())))
Every ClangTidyCheck reports errors through a DiagnosticsEngine provided by this context.