diff options
author | Richard Smith <richard@metafoo.co.uk> | 2020-09-02 14:42:37 -0700 |
---|---|---|
committer | Richard Smith <richard@metafoo.co.uk> | 2020-10-12 19:32:57 -0700 |
commit | 913f6005669cfb590c99865a90bc51ed0983d09d (patch) | |
tree | ce33f0f21ff1955661eeb99eee81c10f104b1723 /clang/lib/AST/DeclBase.cpp | |
parent | e2d4174e9c66251d1b408234b53f53d0903c0285 (diff) | |
download | llvm-913f6005669cfb590c99865a90bc51ed0983d09d.zip llvm-913f6005669cfb590c99865a90bc51ed0983d09d.tar.gz llvm-913f6005669cfb590c99865a90bc51ed0983d09d.tar.bz2 |
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, most recently
reverted in 9a33f027ac7d73e14ae287e78ab554142d1cbc8f due to a bug caused
by ObjCInterfaceDecls not propagating availability attributes along
their redeclaration chains; that bug was fixed in
e2d4174e9c66251d1b408234b53f53d0903c0285.
Diffstat (limited to 'clang/lib/AST/DeclBase.cpp')
-rw-r--r-- | clang/lib/AST/DeclBase.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/AST/DeclBase.cpp b/clang/lib/AST/DeclBase.cpp index f4314d0..ab2b55c 100644 --- a/clang/lib/AST/DeclBase.cpp +++ b/clang/lib/AST/DeclBase.cpp @@ -720,7 +720,7 @@ bool Decl::isWeakImported() const { if (!canBeWeakImported(IsDefinition)) return false; - for (const auto *A : attrs()) { + for (const auto *A : getMostRecentDecl()->attrs()) { if (isa<WeakImportAttr>(A)) return true; |