summaryrefslogtreecommitdiffstats
path: root/clang/test
diff options
context:
space:
mode:
authorDavid Blaikie <dblaikie@gmail.com>2013-08-18 04:50:23 +0000
committerDavid Blaikie <dblaikie@gmail.com>2013-08-18 04:50:23 +0000
commit5043815a60aa4cf7f8e988679bc762c84936b762 (patch)
treeeb8ad90f1b3665d9785e46133ea536acdfd3517c /clang/test
parent6dd203288da9b2bbdcd44866755a4f98b88b5327 (diff)
downloadbcm5719-llvm-5043815a60aa4cf7f8e988679bc762c84936b762.tar.gz
bcm5719-llvm-5043815a60aa4cf7f8e988679bc762c84936b762.zip
DebugInfo: don't require full definitions for friend classes
Fixes a crash-on-valid introduced by r188486 (which should've occurred earlier but for a blatant bug where calling createFwdDecl from the requireCompleteType callback was useless under -flimit-debug-info and we were just getting lucky with other later callbacks requiring the type anyway). llvm-svn: 188622
Diffstat (limited to 'clang/test')
-rw-r--r--clang/test/CodeGenCXX/debug-info-friend.cpp16
1 files changed, 11 insertions, 5 deletions
diff --git a/clang/test/CodeGenCXX/debug-info-friend.cpp b/clang/test/CodeGenCXX/debug-info-friend.cpp
index c50f281a3b8..cf6651cde18 100644
--- a/clang/test/CodeGenCXX/debug-info-friend.cpp
+++ b/clang/test/CodeGenCXX/debug-info-friend.cpp
@@ -1,11 +1,17 @@
-// RUN: %clang -fverbose-asm -S -g %s -o - | grep DW_TAG_friend
+// RUN: %clang -emit-llvm -S -g %s -o - | FileCheck %s
class MyFriend;
-class SomeClass
-{
- friend class MyFriend;
+class SomeClass {
+ friend class MyFriend;
+ typedef int SomeType;
};
-SomeClass sc;
+SomeClass *x;
+struct MyFriend {
+ static void func(SomeClass::SomeType) {
+ }
+};
+
+// CHECK: DW_TAG_friend
OpenPOWER on IntegriCloud