[PATCH] D56928: Support attribute used in member funcs of class templates
Michael Kruse via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri Jan 25 15:54:41 PST 2019
Meinersbur added a comment.
Thanks for looking into my almost 6 year old bug!
================
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
----------------
Could you mention PR17480 in this test file as well?
================
Comment at: test/CodeGenCXX/attr-used-member-function-implicit-instantiation.cpp:8
+ template <typename T> struct S {
+ int USED f() {
+ return 0;
----------------
Any reason to use the preprocessor here instead of `__attribute__` directly?
================
Comment at: test/CodeGenCXX/attr-used-member-function-implicit-instantiation.cpp:16
+ // as a result of the S class template implicit instantiation
+ // CHECK-DAG: define linkonce_odr i32 @_ZN31InstantiateUsedMemberDefinition1SIiE1fEv
+ S<int> inst;
----------------
`CHECK:` instead of `CHECK-DAG` should be sufficient.
Repository:
rC Clang
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D56928/new/
https://reviews.llvm.org/D56928
More information about the cfe-commits
mailing list