From ef3f135af28f8c3798cd0fc6229bd37f93ff868d Mon Sep 17 00:00:00 2001 From: Simon Martin Date: Sat, 1 Mar 2014 10:37:55 +0100 Subject: [PATCH] Ticket #5050: Added test case since it works now. --- test/testautovariables.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/test/testautovariables.cpp b/test/testautovariables.cpp index 1ba4d423b..f4abf6a1b 100644 --- a/test/testautovariables.cpp +++ b/test/testautovariables.cpp @@ -348,8 +348,13 @@ private: ASSERT_EQUALS("[test.cpp:3]: (error) Address of local auto-variable assigned to a function parameter.\n", errout.str()); } - void testautovar12() { // Ticket #5024 - Crash on invalid input + void testautovar12() { // Ticket #5024, #5050 - Crash on invalid input check("void f(int* a) { a = }"); + check("struct custom_type { custom_type(int) {} };\n" + "void func(int) {}\n" + "int var;\n" + "void init() { func(var); }\n" + "UNKNOWN_MACRO_EXPANDING_TO_SIGNATURE { custom_type a(var); }"); } void testautovar_array1() {