[PATCH] D26657: [Sema] Respect DLL attributes more faithfully

2016-11-14 Thread Shoaib Meenai via cfe-commits
smeenai created this revision. smeenai added reviewers: compnerd, hans. smeenai added a subscriber: cfe-commits. On MSVC, if an implicit instantiation already exists and an explicit instantiation definition with a DLL attribute is created, the DLL attribute still takes effect. Make clang match thi

[PATCH] D26657: [Sema] Respect DLL attributes more faithfully

2016-11-15 Thread Saleem Abdulrasool via cfe-commits
compnerd added inline comments. Comment at: lib/Sema/SemaTemplate.cpp:7669 +// Fix a TSK_ExplicitInstantiationDeclaration or a TSK_ImplicitInstantiation +// followed by a TSK_ExplicitInstantiationDefinition +if ((Old_TSK == TSK_ExplicitInstantiationDeclaration || ---

[PATCH] D26657: [Sema] Respect DLL attributes more faithfully

2016-11-15 Thread Shoaib Meenai via cfe-commits
smeenai added inline comments. Comment at: lib/Sema/SemaTemplate.cpp:7669 +// Fix a TSK_ExplicitInstantiationDeclaration or a TSK_ImplicitInstantiation +// followed by a TSK_ExplicitInstantiationDefinition +if ((Old_TSK == TSK_ExplicitInstantiationDeclaration ||

[PATCH] D26657: [Sema] Respect DLL attributes more faithfully

2016-11-15 Thread Hans Wennborg via cfe-commits
hans added a comment. > On MSVC, if an implicit instantiation already exists and an explicit > instantiation definition with a DLL attribute is created, the DLL > attribute still takes effect. Make clang match this behavior. This is scary territory, and behaviour I think might be hard for us to

[PATCH] D26657: [Sema] Respect DLL attributes more faithfully

2016-11-15 Thread Shoaib Meenai via cfe-commits
smeenai added a comment. In https://reviews.llvm.org/D26657#596759, @hans wrote: > > On MSVC, if an implicit instantiation already exists and an explicit > > instantiation definition with a DLL attribute is created, the DLL > > attribute still takes effect. Make clang match this behavior. > > T

[PATCH] D26657: [Sema] Respect DLL attributes more faithfully

2016-11-16 Thread Hans Wennborg via cfe-commits
hans added a comment. In https://reviews.llvm.org/D26657#596897, @smeenai wrote: > In https://reviews.llvm.org/D26657#596759, @hans wrote: > > > > On MSVC, if an implicit instantiation already exists and an explicit > > > instantiation definition with a DLL attribute is created, the DLL > > > a

[PATCH] D26657: [Sema] Respect DLL attributes more faithfully

2016-11-16 Thread Shoaib Meenai via cfe-commits
smeenai added a comment. In https://reviews.llvm.org/D26657#597523, @hans wrote: > In https://reviews.llvm.org/D26657#596897, @smeenai wrote: > > > In https://reviews.llvm.org/D26657#596759, @hans wrote: > > > > > > On MSVC, if an implicit instantiation already exists and an explicit > > > > ins

[PATCH] D26657: [Sema] Respect DLL attributes more faithfully

2016-11-16 Thread Hans Wennborg via cfe-commits
hans added a comment. In https://reviews.llvm.org/D26657#597859, @smeenai wrote: > In https://reviews.llvm.org/D26657#597523, @hans wrote: > > > In https://reviews.llvm.org/D26657#596897, @smeenai wrote: > > > > > In https://reviews.llvm.org/D26657#596759, @hans wrote: > > > > > > > > On MSVC, if

[PATCH] D26657: [Sema] Respect DLL attributes more faithfully

2016-11-16 Thread Reid Kleckner via cfe-commits
rnk added inline comments. Comment at: lib/Sema/SemaTemplate.cpp:7670-7673 +if ((Old_TSK == TSK_ExplicitInstantiationDeclaration || + Old_TSK == TSK_ImplicitInstantiation) && (TSK == TSK_ExplicitInstantiationDefinition || DLLImportExplicitInstantiat

[PATCH] D26657: [Sema] Respect DLL attributes more faithfully

2016-11-16 Thread Shoaib Meenai via cfe-commits
smeenai added inline comments. Comment at: lib/Sema/SemaTemplate.cpp:7670-7673 +if ((Old_TSK == TSK_ExplicitInstantiationDeclaration || + Old_TSK == TSK_ImplicitInstantiation) && (TSK == TSK_ExplicitInstantiationDefinition || DLLImportExplicitInstan

[PATCH] D26657: [Sema] Respect DLL attributes more faithfully

2016-11-16 Thread Shoaib Meenai via cfe-commits
smeenai updated this revision to Diff 78322. smeenai added a comment. Limiting to dllexport after discussion with @hans https://reviews.llvm.org/D26657 Files: lib/Sema/SemaTemplate.cpp test/CodeGenCXX/dllexport.cpp test/CodeGenCXX/windows-itanium-dllexport.cpp Index: test/CodeGenCXX/win

[PATCH] D26657: [Sema] Respect DLL attributes more faithfully

2016-11-16 Thread David Majnemer via cfe-commits
majnemer added inline comments. Comment at: lib/Sema/SemaTemplate.cpp:7683-7685 +// or implicit instantiation. MinGW doesn't allow this. In the implicit +// instantiation case, we limit clang to only adding dllexport; see the +// discussion in https://revi

[PATCH] D26657: [Sema] Respect DLL attributes more faithfully

2016-11-16 Thread Shoaib Meenai via cfe-commits
smeenai updated this revision to Diff 78324. smeenai added a comment. Moving explanation to comment instead of referencing Phabricator https://reviews.llvm.org/D26657 Files: lib/Sema/SemaTemplate.cpp test/CodeGenCXX/dllexport.cpp test/CodeGenCXX/windows-itanium-dllexport.cpp Index: test

[PATCH] D26657: [Sema] Respect DLL attributes more faithfully

2016-11-18 Thread Hans Wennborg via cfe-commits
hans added inline comments. Comment at: lib/Sema/SemaTemplate.cpp:7670-7673 +if ((Old_TSK == TSK_ExplicitInstantiationDeclaration || + Old_TSK == TSK_ImplicitInstantiation) && (TSK == TSK_ExplicitInstantiationDefinition || DLLImportExplicitInstantia

[PATCH] D26657: [Sema] Respect DLL attributes more faithfully

2016-11-18 Thread Shoaib Meenai via cfe-commits
smeenai added inline comments. Comment at: lib/Sema/SemaTemplate.cpp:7670-7673 +if ((Old_TSK == TSK_ExplicitInstantiationDeclaration || + Old_TSK == TSK_ImplicitInstantiation) && (TSK == TSK_ExplicitInstantiationDefinition || DLLImportExplicitInstan

[PATCH] D26657: [Sema] Respect DLL attributes more faithfully

2016-11-18 Thread Shoaib Meenai via cfe-commits
smeenai updated this revision to Diff 78620. smeenai updated the summary for this revision. smeenai added a comment. Addressing comments https://reviews.llvm.org/D26657 Files: include/clang/Sema/Sema.h lib/Sema/SemaTemplate.cpp test/CodeGenCXX/dllexport.cpp test/CodeGenCXX/windows-itani

[PATCH] D26657: [Sema] Respect DLL attributes more faithfully

2016-11-18 Thread Shoaib Meenai via cfe-commits
smeenai updated this revision to Diff 78621. smeenai added a comment. Typo in comment https://reviews.llvm.org/D26657 Files: include/clang/Sema/Sema.h lib/Sema/SemaTemplate.cpp test/CodeGenCXX/dllexport.cpp test/CodeGenCXX/windows-itanium-dllexport.cpp Index: test/CodeGenCXX/windows-it

[PATCH] D26657: [Sema] Respect DLL attributes more faithfully

2016-11-21 Thread Shoaib Meenai via cfe-commits
smeenai added a comment. General coding style question. Over here, I'm creating a local helper function. However, that helper needs to access member functions of Sema, which is why I made it a private member function right now, which also unfortunately makes the change somewhat non-local (since

[PATCH] D26657: [Sema] Respect DLL attributes more faithfully

2016-11-28 Thread Shoaib Meenai via Phabricator via cfe-commits
smeenai added a comment. Ping. https://reviews.llvm.org/D26657 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D26657: [Sema] Respect DLL attributes more faithfully

2016-11-29 Thread Hans Wennborg via Phabricator via cfe-commits
hans added a comment. Apologies for the delay. I was out last week. In https://reviews.llvm.org/D26657#602083, @smeenai wrote: > General coding style question. Over here, I'm creating a local helper > function. However, that helper needs to access member functions of Sema, > which is why I mad

[PATCH] D26657: [Sema] Respect DLL attributes more faithfully

2016-11-29 Thread Hans Wennborg via Phabricator via cfe-commits
hans added inline comments. Comment at: include/clang/Sema/Sema.h:7495 + /// \brief Make an existing DLL attribute on a class take effect. + void ActOnDLLAttr(ClassTemplateSpecializationDecl *Def, +InheritableAttr *Attr); hans wrote: > I'd s

[PATCH] D26657: [Sema] Respect DLL attributes more faithfully

2016-11-29 Thread Shoaib Meenai via Phabricator via cfe-commits
smeenai added inline comments. Comment at: include/clang/Sema/Sema.h:7494 + /// \brief Make an existing DLL attribute on a class take effect. + void ActOnDLLAttr(ClassTemplateSpecializationDecl *Def, hans wrote: > Nit: I think `///` implies `\brief`, so we do

[PATCH] D26657: [Sema] Respect DLL attributes more faithfully

2016-11-30 Thread Hans Wennborg via Phabricator via cfe-commits
hans added inline comments. Comment at: lib/Sema/SemaTemplate.cpp:7439 +void Sema::ActOnDLLAttr(ClassTemplateSpecializationDecl *Def, +InheritableAttr *Attr) { + // We reject explicit instantiations in class scope, so there should smeenai

[PATCH] D26657: [Sema] Respect DLL attributes more faithfully

2016-12-03 Thread Shoaib Meenai via Phabricator via cfe-commits
smeenai updated this revision to Diff 80193. smeenai added a comment. Addressing comments https://reviews.llvm.org/D26657 Files: lib/Sema/SemaTemplate.cpp test/CodeGenCXX/dllexport.cpp test/CodeGenCXX/windows-itanium-dllexport.cpp Index: test/CodeGenCXX/windows-itanium-dllexport.cpp

[PATCH] D26657: [Sema] Respect DLL attributes more faithfully

2016-12-03 Thread Shoaib Meenai via Phabricator via cfe-commits
smeenai added inline comments. Comment at: lib/Sema/SemaTemplate.cpp:7710 +(Context.getTargetInfo().getCXXABI().isMicrosoft() || + Context.getTargetInfo().getTriple().isWindowsItaniumEnvironment())) { + // In the MS ABI, an explicit instantiation definition c

[PATCH] D26657: [Sema] Respect DLL attributes more faithfully

2016-12-05 Thread Hans Wennborg via Phabricator via cfe-commits
hans accepted this revision. hans added a comment. This revision is now accepted and ready to land. lgtm Comment at: lib/Sema/SemaTemplate.cpp:7710 +(Context.getTargetInfo().getCXXABI().isMicrosoft() || + Context.getTargetInfo().getTriple().isWindowsItaniumEnvir

[PATCH] D26657: [Sema] Respect DLL attributes more faithfully

2016-12-05 Thread Shoaib Meenai via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL288682: [Sema] Respect DLL attributes more faithfully (authored by smeenai). Changed prior to commit: https://reviews.llvm.org/D26657?vs=80193&id=80289#toc Repository: rL LLVM https://reviews.llvm.o