[llvm-dev] RFC for f18+runtimes in LLVM

Michael Kruse via llvm-dev llvm-dev at lists.llvm.org
Wed Mar 6 20:06:41 PST 2019


Am Di., 5. März 2019 um 11:57 Uhr schrieb Chris Lattner <clattner at nondot.org>:
> > Could there be a common base class for flang and clang AST nodes? That
> > is, an abstract class that has children()/dump()/getSourceRange()?
>
> What useful code (other than trivial dumpers) could work at that level of abstraction?

Some tooling components are not dependent much on what semantics an
AST node represents. Some ideas:

 * clang-query/ASTMatcher, especially those that check for the node type only.

 * clang-tidy: Just have a different set of checkers for
C/C++/ObjC/Fortran; (As alternative to duplicating or templating code
on Fortran/Clang AST types)

 * clang-diff

 * serialization/deserialization of ASTs

 * graphviz visualization


Michael


More information about the llvm-dev mailing list