AaronBallman wrote:

I think the preprocessor is what owns the pragma handlers and the parser is 
what gets to observe them, right? Because the preprocessor is part of the 
clangLex library (and it needs to have pragma handlers to be able to process 
pp-tokens) and clangParse is built on top of clangLex. So I think that means 
the preprocessor is what should manage the memory for these and hold the 
unique_ptr, and the parser should just get a reference to the pragma handler so 
there's no lifetime to manage (because we know clangLex outlives clangParse 
anyway)?

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

Reply via email to