[PATCH] D43576: Solution to fix PR27066 - Redefinition with same mangled name as another definition (dllexport and uuid)

2019-07-03 Thread Zahira Ammarguellat via Phabricator via cfe-commits
zahiraam updated this revision to Diff 207882. zahiraam marked 14 inline comments as done. zahiraam added a comment. Thanks for the review. I think and hope that I have responded to every issue you raised. Let me know if there are still pending issues. Happy 4th! CHANGES SINCE LAST ACTION

[PATCH] D43576: Solution to fix PR27066 - Redefinition with same mangled name as another definition (dllexport and uuid)

2019-07-03 Thread Zahira Ammarguellat via Phabricator via cfe-commits
zahiraam added inline comments. Comment at: include/clang/AST/Decl.h:4303 + + StringLiteral *getSTLUuid() { return STLUuid; } +}; rsmith wrote: > What does "STL" mean here? Renamed it. Comment at: lib/CodeGen/CodeGenModule.cpp:1071-1073 +

[PATCH] D43576: Solution to fix PR27066 - Redefinition with same mangled name as another definition (dllexport and uuid)

2019-06-21 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added inline comments. Comment at: include/clang/AST/Decl.h:4303 + + StringLiteral *getSTLUuid() { return STLUuid; } +}; What does "STL" mean here? Comment at: include/clang/Sema/ParsedAttr.h:337-346 + /// Constructor for

[PATCH] D43576: Solution to fix PR27066 - Redefinition with same mangled name as another definition (dllexport and uuid)

2019-05-30 Thread Zahira Ammarguellat via Phabricator via cfe-commits
zahiraam added a comment. A review please :-) Thanks. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D43576/new/ https://reviews.llvm.org/D43576 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D43576: Solution to fix PR27066 - Redefinition with same mangled name as another definition (dllexport and uuid)

2019-05-21 Thread Zahira Ammarguellat via Phabricator via cfe-commits
zahiraam updated this revision to Diff 200484. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D43576/new/ https://reviews.llvm.org/D43576 Files: include/clang/AST/Decl.h include/clang/AST/RecursiveASTVisitor.h include/clang/Basic/Attr.td include/clang/Basic/DeclNodes.td

[PATCH] D43576: Solution to fix PR27066 - Redefinition with same mangled name as another definition (dllexport and uuid)

2019-05-21 Thread Zahira Ammarguellat via Phabricator via cfe-commits
zahiraam added a comment. And this patch actually fixes the bug. Thanks. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D43576/new/ https://reviews.llvm.org/D43576 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D43576: Solution to fix PR27066 - Redefinition with same mangled name as another definition (dllexport and uuid)

2019-05-20 Thread Zahira Ammarguellat via Phabricator via cfe-commits
zahiraam updated this revision to Diff 200258. zahiraam marked 2 inline comments as done. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D43576/new/ https://reviews.llvm.org/D43576 Files: include/clang/AST/Decl.h include/clang/AST/RecursiveASTVisitor.h include/clang/Basic/Attr.td

[PATCH] D43576: Solution to fix PR27066 - Redefinition with same mangled name as another definition (dllexport and uuid)

2019-05-20 Thread Zahira Ammarguellat via Phabricator via cfe-commits
zahiraam marked 12 inline comments as done. zahiraam added a comment. @rsmith I think I have made all the changes you have pointed out to. But please note that this new patch only impements an explicit AST representation of uuid in template arguments. It **does not** fix the bug for which this

[PATCH] D43576: Solution to fix PR27066 - Redefinition with same mangled name as another definition (dllexport and uuid)

2019-05-10 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added inline comments. Comment at: include/clang/AST/Decl.h:4281 + class DeclSpecUuidDecl : public Decl { + StringRef StrUuid; + public: Can we store a `StringLiteral*` here instead? Comment at: include/clang/Sema/Sema.h:393-394 +

[PATCH] D43576: Solution to fix PR27066 - Redefinition with same mangled name as another definition (dllexport and uuid)

2019-04-02 Thread Zahira Ammarguellat via Phabricator via cfe-commits
zahiraam added a comment. There are still a few things I haven't addressed yet. Mostly because not sure there is another solution like getting rid of the map from StringRef to expr. The other issue is not adding new kind to ParsedAttr. There may be another way of doing it, but didn't look at

[PATCH] D43576: Solution to fix PR27066 - Redefinition with same mangled name as another definition (dllexport and uuid)

2019-04-02 Thread Zahira Ammarguellat via Phabricator via cfe-commits
zahiraam updated this revision to Diff 193258. zahiraam marked 15 inline comments as done. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D43576/new/ https://reviews.llvm.org/D43576 Files: include/clang/AST/Decl.h include/clang/AST/RecursiveASTVisitor.h include/clang/Basic/Attr.td

[PATCH] D43576: Solution to fix PR27066 - Redefinition with same mangled name as another definition (dllexport and uuid)

2019-03-22 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added a comment. Thanks, this looks like a good broad direction. I think this patch does not goes far enough yet. Broad comments (partially duplicating some of the specific comments on the patch itself): - form the `DeclSpecUuidDecl` earlier, when parsing the attribute argument - store

[PATCH] D43576: Solution to fix PR27066 - Redefinition with same mangled name as another definition (dllexport and uuid)

2019-03-19 Thread Reid Kleckner via Phabricator via cfe-commits
rnk added a comment. I see! I only took a quick look, but this looks exactly like what @rsmith has been asking for in discussions for a long time now: a more explicit AST representation of uuid of uuidof in template arguments. I'll make an effort to get his attention and see if this addresses

[PATCH] D43576: Solution to fix PR27066 - Redefinition with same mangled name as another definition (dllexport and uuid)

2019-03-19 Thread Zahira Ammarguellat via Phabricator via cfe-commits
zahiraam updated this revision to Diff 191371. Herald added a subscriber: jdoerfert. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D43576/new/ https://reviews.llvm.org/D43576 Files: include/clang/AST/Decl.h include/clang/AST/RecursiveASTVisitor.h include/clang/Basic/Attr.td

[PATCH] D43576: Solution to fix PR27066 - Redefinition with same mangled name as another definition (dllexport and uuid)

2019-03-19 Thread Zahira Ammarguellat via Phabricator via cfe-commits
zahiraam added a comment. It would be nice to have a review for this year old (updated) patch. Thanks. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D43576/new/ https://reviews.llvm.org/D43576 ___ cfe-commits mailing list

[PATCH] D43576: Solution to fix PR27066 - Redefinition with same mangled name as another definition (dllexport and uuid)

2018-05-14 Thread Zahira Ammarguellat via Phabricator via cfe-commits
zahiraam updated this revision to Diff 146642. https://reviews.llvm.org/D43576 Files: include/clang/AST/Decl.h include/clang/AST/RecursiveASTVisitor.h include/clang/Basic/Attr.td include/clang/Basic/DeclNodes.td include/clang/Sema/AttributeList.h include/clang/Sema/Sema.h

[PATCH] D43576: Solution to fix PR27066 - Redefinition with same mangled name as another definition (dllexport and uuid)

2018-04-20 Thread Zahira Ammarguellat via Phabricator via cfe-commits
zahiraam added a comment. Richard, Please let me know if I have answered to all the issues you raised. Thanks. https://reviews.llvm.org/D43576 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D43576: Solution to fix PR27066 - Redefinition with same mangled name as another definition (dllexport and uuid)

2018-04-20 Thread Zahira Ammarguellat via Phabricator via cfe-commits
zahiraam updated this revision to Diff 143321. https://reviews.llvm.org/D43576 Files: include/clang/AST/Decl.h include/clang/Basic/Attr.td include/clang/Sema/AttributeList.h include/clang/Sema/Sema.h lib/AST/Decl.cpp lib/AST/DeclCXX.cpp lib/CodeGen/CGDecl.cpp

[PATCH] D43576: Solution to fix PR27066 - Redefinition with same mangled name as another definition (dllexport and uuid)

2018-04-20 Thread Zahira Ammarguellat via Phabricator via cfe-commits
zahiraam marked 3 inline comments as done. zahiraam added inline comments. Comment at: lib/Sema/SemaDeclAttr.cpp:4937-4938 - return nullptr; -Diag(UA->getLocation(), diag::err_mismatched_uuid); -Diag(Range.getBegin(), diag::note_previous_uuid); -D->dropAttr();

[PATCH] D43576: Solution to fix PR27066 - Redefinition with same mangled name as another definition (dllexport and uuid)

2018-04-15 Thread Zahira Ammarguellat via Phabricator via cfe-commits
zahiraam marked 4 inline comments as done. zahiraam added inline comments. Comment at: lib/Parse/ParseDecl.cpp:572 +DeclSpecUuidDecl *ArgDecl = + DeclSpecUuidDecl::Create(Actions.getASTContext(), + Actions.getFunctionLevelDeclContext(),

[PATCH] D43576: Solution to fix PR27066 - Redefinition with same mangled name as another definition (dllexport and uuid)

2018-04-14 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added inline comments. Comment at: include/clang/Sema/AttributeList.h:601 + sizeof(AttributeList) + + (sizeof(DeclSpecUuidDecl) + sizeof(void *) + sizeof(ArgsUnion) - 1) / sizeof(void*) * sizeof(void*) You're not storing a

[PATCH] D43576: Solution to fix PR27066 - Redefinition with same mangled name as another definition (dllexport and uuid)

2018-04-14 Thread Zahira Ammarguellat via Phabricator via cfe-commits
zahiraam updated this revision to Diff 142516. https://reviews.llvm.org/D43576 Files: include/clang/AST/Decl.h include/clang/AST/RecursiveASTVisitor.h include/clang/Basic/Attr.td include/clang/Basic/DeclNodes.td include/clang/Sema/AttributeList.h include/clang/Sema/Sema.h

[PATCH] D43576: Solution to fix PR27066 - Redefinition with same mangled name as another definition (dllexport and uuid)

2018-04-14 Thread Zahira Ammarguellat via Phabricator via cfe-commits
zahiraam added a comment. In https://reviews.llvm.org/D43576#1016295, @majnemer wrote: > We should really, really avoid making this sort of change without first > trying to desugar uuidof into a reference to a variable. That would solve a > ton of problems, problems like this one. Not sure I

[PATCH] D43576: Solution to fix PR27066 - Redefinition with same mangled name as another definition (dllexport and uuid)

2018-02-26 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added a comment. In https://reviews.llvm.org/D43576#1019703, @zahiraam wrote: > Currently this declaration: > struct > __declspec(uuid("{DDB47A6A-0F23-11D5-9109-00E0296B75D3}")) > S1; > > a CXXRecordDecl type is generated with attributes (the uuid being an > attribute). Are you

[PATCH] D43576: Solution to fix PR27066 - Redefinition with same mangled name as another definition (dllexport and uuid)

2018-02-26 Thread Zahira Ammarguellat via Phabricator via cfe-commits
zahiraam added a comment. In https://reviews.llvm.org/D43576#1016588, @rsmith wrote: > In https://reviews.llvm.org/D43576#1016561, @majnemer wrote: > > > Here's my thinking: the `__uuidof` expression literally declares a variable > > called `_GUID_ddb47a6a_0f23_11d5_9109_00e0296b75d3` of type

[PATCH] D43576: Solution to fix PR27066 - Redefinition with same mangled name as another definition (dllexport and uuid)

2018-02-22 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added a comment. In https://reviews.llvm.org/D43576#1016561, @majnemer wrote: > Here's my thinking: the `__uuidof` expression literally declares a variable > called `_GUID_ddb47a6a_0f23_11d5_9109_00e0296b75d3` of type `__s_GUID` which > is why it behaves the way it does:

[PATCH] D43576: Solution to fix PR27066 - Redefinition with same mangled name as another definition (dllexport and uuid)

2018-02-22 Thread David Majnemer via Phabricator via cfe-commits
majnemer added a comment. In https://reviews.llvm.org/D43576#1016512, @rsmith wrote: > Do we need to also track whether the argument is a pointer or reference to a > UUID (and also the cv-qualifiers)? For the `Declaration` case, we track this > by tracking the corresponding parameter type; the

[PATCH] D43576: Solution to fix PR27066 - Redefinition with same mangled name as another definition (dllexport and uuid)

2018-02-22 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added a comment. Do we need to also track whether the argument is a pointer or reference to a UUID (and also the cv-qualifiers)? For the `Declaration` case, we track this by tracking the corresponding parameter type; the same thing would presumably work here. In

[PATCH] D43576: Solution to fix PR27066 - Redefinition with same mangled name as another definition (dllexport and uuid)

2018-02-22 Thread David Majnemer via Phabricator via cfe-commits
majnemer added a comment. In https://reviews.llvm.org/D43576#1016418, @zahiraam wrote: > In https://reviews.llvm.org/D43576#1016295, @majnemer wrote: > > > We should really, really avoid making this sort of change without first > > trying to desugar uuidof into a reference to a variable. That

[PATCH] D43576: Solution to fix PR27066 - Redefinition with same mangled name as another definition (dllexport and uuid)

2018-02-22 Thread Zahira Ammarguellat via Phabricator via cfe-commits
zahiraam added a comment. In https://reviews.llvm.org/D43576#1016295, @majnemer wrote: > We should really, really avoid making this sort of change without first > trying to desugar uuidof into a reference to a variable. That would solve a > ton of problems, problems like this one. Not sure I

[PATCH] D43576: Solution to fix PR27066 - Redefinition with same mangled name as another definition (dllexport and uuid)

2018-02-22 Thread Zahira Ammarguellat via Phabricator via cfe-commits
zahiraam updated this revision to Diff 135502. https://reviews.llvm.org/D43576 Files: test/CodeGenCXX/instantiate-uuid.cpp test/Sema/member-reference-dll.cpp Index: test/Sema/member-reference-dll.cpp === ---

[PATCH] D43576: Solution to fix PR27066 - Redefinition with same mangled name as another definition (dllexport and uuid)

2018-02-22 Thread Zahira Ammarguellat via Phabricator via cfe-commits
zahiraam added a comment. Adding test case. https://reviews.llvm.org/D43576 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D43576: Solution to fix PR27066 - Redefinition with same mangled name as another definition (dllexport and uuid)

2018-02-22 Thread Erich Keane via Phabricator via cfe-commits
erichkeane added a comment. It seems to me that the test here is very much lacking. It doesn't seem to include the example you've mentioned, and has no validation to ensure that there is a single instantiation happening. I'd like to see what happens when a UUID is passed as a pack, how

[PATCH] D43576: Solution to fix PR27066 - Redefinition with same mangled name as another definition (dllexport and uuid)

2018-02-22 Thread David Majnemer via Phabricator via cfe-commits
majnemer added a comment. We should really, really avoid making this sort of change without first trying to desugar uuidof into a reference to a variable. That would solve a ton of problems, problems like this one. https://reviews.llvm.org/D43576