summaryrefslogtreecommitdiff
path: root/clang/test/CodeGenCXX/2007-07-29-RestrictPtrArg.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang/test/CodeGenCXX/2007-07-29-RestrictPtrArg.cpp')
-rw-r--r--clang/test/CodeGenCXX/2007-07-29-RestrictPtrArg.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/clang/test/CodeGenCXX/2007-07-29-RestrictPtrArg.cpp b/clang/test/CodeGenCXX/2007-07-29-RestrictPtrArg.cpp
new file mode 100644
index 0000000..d7c96f5
--- /dev/null
+++ b/clang/test/CodeGenCXX/2007-07-29-RestrictPtrArg.cpp
@@ -0,0 +1,7 @@
+// RUN: %clang_cc1 -emit-llvm %s -o - | FileCheck %s
+
+void foo(int * __restrict myptr1, int * myptr2) {
+ // CHECK: noalias
+ myptr1[0] = 0;
+ myptr2[0] = 0;
+}