[clang] [clang][deps] Optimize command line generation (PR #65412)
Ben Langmuir via cfe-commits
cfe-commits at lists.llvm.org
Tue Sep 5 15:33:11 PDT 2023
benlangmuir wrote:
> There are places in Clang where we store the result of the const function in some kind of long-lived data structure, and someplace else modify the result of the non-const function, expecting the change to be reflected.
I would be comfortable with this, because you would still have to call a distinctly named function (getMut...) in order to do the mutation itself IIUC. If they are const-casting of course that wouldn't be enough.
> Note that you can use CompilerInvocationBase to get the behavior you're describing.
I think `CompilerInvocationBase` goes a step farther than what I described, because it would give you the mutating methods with the original names, no?
https://github.com/llvm/llvm-project/pull/65412
More information about the cfe-commits
mailing list