Add IsExplicit for constructors and conversion operators#790
Add IsExplicit for constructors and conversion operators#790vgvassilev merged 1 commit intocompiler-research:mainfrom
IsExplicit for constructors and conversion operators#790Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ 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
🚀 New features to boost your workflow:
|
|
|
||
| for (auto* decl : SubDecls) { | ||
| // skip deleted constructors | ||
| if (auto* CD = llvm::dyn_cast_or_null<CXXConstructorDecl>( |
There was a problem hiding this comment.
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)) |
There was a problem hiding this comment.
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)) |
There was a problem hiding this comment.
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)) { |
There was a problem hiding this comment.
warning: no header providing "clang::CXXConversionDecl" is directly included [misc-include-cleaner]
if (llvm::isa<CXXConversionDecl>(D)) {
^05f6f7b to
3b8728a
Compare
| if (auto* FTD = llvm::dyn_cast_or_null<FunctionTemplateDecl>(D)) | ||
| D = FTD->getTemplatedDecl(); | ||
|
|
||
| if (llvm::isa<CXXConversionDecl>(D)) { |
There was a problem hiding this comment.
warning: no header providing "llvm::isa" is directly included [misc-include-cleaner]
if (llvm::isa<CXXConversionDecl>(D)) {
^3b8728a to
fc4c235
Compare
Required for implementing root-project/root#19513 in our forks