aaron.ballman added a reviewer: aaron.ballman.
aaron.ballman added inline comments.


================
Comment at: lib/Sema/SemaTemplateInstantiateDecl.cpp:2182
+  if (Method->hasAttr<UsedAttr>()) {
+    if (auto *A = dyn_cast<CXXRecordDecl>(Owner)) {
+      SourceLocation Loc;
----------------
`const auto *`?


================
Comment at: lib/Sema/SemaTemplateInstantiateDecl.cpp:2184
+      SourceLocation Loc;
+      if (MemberSpecializationInfo *MSInfo = A->getMemberSpecializationInfo()) 
{
+        Loc = MSInfo->getPointOfInstantiation();
----------------
`const MemberSpecializationInfo  *`?


================
Comment at: lib/Sema/SemaTemplateInstantiateDecl.cpp:2186
+        Loc = MSInfo->getPointOfInstantiation();
+      } else if (ClassTemplateSpecializationDecl *Spec =
+                     dyn_cast<ClassTemplateSpecializationDecl>(A)) {
----------------
`const auto *`?


================
Comment at: lib/Sema/SemaTemplateInstantiateDecl.cpp:2191
+
+      SemaRef.MarkFunctionReferenced(Loc, Method, /*MightBeOdrUse=*/true);
+    }
----------------
You can elide the last argument.


================
Comment at: 
test/CodeGenCXX/attr-used-member-function-implicit-instantiation.cpp:1
+// RUN: %clang_cc1 -triple x86_64-unknown-unknown -emit-llvm -O0 -o - %s \
+// RUN:  | FileCheck %s
----------------
Meinersbur wrote:
> Could you mention PR17480 in this test file as well?
Also, can you bump this comment down below the RUN lines?


Repository:
  rC Clang

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D56928/new/

https://reviews.llvm.org/D56928



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to