aboutsummaryrefslogtreecommitdiff
path: root/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
commitee18803f163c4ffcbc8f55a1aae48514d4f80521 (patch)
treeff5108df89a52c1b9b5a097ad05e88edb8cce551 /lib/Sema/SemaDecl.cpp
parentbe580e5d31c20d98e5b1da536dc874527e093b20 (diff)
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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150984 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaDecl.cpp')
-rw-r--r--lib/Sema/SemaDecl.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/Sema/SemaDecl.cpp b/lib/Sema/SemaDecl.cpp
index f385b50c3a..6c54424c97 100644
--- a/lib/Sema/SemaDecl.cpp
+++ b/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();