]> granicus.if.org Git - clang/commit
C++ modules: if a class is defined in multiple modules (for instance, because
authorRichard Smith <richard-llvm@metafoo.co.uk>
Mon, 9 Sep 2013 16:55:27 +0000 (16:55 +0000)
committerRichard Smith <richard-llvm@metafoo.co.uk>
Mon, 9 Sep 2013 16:55:27 +0000 (16:55 +0000)
commitb60fae50d38a0291e1c5731b2fb22849d26ca342
treebfe2ef357952094c88f5c93741b40037593114d8
parent8495379bd6127dac2c39a6dd7840d95bb3a9aaa3
C++ modules: if a class is defined in multiple modules (for instance, because
it is an implicit instantiation of a class template specialization), pick the
first-loaded definition to be the canonical definition, and merge all other
definitions into it.

This is still rather incomplete -- we need to extend every form of declaration
that can appear within a CXXRecordDecl to be redeclarable if it came from an
AST file (this includes fields, enumerators, ...).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@190315 91177308-0d34-0410-b5e6-96231b3b80d8
12 files changed:
include/clang/AST/DeclTemplate.h
include/clang/Serialization/ASTReader.h
lib/Sema/SemaLookup.cpp
lib/Serialization/ASTReaderDecl.cpp
lib/Serialization/ASTWriterDecl.cpp
test/Modules/Inputs/cxx-templates-a.h
test/Modules/Inputs/cxx-templates-b.h
test/Modules/Inputs/templates-left.h
test/Modules/Inputs/templates-right.h
test/Modules/Inputs/templates-top.h
test/Modules/cxx-templates.cpp
test/Modules/templates.mm