]> granicus.if.org Git - clang/commit
[modules] Rationalize the behavior of Decl::declarationReplaces, and in
authorRichard Smith <richard-llvm@metafoo.co.uk>
Tue, 3 Nov 2015 03:13:11 +0000 (03:13 +0000)
committerRichard Smith <richard-llvm@metafoo.co.uk>
Tue, 3 Nov 2015 03:13:11 +0000 (03:13 +0000)
commita5042dfafabc84ccc2a89e659336aa7fdd835b8f
treedaa6a1e927b5195c6fa0ab7458651fed41d03caa
parent9a3185dd71c30270b83069f569f95e8bbb5e032b
[modules] Rationalize the behavior of Decl::declarationReplaces, and in
particular don't assume that two declarations of the same kind in the same
context are declaring the same entity. That's not true when the same name is
declared multiple times as internal-linkage symbols within a module.
(getCanonicalDecl is cheap now, so we can just use it here.)

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@251898 91177308-0d34-0410-b5e6-96231b3b80d8
lib/AST/Decl.cpp
lib/Sema/SemaDecl.cpp
lib/Sema/SemaLookup.cpp
test/Modules/Inputs/internal-constants/a.h [new file with mode: 0644]
test/Modules/Inputs/internal-constants/b.h [new file with mode: 0644]
test/Modules/Inputs/internal-constants/c.h [new file with mode: 0644]
test/Modules/Inputs/internal-constants/const.h [new file with mode: 0644]
test/Modules/Inputs/internal-constants/module.modulemap [new file with mode: 0644]
test/Modules/internal-constants.cpp [new file with mode: 0644]
test/SemaCXX/cxx1y-variable-templates_top_level.cpp
test/SemaCXX/enable_if.cpp