[PATCH] D148381: [WIP][Clang] Add element_count attribute

Balázs Kéri via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Apr 27 23:58:45 PDT 2023


balazske added inline comments.


================
Comment at: clang/lib/AST/ASTImporter.cpp:8768
 class AttrImporter {
+  friend ASTImporter;
+
----------------
This line is not necessary.


================
Comment at: clang/lib/AST/ASTImporter.cpp:8987
+    cast<ElementCountAttr>(FromAttr)->copyCountFieldSourceRanges(
+        cast<ElementCountAttr>(AI.ToAttr));
+    break;
----------------
>From `ASTImporter` point of view this looks not correct: The `ToAttr` has a different AST context than the `FromAttr`, simple copy of a source location is not enough. There is a `ASTImporter::Import(SourceRange)` function that can be used.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D148381



More information about the cfe-commits mailing list