summaryrefslogtreecommitdiffstats
path: root/clang/test/CodeGenObjC/predefined-expr-in-method.m
diff options
context:
space:
mode:
authorDaniel Dunbar <daniel@zuster.org>2008-09-04 04:36:23 +0000
committerDaniel Dunbar <daniel@zuster.org>2008-09-04 04:36:23 +0000
commitc01f56c8de151c82d958e10fa59f54dc85e9623c (patch)
treeaecb92e6e8c5003821178744d2a3c500e91b7b9d /clang/test/CodeGenObjC/predefined-expr-in-method.m
parent7050c554150f2f34e23eac117c406a15265ca0c7 (diff)
downloadbcm5719-llvm-c01f56c8de151c82d958e10fa59f54dc85e9623c.tar.gz
bcm5719-llvm-c01f56c8de151c82d958e10fa59f54dc85e9623c.zip
Add some Objective-C code generation tests.
- Note that these don't really test anything other than that code generation doesn't fail or crash. Better than nothing though! llvm-svn: 55761
Diffstat (limited to 'clang/test/CodeGenObjC/predefined-expr-in-method.m')
-rw-r--r--clang/test/CodeGenObjC/predefined-expr-in-method.m17
1 files changed, 17 insertions, 0 deletions
diff --git a/clang/test/CodeGenObjC/predefined-expr-in-method.m b/clang/test/CodeGenObjC/predefined-expr-in-method.m
new file mode 100644
index 00000000000..d835ed827b3
--- /dev/null
+++ b/clang/test/CodeGenObjC/predefined-expr-in-method.m
@@ -0,0 +1,17 @@
+// RUN: clang -fnext-runtime --emit-llvm -o %t %s
+
+@interface A
+@end
+@implementation A
++(void) foo {
+ printf("__func__: %s\n", __func__);
+ printf("__FUNCTION__: %s\n", __FUNCTION__);
+ printf("__PRETTY_FUNCTION__: %s\n", __PRETTY_FUNCTION__);
+ return 0;
+}
+@end
+
+int main() {
+ [A foo];
+ return 0;
+}
OpenPOWER on IntegriCloud