]> granicus.if.org Git - clang/commitdiff
Use Sema's MarkDeclarationReferenced, which takes care of templates, instead of calli...
authorArgyrios Kyrtzidis <akyrtzi@gmail.com>
Mon, 6 Dec 2010 17:51:53 +0000 (17:51 +0000)
committerArgyrios Kyrtzidis <akyrtzi@gmail.com>
Mon, 6 Dec 2010 17:51:53 +0000 (17:51 +0000)
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

index d53fd6822d41897bcbb61d2abebab429b36e92fe..05b141b2453547032a0eb9048d8fa93c4b73abed 100644 (file)
@@ -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