[PATCH] D148812: [NFC][clang] Fix static analyzer concerns

Soumi Manna via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Apr 20 19:37:45 PDT 2023


Manna marked an inline comment as done.
Manna added a comment.

Thank you @tahonermann and @erichkeane for reviews and feedback.



================
Comment at: clang/utils/TableGen/ClangAttrEmitter.cpp:4262
   // will be using.
-  for (auto I : Attrs) {
+  for (const auto &I : Attrs) {
     const Record &Attr = *I.second;
----------------
erichkeane wrote:
> Manna wrote:
> > Passes as a reference 
> Each element is a pair of a `std::string` and `const Record*`, which should justify this.  Not sure what you mean by 'passes as a reference'?
>>Each element is a pair of a std::string and const Record*, which should justify this.

Sorry i meant to say this instead since ParsedAttrMap Attrs = getParsedAttrList(Records, &Dupes);


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

https://reviews.llvm.org/D148812



More information about the cfe-commits mailing list