MyDeveloperDay added a comment.

I like this change for clarity reasons, my only concern and it's not based on 
evidence is what if any of these functions get passed in State, and then they 
themselves alter the State.Stack?
In most cases I'd expect CurrentState to always be correct, but doesn't it only 
represent the state of the stack as it was at the beginning of the function

Isn't the point of State.Stack.back() to get the current state? if you do that 
with a variable like `CurrentState` or just have `State.getCurrentState()` I 
don't know but the later seems a good step because you could use that in even 
more places

i.e.

`unsigned NestedBlockIndent = State.Stack.back().NestedBlockIndent;`

`unsigned NestedBlockIndent = State.getCurrentState().NestedBlockIndent;`


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D119597

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

Reply via email to