[PATCH] D66336: [ASTImporter] Add development internals docs

Balázs Kéri via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Aug 21 01:04:57 PDT 2019


balazske added inline comments.


================
Comment at: clang/docs/InternalsManual.rst:1569
+positive in-equivalencies otherwise. We must not allow having two (or more)
+independent redeclaration chains of structurally equivalent declarations.
+
----------------
It can be mentioned that the structural equivalency identifies the chains with the canonical decl, that becomes different for independent chains (in this case even for the same type, this is why these are seen as different).


================
Comment at: clang/docs/InternalsManual.rst:1585
+could compare prototypes to see if they have the same properties and if yes
+then we could merge these prototypes. Perhaps, we will implement squashing of
+prototypes for free functions in the future.
----------------
I do not like "we will" here, who will really do this work? (It can be the reader.)


================
Comment at: clang/docs/InternalsManual.rst:1660
+context. Consequently, calling a declaration's ``::Create()`` function directly
+would lead to errors, please don't do that!
+
----------------
We can mention that there is still the probability of having an infinite import recursion if things are imported from each other in wrong way. (From a visitor for `A` import of `B` is requested before create of node `A` and the same in visitor for `B`. The new `A` node is not yet created and not in `ImportedDecls` when import of `B` is reached.) The best is to have no import of other nodes in a visitor for `A` before create of node `A`. Or if really needed (for example in the template case) only for type `B` that does not the same thing with type `A`.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D66336





More information about the cfe-commits mailing list