Skip to content
Merged
Show file tree
Hide file tree
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
2 changes: 2 additions & 0 deletions clang/lib/CIR/CodeGen/CIRGenModule.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1258,6 +1258,8 @@ void CIRGenModule::emitTopLevelDecl(Decl *decl) {
case Decl::Enum:
case Decl::Using: // using X; [C++]
case Decl::UsingDirective: // using namespace X; [C++]
case Decl::UsingEnum: // using enum X; [C++]
case Decl::NamespaceAlias:
case Decl::Typedef:
case Decl::TypeAlias: // using foo = bar; [C++11]
case Decl::Record:
Expand Down
11 changes: 11 additions & 0 deletions clang/test/CIR/CodeGen/enum.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,14 @@ int f() {

// CHECK: cir.func{{.*}} @_Z1fv
// CHECK: cir.const #cir.int<1> : !u32i

namespace test {
using enum Numbers;
};

int f2() {
return test::Two;
}

// CHECK: cir.func{{.*}} @_Z2f2v
// CHECK: cir.const #cir.int<2> : !u32i
8 changes: 8 additions & 0 deletions clang/test/CIR/CodeGen/namespace.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -93,3 +93,11 @@ void f7() {
}

// CHECK: cir.func{{.*}} @_Z2f7v()

namespace test_alias = test;

int f8() {
return test_alias::g2;
}

// CHECK: cir.func{{.*}} @_Z2f8v()
Loading