[all-commits] [llvm/llvm-project] 9dcd96: Canonicalize declaration pointers when forming APV...

Richard Smith via All-commits all-commits at lists.llvm.org
Sun Sep 27 19:05:47 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 9dcd96f728863d40d6f5922ed52732fdd728fb5f
      https://github.com/llvm/llvm-project/commit/9dcd96f728863d40d6f5922ed52732fdd728fb5f
  Author: Richard Smith <richard at metafoo.co.uk>
  Date:   2020-09-27 (Sun, 27 Sep 2020)

  Changed paths:
    M clang/include/clang/AST/APValue.h
    M clang/lib/AST/APValue.cpp
    M clang/lib/AST/Decl.cpp
    M clang/lib/AST/DeclBase.cpp
    M clang/lib/AST/ExprConstant.cpp
    M clang/lib/CodeGen/CGExprConstant.cpp
    M clang/test/CXX/dcl.dcl/dcl.spec/dcl.constexpr/p9.cpp
    M clang/test/CodeGenCXX/weak-external.cpp
    M clang/test/OpenMP/ordered_messages.cpp

  Log Message:
  -----------
  Canonicalize declaration pointers when forming APValues.

References to different declarations of the same entity aren't different
values, so shouldn't have different representations.

Recommit of e6393ee813178e9d3306b8e3c6949a4f32f8a2cb with fixed handling
for weak declarations. We now look for attributes on the most recent
declaration when determining whether a declaration is weak. (Second
recommit with further fixes for mishandling of weak declarations. Our
behavior here is fundamentally unsound -- see PR47663 -- but this
approach attempts to not make things worse.)




More information about the All-commits mailing list