aaron.ballman added a comment.

I'm a bit uneasy that this is implementing something that's not yet been 
accepted into the Itanium ABI document. That runs the risk of requiring an ABI 
break if the Itanium document changes directions before finalizing. Also, what 
should we be doing for the Microsoft mangling, or do we already handle that 
properly?



================
Comment at: clang/include/clang/AST/Decl.h:2495
+  // constraints on it, so that we can decide to mangle this with its 
containing
+  // scope and the 'F' for itanium.
+  bool isConstrainedFriend() const;
----------------



================
Comment at: clang/lib/AST/ItaniumMangle.cpp:668-669
+    // different functions.  See [temp.friend]p9.
+    if (FD->isConstrainedFriend())
+        return FD->getLexicalDeclContext();
+  }
----------------
Formatting looks off here -- should clang-format the patch.


================
Comment at: clang/lib/AST/ItaniumMangle.cpp:672-674
+  // If this is a friend, and has constraints, mangle it in the decl context
+  // of its lexical context, since in different scopes, they are considered
+  // different functions.  See [temp.friend]p9.
----------------
I don't know that repeating the comment here is helpful.


================
Comment at: clang/lib/AST/ItaniumMangle.cpp:1733
   // <nested-name>
-  //   ::= N [<CV-qualifiers>] [<ref-qualifier>] <prefix> <unqualified-name> E
+  //   ::= N [<CV-qualifiers>] [<ref-qualifier>] <prefix> [F} 
+  //       <unqualified-name> E
----------------



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

https://reviews.llvm.org/D126818

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

Reply via email to