52 auto ExcludedOperators = binaryOperation(hasAnyOperatorName(
53 "|",
"&",
"^",
"<<",
">>",
"~",
"|=",
"&=",
"^=",
"<<=",
">>="));
56 castExpr(hasCastKind(CK_IntegralToBoolean),
57 unless(isExpansionInSystemHeader()), hasType(booleanType()),
59 expr(hasType(qualType(hasCanonicalType(hasDeclaration(
60 enumDecl(isCompleteAndHasNoZeroValue(),
64 unless(declRefExpr(to(enumConstantDecl()))),
65 unless(ignoringParenImpCasts(ExcludedOperators)))),
66 unless(hasAncestor(staticAssertDecl())))
Every ClangTidyCheck reports errors through a DiagnosticsEngine provided by this context.