Skip to content

ClangTidy warnings for bugprone-return-const-ref-from-parameter #1657

Closed
@jviotti

Description

@jviotti
/Users/jviotti/Projects/core/src/core/jsonpointer/jsonpointer.cc:142:12: error: returning a constant reference parameter may cause use-after-free when the parameter is constructed from a temporary [bugprone-return-const-ref-from-parameter,-warnings-as-errors]
  142 |     return document;
      |            ^~~~~~~~

/Users/jviotti/Projects/core/src/core/jsonpointer/jsonpointer.cc:150:12: error: returning a constant reference parameter may cause use-after-free when the parameter is constructed from a temporary [bugprone-return-const-ref-from-parameter,-warnings-as-errors]
  150 |     return document;
      |            ^~~~~~~~

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions