Skip to content

Commit ea94c30

Browse files
committed
Revert "Support attribute used in member funcs of class templates"
This reverts commit 352740: broke swift build llvm-svn: 352748
1 parent d778d4f commit ea94c30

File tree

2 files changed

+0
-33
lines changed

2 files changed

+0
-33
lines changed

clang/lib/Sema/SemaTemplateInstantiateDecl.cpp

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -2175,20 +2175,6 @@ TemplateDeclInstantiator::VisitCXXMethodDecl(CXXMethodDecl *D,
21752175
Owner->addDecl(Method);
21762176
}
21772177

2178-
// PR17480: Honor the used attribute to instantiate member function
2179-
// definitions
2180-
if (Method->hasAttr<UsedAttr>()) {
2181-
if (const auto *A = dyn_cast<CXXRecordDecl>(Owner)) {
2182-
SourceLocation Loc;
2183-
if (const MemberSpecializationInfo *MSInfo =
2184-
A->getMemberSpecializationInfo())
2185-
Loc = MSInfo->getPointOfInstantiation();
2186-
else if (const auto *Spec = dyn_cast<ClassTemplateSpecializationDecl>(A))
2187-
Loc = Spec->getPointOfInstantiation();
2188-
SemaRef.MarkFunctionReferenced(Loc, Method);
2189-
}
2190-
}
2191-
21922178
return Method;
21932179
}
21942180

clang/test/CodeGenCXX/attr-used-member-function-implicit-instantiation.cpp

Lines changed: 0 additions & 19 deletions
This file was deleted.

0 commit comments

Comments
 (0)