[PATCH] D103678: [Format] Fix incorrect pointer/reference detection

MyDeveloperDay via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Jun 8 04:15:58 PDT 2021


MyDeveloperDay accepted this revision.
MyDeveloperDay added inline comments.


================
Comment at: clang/lib/Format/TokenAnnotator.cpp:236
+        Prev = Prev->Previous;
+        assert(Prev);
+      }
----------------
Do we need to worry about `Prev` ever being null? Does the assert ever fire? if not why have it in the first place?

We'll crash if it is, do we want to guard against that?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D103678



More information about the cfe-commits mailing list