This is an archive of the discontinued LLVM Phabricator instance.

[clang][cli] Generate and round-trip analyzer options
ClosedPublic

Authored by jansvoboda11 on Jan 25 2021, 8:36 AM.

Details

Summary

This patch implements generation of remaining analyzer options and tests it by performing parse-generate-parse round trip.

Diff Detail

Event Timeline

jansvoboda11 created this revision.Jan 25 2021, 8:36 AM
jansvoboda11 requested review of this revision.Jan 25 2021, 8:36 AM
Herald added a project: Restricted Project. · View Herald TranscriptJan 25 2021, 8:36 AM
Herald added a subscriber: cfe-commits. · View Herald Transcript
jansvoboda11 retitled this revision from [WIP][clang][cli] Generate and round-trip analyzer options to [clang][cli] Generate and round-trip analyzer options.Jan 28 2021, 9:21 AM
jansvoboda11 edited the summary of this revision. (Show Details)
dexonsmith accepted this revision.Jan 28 2021, 12:14 PM

LGTM.

clang/lib/Frontend/CompilerInvocation.cpp
762–763

Can you rename this ParseAnalyzerArgsImpl for better readability?

1048

I wonder if these lambdas could/should just be defined inline in the call to RoundTrip, but up to you to decide.

This revision is now accepted and ready to land.Jan 28 2021, 12:14 PM

Rebase, inline lambdas

clang/lib/Frontend/CompilerInvocation.cpp
762–763

I left this unchanged to keep the diff (and merge conflicts) minimal. We would rename it back to ParseAnalyzerArgs in a few weeks anyway (when we drop granular round-tripping in favor of one big round-trip).

1048

Why not, clang-format handles the inline lambdas pretty well.

dexonsmith added inline comments.Jan 29 2021, 8:59 AM
clang/lib/Frontend/CompilerInvocation.cpp
762–763

I still have a preference for somehow varying the two names despite the minor churn — maybe the other one could be parseAnalyzerArgsWithRoundTrip — but it’s up to you (still LGTM as-is).

Rebase, rename original parse function

jansvoboda11 edited the summary of this revision. (Show Details)Feb 8 2021, 12:24 AM
This revision was landed with ongoing or failed builds.Feb 8 2021, 12:26 AM
This revision was automatically updated to reflect the committed changes.