[PATCH] D56928: Support attribute used in member funcs of class templates

2019-03-08 Thread Petr Hosek via Phabricator via cfe-commits
phosek added a comment. Herald added a project: clang. This broke the 2-stage LTO build of LLVM, the error is: ld.lld: /usr/local/google/home/phosek/clang-llvm/llvm-project/llvm/lib/IR/Constants.cpp:995: static llvm::Constant *llvm::ConstantArray::getImpl(llvm::ArrayType *, ArrayRef): Assert

[PATCH] D56928: Support attribute used in member funcs of class templates

2019-01-31 Thread Rafael Auler via Phabricator via cfe-commits
rafauler added a comment. Hi davezarzycki, thanks for reporting this! This is not expected, I'll revert this diff for now. Sorry for this. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D56928/new/ https://reviews.llvm.org/D56928 ___

[PATCH] D56928: Support attribute used in member funcs of class templates

2019-01-31 Thread David Zarzycki via Phabricator via cfe-commits
davezarzycki added a comment. This change broke building Swift on my Linux box. The compiler confusingly complains about the *same* template being both explicitly specialized and implicitly instantiated: /home/dave/s/u/swift/stdlib/public/runtime/ProtocolConformance.cpp:34:38: error: explici

[PATCH] D56928: Support attribute used in member funcs of class templates

2019-01-31 Thread Rafael Auler via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC352740: Support attribute used in member funcs of class templates (authored by rafauler, committed by ). Changed prior to commit: https://reviews.llvm.org/D56928?vs=184467&id=184470#toc Repository: r

[PATCH] D56928: Support attribute used in member funcs of class templates

2019-01-31 Thread Rafael Auler via Phabricator via cfe-commits
rafauler updated this revision to Diff 184467. rafauler added a comment. Thanks for reviewing! Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D56928/new/ https://reviews.llvm.org/D56928 Files: lib/Sema/SemaTemplateInstantiateDecl.cpp test/CodeGenCXX/attr-used-

[PATCH] D56928: Support attribute used in member funcs of class templates

2019-01-30 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman accepted this revision. aaron.ballman added a comment. This revision is now accepted and ready to land. LGTM aside from some formatting nits. Comment at: lib/Sema/SemaTemplateInstantiateDecl.cpp:2184 + if (const MemberSpecializationInfo *MSInfo = +

[PATCH] D56928: Support attribute used in member funcs of class templates

2019-01-29 Thread Rafael Auler via Phabricator via cfe-commits
rafauler updated this revision to Diff 184029. rafauler added a comment. Rebase + Aaron's suggestions. Thanks for the suggestions! Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D56928/new/ https://reviews.llvm.org/D56928 Files: lib/Sema/SemaTemplateInstantiateD

[PATCH] D56928: Support attribute used in member funcs of class templates

2019-01-28 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a reviewer: aaron.ballman. aaron.ballman added inline comments. Comment at: lib/Sema/SemaTemplateInstantiateDecl.cpp:2182 + if (Method->hasAttr()) { +if (auto *A = dyn_cast(Owner)) { + SourceLocation Loc; `const auto *`? ==

[PATCH] D56928: Support attribute used in member funcs of class templates

2019-01-25 Thread Rafael Auler via Phabricator via cfe-commits
rafauler updated this revision to Diff 183657. rafauler added a comment. No problem, thanks for your suggestions! Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D56928/new/ https://reviews.llvm.org/D56928 Files: lib/Sema/SemaTemplateInstantiateDecl.cpp test/Co

[PATCH] D56928: Support attribute used in member funcs of class templates

2019-01-25 Thread Michael Kruse via Phabricator via cfe-commits
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 ---

[PATCH] D56928: Support attribute used in member funcs of class templates

2019-01-18 Thread Rafael Auler via Phabricator via cfe-commits
rafauler updated this revision to Diff 182581. rafauler added a comment. Removing facebook tags Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D56928/new/ https://reviews.llvm.org/D56928 Files: lib/Sema/SemaTemplateInstantiateDecl.cpp test/CodeGenCXX/attr-used

[PATCH] D56928: Support attribute used in member funcs of class templates

2019-01-18 Thread Rafael Auler via Phabricator via cfe-commits
rafauler created this revision. rafauler added reviewers: rsmith, ldionne. As PR17480 describes, clang does not support the used attribute for member functions of class templates. This means that if the member function is not used, its definition is never instantiated. This patch changes clang to