ilya-biryukov added inline comments.

================
Comment at: lib/Sema/SemaCodeComplete.cpp:1300
+        auto &OverloadSet =
+            OverloadMap[std::make_pair(CurContext, Method->getName())];
+        for (const DeclIndexPair& Entry : OverloadSet) {
----------------
Won't this crash on `Method->getName()`? Could we add a test for that?
Completing in a class that has a user-defined `operator==()` would probably do 
the trick.


================
Comment at: lib/Sema/SemaCodeComplete.cpp:1308
+            // should remove all. But two overloads is by far the common case.
+            Incumbent = std::move(R);
+            return;
----------------
Could you add a comment that we modify previously added results here?
It's obvious from the code, but not something I would normally expect so having 
a separate comment looks useful.


Repository:
  rC Clang

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

https://reviews.llvm.org/D62582



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

Reply via email to