We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 78ec8c6 commit c9bac6eCopy full SHA for c9bac6e
1 file changed
cpp2rust/converter/converter.cpp
@@ -381,7 +381,8 @@ bool Converter::ConvertVarDeclSkipInit(clang::VarDecl *decl) {
381
382
if (decl->isFileVarDecl()) {
383
name = ReplaceAll(Mapper::ToString(decl), "::", "_");
384
- if ((decl->isExternallyDeclarable() && !decl->hasInit()) ||
+ if (decl->isThisDeclarationADefinition() ==
385
+ clang::VarDecl::DeclarationOnly ||
386
!globals_.insert(name).second) {
387
return false;
388
}
0 commit comments