[all-commits] [llvm/llvm-project] a776bd: [clang-tidy] support `return c ? a : b; ` in bugpro...

Julian Schmidt via All-commits all-commits at lists.llvm.org
Thu Oct 31 01:14:13 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: a776bd1a92126bf9bd1b51511364194fd75aa606
      https://github.com/llvm/llvm-project/commit/a776bd1a92126bf9bd1b51511364194fd75aa606
  Author: Julian Schmidt <git.julian.schmidt at gmail.com>
  Date:   2024-10-31 (Thu, 31 Oct 2024)

  Changed paths:
    M clang-tools-extra/clang-tidy/bugprone/ReturnConstRefFromParameterCheck.cpp
    M clang-tools-extra/docs/ReleaseNotes.rst
    M clang-tools-extra/test/clang-tidy/checkers/bugprone/return-const-ref-from-parameter.cpp

  Log Message:
  -----------
  [clang-tidy] support `return c ? a : b;` in bugprone-return-const-ref-from-parameter (#107657)

A `const &` parameter can also be returned via a conditional operator:
`c ? a : b`. This change adds support for diagnosing returning these
parameters
with conditional operators.



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list