Skip to content

Commit

Permalink
Store if a ctor is explicit in the database
Browse files Browse the repository at this point in the history
  • Loading branch information
danakj committed Nov 29, 2023
1 parent 67410e2 commit 64ee78e
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
1 change: 1 addition & 0 deletions subdoc/lib/database.h
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,7 @@ struct MethodSpecific {
bool is_ctor;
bool is_dtor;
bool is_conversion;
bool is_explicit;

// TODO: Find the Database element of the root ancestor virtual method,
// when this one is virtual, and link to it.
Expand Down
8 changes: 8 additions & 0 deletions subdoc/lib/visit.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1048,6 +1048,14 @@ class Visitor : public clang::RecursiveASTVisitor<Visitor> {
.is_ctor = clang::isa<clang::CXXConstructorDecl>(decl),
.is_dtor = clang::isa<clang::CXXDestructorDecl>(decl),
.is_conversion = clang::isa<clang::CXXConversionDecl>(decl),
.is_explicit =
[](const clang::CXXConstructorDecl* ctor) {
if (ctor) {
return ctor->isExplicit();
} else {
return false;
}
}(clang::dyn_cast<clang::CXXConstructorDecl>(decl)),
.qualifier =
[mdecl]() {
switch (mdecl->getRefQualifier()) {
Expand Down

0 comments on commit 64ee78e

Please sign in to comment.