summaryrefslogtreecommitdiff
path: root/test/FrontendC++/2010-02-17-DbgArtificialArg.cpp
diff options
context:
space:
mode:
authorDevang Patel <dpatel@apple.com>2010-02-18 00:53:49 +0000
committerDevang Patel <dpatel@apple.com>2010-02-18 00:53:49 +0000
commitca82a15ad1830440dadfd18116d1a450df34b90a (patch)
tree298c11c7dcfeeced4bbb7892c77da7cd2da62ecd /test/FrontendC++/2010-02-17-DbgArtificialArg.cpp
parentdcdcef2cb38e79d72e03b18d966788e67ca20a81 (diff)
downloadllvm-ca82a15ad1830440dadfd18116d1a450df34b90a.tar.gz
llvm-ca82a15ad1830440dadfd18116d1a450df34b90a.tar.bz2
llvm-ca82a15ad1830440dadfd18116d1a450df34b90a.tar.xz
New test case for r96543.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96544 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/FrontendC++/2010-02-17-DbgArtificialArg.cpp')
-rw-r--r--test/FrontendC++/2010-02-17-DbgArtificialArg.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/test/FrontendC++/2010-02-17-DbgArtificialArg.cpp b/test/FrontendC++/2010-02-17-DbgArtificialArg.cpp
new file mode 100644
index 0000000000..5969e6b51a
--- /dev/null
+++ b/test/FrontendC++/2010-02-17-DbgArtificialArg.cpp
@@ -0,0 +1,14 @@
+// RUN: %llvmgcc -g -S %s -o - | grep DW_TAG_pointer_type | grep "i32 458767, metadata .., metadata ..., metadata .., i32 0, i64 64, i64 64, i64 0, i32 64, metadata ..."
+// Here, second to last argument "i32 64" indicates that artificial type is set.
+// Test to artificial attribute attahed to "this" pointer type.
+// Radar 7655792 and 7655002
+
+class A {
+public:
+ int fn1(int i) const { return i + 2; };
+};
+
+int foo() {
+ A a;
+ return a.fn1(1);
+}