[PATCH] D33478: [libclang] When getting platform availabilities, merge multiple declarations if possible

Alex Lorenz via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Jun 7 13:49:21 PDT 2017


arphaman added a comment.

This looks better, it's almost ready. A couple of small requests:



================
Comment at: tools/libclang/CIndex.cpp:7262
+            LHS->getMessage() == RHS->getMessage() &&
+            LHS->getReplacement() == RHS->getReplacement())
+          return true;
----------------
We should also have a test that verifies that we merge identical availabilities.


================
Comment at: tools/libclang/CIndex.cpp:7268
+            (!LHS->getObsoleted().empty() && !RHS->getObsoleted().empty()) ||
+            (!LHS->getMessage().empty() && !RHS->getMessage().empty()))
+          return false;
----------------
I think that we don't really need the `(!LHS->getMessage().empty() && !RHS->getMessage().empty())` check here since message has to be either in a deprecated or obsoleted clause, so we should already handle that with previous checks.


https://reviews.llvm.org/D33478





More information about the cfe-commits mailing list