sammccall added inline comments.

================
Comment at: clang/lib/Tooling/Syntax/Pseudo/GLRParser.cpp:285
+        ForestChildren.push_back(PN->Parsed);
+      const ForestNode &ForestNode = ParsedForest.createSequence(
+          ReduceSymbolID, RA.ReduceRuleID, ForestChildren.front()->startLoc(),
----------------
sammccall wrote:
> avoid same name for type & variable
how can we be sure we're not creating duplicate forest nodes?

IIUC, it's possible to have the same forest nodes on top of several heads of 
the stack.
Distinct GSS nodes due to different states, but same forest nodes.

Then the states may have overlapping itemsets, and both allow the same 
reduction.
Here we unconditionally produce a forest sequence node for each ReduceAction, 
and we will have two ReduceActions with the same forestnodes on the stack.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D121368

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

Reply via email to