[PATCH] D126536: [pseudo] Add grammar annotations support.

Sam McCall via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Jun 8 14:34:04 PDT 2022


sammccall accepted this revision.
sammccall added inline comments.
This revision is now accepted and ready to land.


================
Comment at: clang-tools-extra/pseudo/include/clang-pseudo/Grammar.h:91
+// attribute value (all attributes share a namespace).
+// An ExtensionID is the index into a table of attribute values.
+using ExtensionID = uint16_t;
----------------
nit: I'd drop this sentence, as using it to index into a table is only ever used to produce debug representations I think - usually we use ExtensionID as an index into a map


================
Comment at: clang-tools-extra/pseudo/include/clang-pseudo/Grammar.h:219
+  // ExtensionID is the index of the table.
+  std::vector<std::string> AttributeValues;
 };
----------------
looking at this again, ExtensionNames seems clearer as ExtensionNames[ExtID] seems more obvious that the kinds agree. But up to you


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D126536



More information about the cfe-commits mailing list