Skip to content
Snippets Groups Projects
Commit 1cff2939 authored by Vassil Vassilev's avatar Vassil Vassilev
Browse files

Test enum constant cleanup.

parent fd5eeeab
No related branches found
No related tags found
No related merge requests found
// RUN: cat %s | %cling -Xclang -verify 2>&1 | FileCheck %s
// Tests the removal of nested decls
.storeState "testNestedDecls1"
struct Outer { struct Inner { enum E{i = 1}; }; };error_here; // expected-error {{use of undeclared identifier 'error_here'}}
.compareState "testNestedDecls1"
// CHECK-NOT: Differences
.rawInput 1
.storeState "parentLookupTables"
enum AnEnum {
aa = 3,
bb = 4,
}; error_here; // expected-error {{C++ requires a type specifier for all declarations}}
.compareState "parentLookupTables"
.rawInput 0
// CHECK-NOT: Differences
.rawInput
namespace Outer { struct Inner { enum E{i = 2}; }; };
.rawInput
Outer::Inner::i
// CHECK: (Outer::Inner::E::i) : (int) 2
enum A{a};
.storeState "testNestedDecls2"
enum A{a}; // expected-error {{redefinition of 'A'}} expected-note {{previous definition is here}}
.compareState "testNestedDecls2"
// CHECK-NOT: Differences
Outer::Inner::i
// CHECK: (Outer::Inner::E::i) : (int) 2
a // CHECK: (enum A) (A::a) : (int) 0
.q
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment