[PATCH] D122611: [clang][extract-api] Add support for macros
Zixu Wang via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Mar 29 15:11:39 PDT 2022
zixuw added inline comments.
================
Comment at: clang/include/clang/ExtractAPI/API.h:334
+ using RecordMap = llvm::MapVector<StringRef, std::unique_ptr<RecordTy>>;
+ ///
/// Get the target triple for the ExtractAPI invocation.
----------------
Extra/should-be-empty line here?
================
Comment at: clang/lib/ExtractAPI/API.cpp:19
#include "clang/AST/RawCommentList.h"
+#include "clang/ExtractAPI/DeclarationFragments.h"
#include "clang/Index/USRGeneration.h"
----------------
Do we need to include declaration fragments from API.cpp?
================
Comment at: clang/lib/ExtractAPI/API.cpp:32
+RecordTy *
+addTopLevelRecord(MapVector<StringRef, std::unique_ptr<RecordTy>> &RecordMap,
+ StringRef Name, CtorArgsTy &&...CtorArgs) {
----------------
dang wrote:
> zixuw wrote:
> > Does it make sense to just directly make the `*RecordMap` types in `APISet` as a `template using`?
> Yup agreed!
Now can we use `APISet::RecordMap<RecordTy>` as the type of the first param here?
Can also get rid of including MapVector.h
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D122611/new/
https://reviews.llvm.org/D122611
More information about the cfe-commits
mailing list