]> granicus.if.org Git - clang/commit
[modules] Defer setting up the lookup table for a DeclContext until we can
authorRichard Smith <richard-llvm@metafoo.co.uk>
Thu, 6 Aug 2015 04:23:48 +0000 (04:23 +0000)
committerRichard Smith <richard-llvm@metafoo.co.uk>
Thu, 6 Aug 2015 04:23:48 +0000 (04:23 +0000)
commite29768023d4d107511826e658b9bd8393af5ea89
tree1359c3e607243173291fd03601c123eaa8144da9
parente7d479da1b70999010cb43f1a8657f562797455b
[modules] Defer setting up the lookup table for a DeclContext until we can
determine the primary context, rather than sometimes registering the lookup
table on the wrong context.

This exposed a couple of bugs:
 * the odr violation check didn't deal properly with mergeable declarations
   if the declaration retained by name lookup wasn't in the canonical
   definition of the class
 * the (broken) RewriteDecl mechanism would emit two name lookup tables for
   the same DeclContext into the same module file (one as part of the
   rewritten declaration and one as a visible update for the old declaration)
These are both fixed too.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@244192 91177308-0d34-0410-b5e6-96231b3b80d8
include/clang/Serialization/ASTReader.h
lib/Serialization/ASTReader.cpp
lib/Serialization/ASTReaderDecl.cpp
lib/Serialization/ASTWriter.cpp