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