[PATCH] D95629: [clang][analyzer] Own string keys in AnalyzerOptions::ConfigTable

Duncan P. N. Exon Smith via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Jan 28 12:12:50 PST 2021


dexonsmith requested changes to this revision.
dexonsmith added a comment.
This revision now requires changes to proceed.

> This patch replaces StringMap<...> with std::map<std::string, ...> in AnalyzerOptions::ConfigTable. It seems to be the only non-owning reference to command line arguments in the whole CompilerInvocation, which would introduce a lot of complexity with round-tripping arguments (D94472 <https://reviews.llvm.org/D94472>).

I think this patch can be skipped. `StringMap` owns its own strings. `StringMapEntry` uses tail allocation to include a null-terminated string inline. For details, have a look at `StringMapEntry::Create` in llvm/ADT/StringMapEntry.h.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D95629



More information about the cfe-commits mailing list