Skip to content

[clang-tidy] bugprone-assert-side-effect cannot ignore literal operators #217479

Description

@l0rinc

While preparing Bitcoin Core PR #36030, we found that bugprone-assert-side-effect reports assert(ret > 0s); with CheckFunctionCalls: true.

IgnoredFunctions cannot suppress this pure chrono literal operator, even with .*, because AssertSideEffectCheck.cpp only applies IgnoredFunctionsMatcher to identifier names. Literal operators have operator names.

Removing this restriction would allow qualified regexes to ignore literal operators while preserving the default diagnostic. The restriction remains on LLVM main.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions