]> granicus.if.org Git - clang/commit
When de-serializing a type that is supposed to be canonical, call
authorDouglas Gregor <dgregor@apple.com>
Tue, 26 Oct 2010 00:51:02 +0000 (00:51 +0000)
committerDouglas Gregor <dgregor@apple.com>
Tue, 26 Oct 2010 00:51:02 +0000 (00:51 +0000)
commit32adc8bd6f05d1e26cc221102e48609da2c446ba
treeb0671a30612c51e549bd0e43bcab619170788dc7
parentc1143e598d6f2d8da045888298a9893a84e678df
When de-serializing a type that is supposed to be canonical, call
getCanonicalType() to make sure that the type we got back is actually
canonical. This is the case for most types, which always build a
canonical type when given canonical components. However, some types that
involve expressions in their canonicalization (e.g., array types with
dependent sizes) don't always build canonical types from canonical
components, because there is no such thing as a "canonical"
expression. Therefore, we do this extra mapping to ensure that the
canonical types we store are actually canonical.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117344 91177308-0d34-0410-b5e6-96231b3b80d8
lib/AST/ASTContext.cpp
lib/Serialization/ASTReader.cpp
test/PCH/cxx-templates.cpp
test/PCH/cxx-templates.h