summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema/SemaDecl.cpp
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2012-02-20 20:05:29 +0000
committerDouglas Gregor <dgregor@apple.com>2012-02-20 20:05:29 +0000
commitd5c4844e02a3df00f40bf51eae9bd03da7ed4fa2 (patch)
tree88d3af4cf8831c1c0108f3b16baab055ed71c683 /clang/lib/Sema/SemaDecl.cpp
parent112e71ee7c97f19a7940aa413964797067a0f574 (diff)
downloadbcm5719-llvm-d5c4844e02a3df00f40bf51eae9bd03da7ed4fa2.tar.gz
bcm5719-llvm-d5c4844e02a3df00f40bf51eae9bd03da7ed4fa2.zip
When we resolve the type of an 'auto' variable, clear out the linkage
of that variable; it will need to be recomputed with the resolved type. llvm-svn: 150984
Diffstat (limited to 'clang/lib/Sema/SemaDecl.cpp')
-rw-r--r--clang/lib/Sema/SemaDecl.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/clang/lib/Sema/SemaDecl.cpp b/clang/lib/Sema/SemaDecl.cpp
index f385b50c3a2..6c54424c976 100644
--- a/clang/lib/Sema/SemaDecl.cpp
+++ b/clang/lib/Sema/SemaDecl.cpp
@@ -6101,7 +6101,8 @@ void Sema::AddInitializerToDecl(Decl *RealDecl, Expr *Init,
}
VDecl->setTypeSourceInfo(DeducedType);
VDecl->setType(DeducedType->getType());
-
+ VDecl->ClearLinkageCache();
+
// In ARC, infer lifetime.
if (getLangOptions().ObjCAutoRefCount && inferObjCARCLifetime(VDecl))
VDecl->setInvalidDecl();
OpenPOWER on IntegriCloud