erik.pilkington added inline comments.

================
Comment at: src/cxa_demangle.cpp:3036
                         break;
-                    if (db.names.size() < 2)
+                    if (k1 <= k0)
                         return first;
----------------
compnerd wrote:
> I'm not sure how `k1` can be `<` than `k0`.  Isn't this effectively always 
> going down the `==` path?  If I'm just mistaken, then I think that this needs 
> a comment.
I agree that it should be impossible, but the previous version handled this 
case with the `if (db.names.size() < 2)` check, when really `db.names.size()` 
can only be 1 or greater. I think it makes more sense to be paranoid here, I 
trust this file about as far as I can throw it (And I can't throw it very far, 
its not a tangible object).


https://reviews.llvm.org/D33368



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

Reply via email to