Skip to content

Add IsExplicit for constructors and conversion operators#790

Merged
vgvassilev merged 1 commit intocompiler-research:mainfrom
aaronj0:add-isexplicit
Jan 31, 2026
Merged

Add IsExplicit for constructors and conversion operators#790
vgvassilev merged 1 commit intocompiler-research:mainfrom
aaronj0:add-isexplicit

Conversation

@aaronj0
Copy link
Copy Markdown
Collaborator

@aaronj0 aaronj0 commented Jan 29, 2026

Required for implementing root-project/root#19513 in our forks

@codecov
Copy link
Copy Markdown

codecov bot commented Jan 29, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 79.39%. Comparing base (34b083e) to head (fc4c235).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #790      +/-   ##
==========================================
+ Coverage   79.32%   79.39%   +0.06%     
==========================================
  Files          11       11              
  Lines        3966     3979      +13     
==========================================
+ Hits         3146     3159      +13     
  Misses        820      820              
Files with missing lines Coverage Δ
include/CppInterOp/CppInterOp.h 95.12% <ø> (ø)
include/CppInterOp/Dispatch.h 77.77% <ø> (ø)
lib/CppInterOp/CppInterOp.cpp 87.80% <100.00%> (+0.07%) ⬆️
Files with missing lines Coverage Δ
include/CppInterOp/CppInterOp.h 95.12% <ø> (ø)
include/CppInterOp/Dispatch.h 77.77% <ø> (ø)
lib/CppInterOp/CppInterOp.cpp 87.80% <100.00%> (+0.07%) ⬆️
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Copy Markdown
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

clang-tidy made some suggestions

There were too many comments to post at once. Showing the first 10 out of 11. Check the log or trigger a new build to see more.


for (auto* decl : SubDecls) {
// skip deleted constructors
if (auto* CD = llvm::dyn_cast_or_null<CXXConstructorDecl>(
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

warning: no header providing "llvm::dyn_cast_or_null" is directly included [misc-include-cleaner]

unittests/CppInterOp/FunctionReflectionTest.cpp:15:

- #include <string>
+ #include <llvm/Support/Casting.h>
+ #include <string>

} else {
// conversion operator
auto* D = static_cast<clang::Decl*>(decl);
if (auto* FTD = llvm::dyn_cast_or_null<FunctionTemplateDecl>(D))
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

warning: no header providing "clang::FunctionTemplateDecl" is directly included [misc-include-cleaner]

      if (auto* FTD = llvm::dyn_cast_or_null<FunctionTemplateDecl>(D))
                                             ^

} else {
// conversion operator
auto* D = static_cast<clang::Decl*>(decl);
if (auto* FTD = llvm::dyn_cast_or_null<FunctionTemplateDecl>(D))
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

warning: no header providing "llvm::dyn_cast_or_null" is directly included [misc-include-cleaner]

      if (auto* FTD = llvm::dyn_cast_or_null<FunctionTemplateDecl>(D))
                            ^

if (auto* FTD = llvm::dyn_cast_or_null<FunctionTemplateDecl>(D))
D = FTD->getTemplatedDecl();

if (llvm::isa<CXXConversionDecl>(D)) {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

warning: no header providing "clang::CXXConversionDecl" is directly included [misc-include-cleaner]

      if (llvm::isa<CXXConversionDecl>(D)) {
                    ^

Copy link
Copy Markdown
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

clang-tidy made some suggestions

if (auto* FTD = llvm::dyn_cast_or_null<FunctionTemplateDecl>(D))
D = FTD->getTemplatedDecl();

if (llvm::isa<CXXConversionDecl>(D)) {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

warning: no header providing "llvm::isa" is directly included [misc-include-cleaner]

      if (llvm::isa<CXXConversionDecl>(D)) {
                ^

Copy link
Copy Markdown
Contributor

@vgvassilev vgvassilev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@vgvassilev vgvassilev merged commit c211948 into compiler-research:main Jan 31, 2026
48 checks passed
@aaronj0 aaronj0 deleted the add-isexplicit branch January 31, 2026 14:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants