summaryrefslogtreecommitdiffstats
path: root/lib/Sema/SemaExprCXX.cpp
diff options
context:
space:
mode:
authorNico Weber <nicolasweber@gmx.de>2014-11-12 04:33:52 +0000
committerNico Weber <nicolasweber@gmx.de>2014-11-12 04:33:52 +0000
commitff0fd44a390e15ff9eed84a74947b5beabf96caa (patch)
tree30c8d021a0531df2a921e95cca7738a9fa173860 /lib/Sema/SemaExprCXX.cpp
parent232aa4a3a2f8976966ba6dfce434b8bfdcd8b72f (diff)
Mark TypeDecls used in explicit destructor calls as referenced.
Fixes PR21221. Patch by Axel Naumann, test by me. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@221771 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaExprCXX.cpp')
-rw-r--r--lib/Sema/SemaExprCXX.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/Sema/SemaExprCXX.cpp b/lib/Sema/SemaExprCXX.cpp
index b035f8ff49..5b861ad545 100644
--- a/lib/Sema/SemaExprCXX.cpp
+++ b/lib/Sema/SemaExprCXX.cpp
@@ -200,6 +200,7 @@ ParsedType Sema::getDestructorName(SourceLocation TildeLoc,
if (TypeDecl *Type = Found.getAsSingle<TypeDecl>()) {
QualType T = Context.getTypeDeclType(Type);
+ MarkAnyDeclReferenced(Type->getLocation(), Type, /*OdrUse=*/false);
if (SearchType.isNull() || SearchType->isDependentType() ||
Context.hasSameUnqualifiedType(T, SearchType)) {