Skip to content

clang should diagnose memcpy() via -Wunsafe_buffer_usage #119405

Closed
@pkasting

Description

@pkasting

When -Wunsafe-buffer-usage is on, memcpy() should trigger a warning (unless locally pragmad away), since it effectively does pointer math under the hood (takes a ptr and size).

Similar comments would apply to e.g. memset(), memmove(), etc.

Metadata

Metadata

Assignees

No one assigned

    Labels

    clang:diagnosticsNew/improved warning or error message in Clang, but not in clang-tidy or static analyzer

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions