Skip to content

Commit d2881b5

Browse files
committed
Ignore static_asserts and concepts
1 parent 5fda0df commit d2881b5

2 files changed

Lines changed: 9 additions & 0 deletions

File tree

‎cpp2rust/converter/converter.cpp‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1268,6 +1268,12 @@ bool Converter::VisitTypeAliasTemplateDecl(clang::TypeAliasTemplateDecl *) {
12681268
return false;
12691269
}
12701270

1271+
bool Converter::VisitStaticAssertDecl(clang::StaticAssertDecl *) {
1272+
return false;
1273+
}
1274+
1275+
bool Converter::VisitConceptDecl(clang::ConceptDecl *) { return false; }
1276+
12711277
static bool IsaSemiColonStmt(const clang::Stmt *stmt) {
12721278
switch (stmt->getStmtClass()) {
12731279
case clang::Stmt::IfStmtClass:

‎cpp2rust/converter/converter.h‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -164,6 +164,9 @@ class Converter : public clang::RecursiveASTVisitor<Converter> {
164164
virtual bool VisitTypeAliasDecl(clang::TypeAliasDecl *decl);
165165
virtual bool VisitTypeAliasTemplateDecl(clang::TypeAliasTemplateDecl *decl);
166166

167+
bool VisitStaticAssertDecl(clang::StaticAssertDecl *decl);
168+
bool VisitConceptDecl(clang::ConceptDecl *decl);
169+
167170
virtual bool VisitCompoundStmt(clang::CompoundStmt *stmt);
168171

169172
virtual bool VisitDeclStmt(clang::DeclStmt *stmt);

0 commit comments

Comments
 (0)