[PATCH] D33324: [index] Avoid infinite recursion when looking up a dependent name

Ben Langmuir via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu May 18 10:42:27 PDT 2017


benlangmuir accepted this revision.
benlangmuir added a comment.
This revision is now accepted and ready to land.

LGTM.   One stylistic comment, but I'll leave that up to you.



================
Comment at: lib/AST/CXXInheritance.cpp:286
+            BaseRecord = nullptr;
+          else if (VisitedDependentRecords.count(BaseRecord))
+            BaseRecord = nullptr;
----------------
Style: I would combine this with the previous check and add `{}` braces.  Having a nested `else` without `{}` is asking for trouble down the line.


Repository:
  rL LLVM

https://reviews.llvm.org/D33324





More information about the cfe-commits mailing list