This patch implements generation of remaining preprocessor options and tests it by performing parse-generate-parse round trip.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
LGTM.
clang/lib/Frontend/CompilerInvocation.cpp | ||
---|---|---|
3189 | Can we name this differently, so it's obvious which is being called without looking at the argument list? I suggest ParsePreprocessorArgsImpl for this one, since it's doing the actual parsing. | |
3325–3326 | Have you considered just defining the lambdas inline in the call to RoundTrip? I'm fine either way, but the way clang-format tends to clean this up seems pretty readable to me, and the names don't really add much value since they match the functions being called. Up to you. |
clang/lib/Frontend/CompilerInvocation.cpp | ||
---|---|---|
3189 | I thought about it and decided to keep it the same. We'd be renaming it back to ParsePreprocessorArgs in a few weeks, when we round-trip the whole CompilerInvocation at once and the need for the fine-grained interposed functions disappears. | |
3325–3326 | In this case, where one of the lambdas contains a long comment, I suggest keeping it separate. It's easier to read that way. |
Can we name this differently, so it's obvious which is being called without looking at the argument list? I suggest ParsePreprocessorArgsImpl for this one, since it's doing the actual parsing.