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



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to