From 47c2fbcc2618b1d6a0d6a3d3236d0e57f18fd724 Mon Sep 17 00:00:00 2001 From: Argiris Kirtzidis Date: Mon, 6 Dec 2010 17:51:53 +0000 Subject: [PATCH] Use Sema's MarkDeclarationReferenced, which takes care of templates, instead of calling Decl's setUsed directly. Thanks to John for the hint! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121014 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Sema/SemaDeclAttr.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Sema/SemaDeclAttr.cpp b/lib/Sema/SemaDeclAttr.cpp index d53fd6822..05b141b24 100644 --- a/lib/Sema/SemaDeclAttr.cpp +++ b/lib/Sema/SemaDeclAttr.cpp @@ -1452,7 +1452,7 @@ static void HandleCleanupAttr(Decl *d, const AttributeList &Attr, Sema &S) { } d->addAttr(::new (S.Context) CleanupAttr(Attr.getLoc(), S.Context, FD)); - FD->setUsed(); + S.MarkDeclarationReferenced(Attr.getParameterLoc(), FD); } /// Handle __attribute__((format_arg((idx)))) attribute based on -- 2.11.4.GIT