[all-commits] [llvm/llvm-project] ea3574: [clang][ExtractAPI] Refactor ExtractAPIVisitor to ...

Daniel Grumberg via All-commits all-commits at lists.llvm.org
Mon Mar 27 09:24:39 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: ea35740e7e189cdcdd88344ac60a53a5b8a8318d
      https://github.com/llvm/llvm-project/commit/ea35740e7e189cdcdd88344ac60a53a5b8a8318d
  Author: Daniel Grumberg <dgrumberg at apple.com>
  Date:   2023-03-27 (Mon, 27 Mar 2023)

  Changed paths:
    M clang/include/clang/ExtractAPI/ExtractAPIVisitor.h
    A clang/include/clang/ExtractAPI/TypedefUnderlyingTypeResolver.h
    M clang/lib/ExtractAPI/CMakeLists.txt
    M clang/lib/ExtractAPI/DeclarationFragments.cpp
    M clang/lib/ExtractAPI/ExtractAPIConsumer.cpp
    R clang/lib/ExtractAPI/ExtractAPIVisitor.cpp
    M clang/lib/ExtractAPI/TypedefUnderlyingTypeResolver.cpp
    R clang/lib/ExtractAPI/TypedefUnderlyingTypeResolver.h
    M clang/tools/libclang/CXExtractAPI.cpp

  Log Message:
  -----------
  [clang][ExtractAPI] Refactor ExtractAPIVisitor to make it more extensible

Use CRTP to enable creating statically dispatched subclasses of
ExtractAPIVisitor.
This enables adding extension points and customising the behavior more
easily.

This is used in CXExtractAPI.cpp to create a specialized visitor for
Libclang as well as streamlining the batch implementation in ExtractAPIConsumer.cpp


  Commit: 21750a1ae8c86ffefc72f115116c80a98a0792dc
      https://github.com/llvm/llvm-project/commit/21750a1ae8c86ffefc72f115116c80a98a0792dc
  Author: Daniel Grumberg <dgrumberg at apple.com>
  Date:   2023-03-27 (Mon, 27 Mar 2023)

  Changed paths:
    M clang/test/Index/extract-api-cursor.m
    M clang/tools/c-index-test/c-index-test.c

  Log Message:
  -----------
  [clang][ExtractAPI] Refactor ExtractAPIVisitor to make it more extensible

Use CRTP to enable creating statically dispatched subclasses of
ExtractAPIVisitor.
This enables adding extension points and customising the behavior more
easily.

This is used in CXExtractAPI.cpp to create a specialized visitor for
Libclang as well as streamlining the batch implementation in ExtractAPIConsumer.cpp

[clang][ExtractAPI] Improve tests for clang_getSymbolGraphForCursor

Adds a new mode to c-index-test that can fetch a single symbol symbol
graph for a given source location. This way we can be more precise when
writing tests for clang_getSymbolGraphForCursor.
Additionaly this makes it easier to debug the function.

Differential Revision: https://reviews.llvm.org/D146656


  Commit: d0dd151eed4bb9a6ea209790e2727c0a007f699a
      https://github.com/llvm/llvm-project/commit/d0dd151eed4bb9a6ea209790e2727c0a007f699a
  Author: Daniel Grumberg <dgrumberg at apple.com>
  Date:   2023-03-27 (Mon, 27 Mar 2023)

  Changed paths:
    M clang/include/clang/ExtractAPI/ExtractAPIVisitor.h
    M clang/lib/ExtractAPI/ExtractAPIConsumer.cpp

  Log Message:
  -----------
  Address code review feedback


Compare: https://github.com/llvm/llvm-project/compare/0ceb7a12dbfd...d0dd151eed4b


More information about the All-commits mailing list