Szelethus marked 2 inline comments as done.
Szelethus added inline comments.


================
Comment at: clang/include/clang/StaticAnalyzer/Core/CheckerRegistryData.h:83
+
+using CmdLineOptionList = llvm::SmallVector<CmdLineOption, 0>;
+
----------------
gamesh411 wrote:
> Could you please explain why use zero for the small-vector element count? My 
> first thought would be that literally anything other than 0 would be more 
> beneficial because of non-dynamic storage, even if we have use a totally 
> ad-hoc value here (like 8 or 42 or whatever). Why not std::vector if we do 
> not want static storage? Maybe there is something that I'm just not aware of 
> :D
https://llvm.org/docs/ProgrammersManual.html#llvm-adt-smallvector-h

> `SmallVector` has grown a few other minor advantages over `std::vector`, 
> causing `SmallVector<Type, 0>` to be preferred over `std::vector<Type>`.


================
Comment at: clang/lib/StaticAnalyzer/Frontend/CheckerRegistry.cpp:472
 
-  using CmdLineOption = CheckerRegistry::CmdLineOption;
+  using CmdLineOption = CmdLineOption;
 
----------------
gamesh411 wrote:
> A bit confused here. It is not immediately clear for me from which namespace 
> are we importing CmdLineOption. Is it possible to use a fully qualified type 
> name on the RHS of the using statement?
This looks stupid because it is :^) Accidentally left it there.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D82585/new/

https://reviews.llvm.org/D82585



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

Reply via email to