Files
clang-p2996/clang/test/CodeGenCXX/debug-info-class-limited.cpp
Richard Smith 594461f02c Call RequireCompleteType when performing ADL even if the type is already
complete. We hook into this check from a couple of other places (modules,
debug info) so it's not OK to elide the check if the type was already
complete.

llvm-svn: 203978
2014-03-14 22:07:27 +00:00

53 lines
953 B
C++

// RUN: %clang -emit-llvm -fno-standalone-debug -g -S %s -o - | FileCheck %s
namespace PR16214_1 {
// CHECK-DAG: [ DW_TAG_structure_type ] [foo] [line [[@LINE+1]], {{.*}} [def]
struct foo {
int i;
};
typedef foo bar;
bar *a;
bar b;
}
namespace PR14467 {
// CHECK-DAG: [ DW_TAG_structure_type ] [foo] [line [[@LINE+1]], {{.*}} [def]
struct foo {
};
foo *bar(foo *a) {
foo *b = new foo(*a);
return b;
}
}
namespace test1 {
// CHECK-DAG: [ DW_TAG_structure_type ] [foo] [line [[@LINE+1]], {{.*}} [def]
struct foo {
};
extern int bar(foo *a);
int baz(foo *a) {
return bar(a);
}
}
namespace test2 {
// FIXME: if we were a bit fancier, we could realize that the 'foo' type is only
// required because of the 'bar' type which is not required at all (or might
// only be required to be declared)
// CHECK-DAG: [ DW_TAG_structure_type ] [foo] [line [[@LINE+1]], {{.*}} [def]
struct foo {
};
struct bar {
foo f;
};
void func() {
foo *f;
}
}