[PATCH] D57855: [analyzer] Reimplement checker options
Kristóf Umann via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Feb 11 15:21:48 PST 2019
Szelethus marked 5 inline comments as done.
Szelethus added inline comments.
================
Comment at: include/clang/StaticAnalyzer/Checkers/Checkers.td:384
+ CheckerOptions<[
+ CmdLineOption<Boolean,
+ "Optimistic",
----------------
xazax.hun wrote:
> It would be great if there were a way to define options once and reuse them.
I think it's possible with something similar:
```
def OptimisticOption :
CmdLineOption<Boolean,
"Optimistic",
"If set to true, the checker assumes that all the "
"allocating and deallocating functions are annotated with "
"ownership_holds, ownership_takes and ownership_returns.",
"false">;
def DynamicMemoryModeling: Checker<"DynamicMemoryModeling">,
HelpText<"The base of several malloc() related checkers. On it's own it "
"emits no reports, but adds valuable information to the analysis "
"when enabled.">,
CheckerOptions<[
OptimisticOption
]>,
Dependencies<[CStringModeling]>,
Documentation<NotDocumented>;
```
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D57855/new/
https://reviews.llvm.org/D57855
More information about the cfe-commits
mailing list