aboutsummaryrefslogtreecommitdiff
path: root/test/CodeGenCXX/debug-info-dup-fwd-decl.cpp
blob: db9d2e9f491d6977c78cd974317432460f6c7e12 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
// RUN: %clang_cc1 -emit-llvm -g -triple x86_64-apple-darwin -fstandalone-debug %s -o - | FileCheck %s

class Test
{
public:
    Test () : reserved (new data()) {}

    unsigned
    getID() const
    {
        return reserved->objectID;
    }
protected:
    struct data {
        unsigned objectID;
    };
    data* reserved;
};

Test t;

// CHECK: !DIDerivedType(tag: DW_TAG_pointer_type
// CHECK: !DICompositeType(tag: DW_TAG_structure_type, name: "data"
// CHECK-NOT: !DICompositeType(tag: DW_TAG_structure_type, name: "data"