From 0c1240d97ebda02cf919cb850b7461718ce44152 Mon Sep 17 00:00:00 2001 From: Dimitar Dobrev Date: Tue, 20 Aug 2013 13:46:22 +0300 Subject: [PATCH] Added a compilation test for a free function with a class parameter named "ret". Signed-off-by: Dimitar Dobrev --- tests/Basic/Basic.cpp | 7 ++++++- tests/Basic/Basic.h | 4 +++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/tests/Basic/Basic.cpp b/tests/Basic/Basic.cpp index 99ea4654..4b01f651 100644 --- a/tests/Basic/Basic.cpp +++ b/tests/Basic/Basic.cpp @@ -69,4 +69,9 @@ Foo Hello::RetFoo(int a, float b) int Hello::RetEnum(Enum e) { return (int)e; -} \ No newline at end of file +} + +int unsafeFunction(const Bar& ret) +{ + return ret.A; +} diff --git a/tests/Basic/Basic.h b/tests/Basic/Basic.h index 4a464848..e7030bc4 100644 --- a/tests/Basic/Basic.h +++ b/tests/Basic/Basic.h @@ -60,4 +60,6 @@ public: int AddBar2(Bar2); int RetEnum(Enum); -}; \ No newline at end of file +}; + +int unsafeFunction(const Bar& ret);