struct Data1; struct Data1 { int val; Data1 *ptrval; int arr[3]; Data1 *getData3() { return ptrval; } }; struct Data2 : public Data1 { }; int k; void paranuckerInternalTest(const char *action, const char *collection, const char *values); class Object1 { Data1 *tmp1; Data1 *tmp2; Data1 *getData1() { return tmp2; } Data1 *getData2() __attribute__((returns_nonnull)) { return tmp2; } void func1() { Data1 *ptr1 = new Data1; paranuckerInternalTest("=", "knownVars", "ptr1"); paranuckerInternalTest("=", "knownNonNullVars", "ptr1"); paranuckerInternalTest("=", "knownNullVars", ""); paranuckerInternalTest("=", "needCheckNullVars", ""); paranuckerInternalTest("=", "addNullVars", ""); paranuckerInternalTest("=", "removeNullVarsAll", ""); paranuckerInternalTest("=", "linkedVars", "ptr1"); paranuckerInternalTest("=", "linkedVars", "this->tmp1"); paranuckerInternalTest("=", "linkedReverseVars", "ptr1"); paranuckerInternalTest("=", "linkedReverseVars", "this->tmp1"); } void func2() { Data1 *ptr1 = new Data1[10]; paranuckerInternalTest("=", "knownVars", "ptr1"); paranuckerInternalTest("=", "knownNonNullVars", "ptr1"); paranuckerInternalTest("=", "knownNullVars", ""); paranuckerInternalTest("=", "needCheckNullVars", ""); paranuckerInternalTest("=", "addNullVars", ""); paranuckerInternalTest("=", "removeNullVarsAll", ""); paranuckerInternalTest("=", "linkedVars", "ptr1"); paranuckerInternalTest("=", "linkedVars", "this->tmp1"); paranuckerInternalTest("=", "linkedReverseVars", "ptr1"); paranuckerInternalTest("=", "linkedReverseVars", "this->tmp1"); } void func3() { int *ptr1 = new int[10]; paranuckerInternalTest("=", "knownVars", "ptr1"); paranuckerInternalTest("=", "knownNonNullVars", "ptr1"); paranuckerInternalTest("=", "knownNullVars", ""); paranuckerInternalTest("=", "needCheckNullVars", ""); paranuckerInternalTest("=", "addNullVars", ""); paranuckerInternalTest("=", "removeNullVarsAll", ""); paranuckerInternalTest("=", "linkedVars", "ptr1"); paranuckerInternalTest("=", "linkedVars", "this->tmp1"); paranuckerInternalTest("=", "linkedReverseVars", "ptr1"); paranuckerInternalTest("=", "linkedReverseVars", "this->tmp1"); } };