[all-commits] [llvm/llvm-project] a9909d: [clang][extractapi] Tie API and serialization to t...

Daniel Grumberg via All-commits all-commits at lists.llvm.org
Wed Mar 30 10:33:36 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: a9909d23e9bb8c4649cba1c14d479c28df4ca185
      https://github.com/llvm/llvm-project/commit/a9909d23e9bb8c4649cba1c14d479c28df4ca185
  Author: Daniel Grumberg <dgrumberg at apple.com>
  Date:   2022-03-30 (Wed, 30 Mar 2022)

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

  Log Message:
  -----------
  [clang][extractapi] Tie API and serialization to the FrontendAction

Make the API records a property of the action instead of the ASTVisitor
so that it can be accessed outside the AST visitation and push back
serialization to the end of the frontend action.

This will allow accessing and modifying the API records outside of the
ASTVisitor, which is a prerequisite for supporting macros.


  Commit: 529a0570f7e8c5144bd3ad057e43f00e3af58d1b
      https://github.com/llvm/llvm-project/commit/529a0570f7e8c5144bd3ad057e43f00e3af58d1b
  Author: Daniel Grumberg <dgrumberg at apple.com>
  Date:   2022-03-30 (Wed, 30 Mar 2022)

  Changed paths:
    M clang/include/clang/ExtractAPI/API.h
    M clang/include/clang/ExtractAPI/DeclarationFragments.h
    M clang/include/clang/ExtractAPI/Serialization/SymbolGraphSerializer.h
    M clang/lib/ExtractAPI/API.cpp
    M clang/lib/ExtractAPI/DeclarationFragments.cpp
    M clang/lib/ExtractAPI/ExtractAPIConsumer.cpp
    M clang/lib/ExtractAPI/Serialization/SymbolGraphSerializer.cpp
    A clang/test/ExtractAPI/macro_undefined.c
    A clang/test/ExtractAPI/macros.c

  Log Message:
  -----------
  [clang][extract-api] Add support for macros

To achieve this we hook into the preprocessor during the
ExtractAPIAction and record definitions for macros that don't get
undefined during preprocessing.


Compare: https://github.com/llvm/llvm-project/compare/0550601d1801...529a0570f7e8


More information about the All-commits mailing list