[all-commits] [llvm/llvm-project] 4e94f6: [clang] Pass FoundDecl to DeclRefExpr creator for ...

Danny Mösch via All-commits all-commits at lists.llvm.org
Tue Jul 26 12:22:31 PDT 2022

  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 4e94f6653150511de434fa7e29b684ae7f0e52b6
  Author: Danny Mösch <danny.moesch at icloud.com>
  Date:   2022-07-26 (Tue, 26 Jul 2022)

  Changed paths:
    M clang-tools-extra/docs/ReleaseNotes.rst
    M clang-tools-extra/test/clang-tidy/checkers/misc/unused-using-decls.cpp
    M clang/docs/ReleaseNotes.rst
    M clang/lib/Sema/SemaOverload.cpp
    M clang/test/AST/ast-dump-overloaded-operators.cpp
    M clang/test/Index/annotate-operator-call-expr.cpp
    M clang/test/Index/cursor-ref-names.cpp
    M clang/unittests/ASTMatchers/ASTMatchersTraversalTest.cpp

  Log Message:
  [clang] Pass FoundDecl to DeclRefExpr creator for operator overloads

Without the "found declaration" it is later not possible to know where the operator declaration
was brought into the scope calling it.

The initial motivation for this fix came from #55095. However, this also has an influence on
`clang -ast-dump` which now prints a `UsingShadow` attribute for operators only visible through
`using` statements. Also, clangd now correctly references the `using` statement instead of the
operator directly.

Reviewed By: shafik

Differential Revision: https://reviews.llvm.org/D129973

More information about the All-commits mailing list