Skip to content

Commit 73be832

Browse files
authored
correct namespace path
1 parent 14fab9c commit 73be832

File tree

2 files changed

+12
-7
lines changed

2 files changed

+12
-7
lines changed

clang-tools-extra/focxt/Focxt.cpp

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,12 @@ void get_all_files(std::string path) {
7575
std::string directorty_entry = entry.path().string();
7676
// std::cout << directorty_entry << std::endl;
7777
if (directorty_entry.find("/build") == std::string::npos &&
78-
directorty_entry.find("/llm_tests") == std::string::npos) {
78+
directorty_entry.find("/llm_tests") == std::string::npos
79+
// &&
80+
// directorty_entry.find("test") == std::string::npos &&
81+
// directorty_entry.find("doc") == std::string::npos &&
82+
// directorty_entry.find("example") == std::string::npos
83+
) {
7984
get_all_files(entry.path());
8085
}
8186
}

clang-tools-extra/focxt/GetAllContext.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -211,8 +211,8 @@ class GlobalVarMatchFinder : public MatchFinder::MatchCallback {
211211
if (global_var.its_namespace == "") {
212212
global_var.its_namespace = namespaceDecl->getNameAsString();
213213
} else {
214-
global_var.its_namespace = global_var.its_namespace + "::" +
215-
namespaceDecl->getNameAsString();
214+
global_var.its_namespace = namespaceDecl->getNameAsString() +
215+
"::" + global_var.its_namespace;
216216
}
217217
}
218218
decl_context = decl_context->getParent();
@@ -526,8 +526,8 @@ class MethodFunctionVisitor
526526
if (function.its_namespace == "") {
527527
function.its_namespace = namespaceDecl->getNameAsString();
528528
} else {
529-
function.its_namespace = function.its_namespace + "::" +
530-
namespaceDecl->getNameAsString();
529+
function.its_namespace = namespaceDecl->getNameAsString() +
530+
"::" + function.its_namespace;
531531
}
532532
}
533533
context = context->getParent();
@@ -576,8 +576,8 @@ class MethodFunctionVisitor
576576
if (a_class.its_namespace == "") {
577577
a_class.its_namespace = namespaceDecl->getNameAsString();
578578
} else {
579-
a_class.its_namespace = a_class.its_namespace + "::" +
580-
namespaceDecl->getNameAsString();
579+
a_class.its_namespace = namespaceDecl->getNameAsString() +
580+
"::" + a_class.its_namespace;
581581
}
582582
}
583583
context = context->getParent();

0 commit comments

Comments
 (0)