Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Info::Namespace uses SymbolID::zero for global namespace #419

Merged
merged 1 commit into from
Jul 17, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/lib/AST/ASTVisitor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1438,8 +1438,9 @@
// it uses SymbolID::zero and should *always* exist
case Decl::TranslationUnit:
{
parent_id = SymbolID::zero;
auto [P, created] = getOrCreateInfo<
NamespaceInfo>(SymbolID::zero);
NamespaceInfo>(parent_id);
emplaceChild(P, child_id);
break;
}
Expand Down Expand Up @@ -2616,8 +2617,8 @@
class ASTVisitorConsumer
: public SemaConsumer
{
const ConfigImpl& config_;

Check warning on line 2620 in src/lib/AST/ASTVisitor.cpp

View workflow job for this annotation

GitHub Actions / GCC 13.1: C++20

g++-13.1.0: ‘const clang::mrdox::ConfigImpl& clang::mrdox::{anonymous}::ASTVisitorConsumer::config_’ ([-Wreorder])

Check warning on line 2620 in src/lib/AST/ASTVisitor.cpp

View workflow job for this annotation

GitHub Actions / GCC 13.1: C++20

g++-13.1.0: ‘const clang::mrdox::ConfigImpl& clang::mrdox::{anonymous}::ASTVisitorConsumer::config_’ ([-Wreorder])
ExecutionContext& ex_;

Check warning on line 2621 in src/lib/AST/ASTVisitor.cpp

View workflow job for this annotation

GitHub Actions / GCC 13.1: C++20

g++-13.1.0: ‘clang::mrdox::{anonymous}::ASTVisitorConsumer::ex_’ will be initialized after ([-Wreorder])

Check warning on line 2621 in src/lib/AST/ASTVisitor.cpp

View workflow job for this annotation

GitHub Actions / GCC 13.1: C++20

g++-13.1.0: ‘clang::mrdox::{anonymous}::ASTVisitorConsumer::ex_’ will be initialized after ([-Wreorder])
CompilerInstance& compiler_;

Sema* sema_ = nullptr;
Expand Down Expand Up @@ -2740,11 +2741,11 @@
void HandleTopLevelDeclInObjCContainer(DeclGroupRef DG) override { }

public:
ASTVisitorConsumer(

Check warning on line 2744 in src/lib/AST/ASTVisitor.cpp

View workflow job for this annotation

GitHub Actions / GCC 13.1: C++20

g++-13.1.0: when initialized here ([-Wreorder])

Check warning on line 2744 in src/lib/AST/ASTVisitor.cpp

View workflow job for this annotation

GitHub Actions / GCC 13.1: C++20

g++-13.1.0: when initialized here ([-Wreorder])
const ConfigImpl& config,
tooling::ExecutionContext& ex,
CompilerInstance& compiler) noexcept
: ex_(static_cast<ExecutionContext&>(ex))

Check warning on line 2748 in src/lib/AST/ASTVisitor.cpp

View workflow job for this annotation

GitHub Actions / Clang 16.0: C++20

clang++-16: field 'ex_' will be initialized after field 'config_' ([-Wreorder-ctor])

Check warning on line 2748 in src/lib/AST/ASTVisitor.cpp

View workflow job for this annotation

GitHub Actions / Clang 16.0: C++20

clang++-16: field 'ex_' will be initialized after field 'config_' ([-Wreorder-ctor])
, config_(config)
, compiler_(compiler)
{
Expand Down
Loading