[analyzer] Don't canonicalize the RecordDecl used in CXXBaseObjectRegion.
authorJordan Rose <jordan_rose@apple.com>
Fri, 22 Feb 2013 19:33:13 +0000 (19:33 +0000)
committerJordan Rose <jordan_rose@apple.com>
Fri, 22 Feb 2013 19:33:13 +0000 (19:33 +0000)
commit893d73b7e924a343d51363332c4c57fd858a9ecc
tree51b4ccada365f5aa44fbaa7c044cfa9f078de619
parentf32b3f2c55ece0c7ed62035604de04620e0cb2b5
[analyzer] Don't canonicalize the RecordDecl used in CXXBaseObjectRegion.

This Decl shouldn't be the canonical Decl; it should be the Decl used by
the CXXBaseSpecifier in the subclass. Unfortunately, that means continuing
to throw getCanonicalDecl() on all comparisons.

This fixes MemRegion::getAsOffset's use of ASTRecordLayout when redeclarations
are involved.

llvm-svn: 175913
clang/lib/StaticAnalyzer/Core/MemRegion.cpp
clang/test/Analysis/derived-to-base.cpp