https://github.com/nicovank commented:

Some comments.

Regarding usage of `std::string`: Right now the library takes a `StringRef` 
through `Template` and `Parser`, and then keeps (2-4?) copies of chunks of the 
input in `Token` (`RawBody` and `TokenBody`) then `ASTNode` (`RawBody` and 
`Body`). Does that sound correct and reasonable? IMO the ideal scenario is the 
input string is only owned by `Template` and the rest references that copy, but 
this is non-trivial if any manipulation is needed which might be the case here.

https://github.com/llvm/llvm-project/pull/105893
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to