This is an archive of the discontinued LLVM Phabricator instance.

[analyzer][NFC] Inline AnalyzerOptions::getUserMode()
ClosedPublic

Authored by steakhal on Jun 10 2022, 4:28 AM.

Details

Summary

When I read the code I found it easier to reason about if getUserMode
is inlined. It might be a personal preference though.

Diff Detail

Event Timeline

steakhal created this revision.Jun 10 2022, 4:28 AM
Herald added a project: Restricted Project. · View Herald Transcript
steakhal requested review of this revision.Jun 10 2022, 4:28 AM
Herald added a project: Restricted Project. · View Herald TranscriptJun 10 2022, 4:28 AM
Herald added a subscriber: cfe-commits. · View Herald Transcript
martong added inline comments.Jun 13 2022, 8:43 AM
clang/include/clang/StaticAnalyzer/Core/AnalyzerOptions.h
362–364

I would miss this comment.

steakhal added inline comments.Jun 13 2022, 12:17 PM
clang/include/clang/StaticAnalyzer/Core/AnalyzerOptions.h
362–364

Which part do you miss?

The AnalyzerOptions.def already has a half descent description about this:

(string) Controls the high-level analyzer mode, which influences the default settings for some of the lower-level config options (such as IPAMode). Value: "deep", "shallow".

If you insist, let me know what comment should I put and where.

martong accepted this revision.Jun 13 2022, 11:53 PM
martong added inline comments.
clang/include/clang/StaticAnalyzer/Core/AnalyzerOptions.h
362–364

If AnalyzerOptions.def has it then it was already redundant, so okay then.

This revision is now accepted and ready to land.Jun 13 2022, 11:53 PM
steakhal marked 2 inline comments as done.Jun 13 2022, 11:55 PM
This revision was landed with ongoing or failed builds.Jun 14 2022, 12:43 AM
This revision was automatically updated to reflect the committed changes.