================
@@ -341,6 +347,15 @@ class DynTypedNode {
       return getUnchecked<NestedNameSpecifier>().getAsVoidPointer() <
              Other.getUnchecked<NestedNameSpecifier>().getAsVoidPointer();
 
+    if (ASTNodeKind::getFromNodeKind<ObjCProtocolLoc>().isSame(NodeKind)) {
+      auto PLA = getUnchecked<ObjCProtocolLoc>();
+      auto PLB = Other.getUnchecked<ObjCProtocolLoc>();
+      return std::make_pair(PLA.getProtocol(),
+                            PLA.getLocation().getRawEncoding()) <
----------------
zwuis wrote:

No need to call `getRawEncoding` for comparison. `operator<(const 
SourceLocation &, const SourceLocation &)` uses raw encoding for comparison.

https://github.com/llvm/llvm-project/pull/237451
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to