i != DS->decl_end(); ++i) {
if (VarDecl* D = dyn_cast<VarDecl>(*i)) {
result |= D->getType()->isVariablyModifiedType();
+ result |= !!D->getAttr<CleanupAttr>();
+ } else if (TypedefDecl* D = dyn_cast<TypedefDecl>(*i)) {
+ result |= D->getUnderlyingType()->isVariablyModifiedType();
}
}
}
L:
return sizeof a;
}
+
+int test2(int x) {
+ goto L; // expected-error{{illegal jump}}
+ typedef int a[x];
+ L:
+ return sizeof(a);
+}
+
+void test3clean(int*);
+
+int test3() {
+ goto L; // expected-error{{illegal jump}}
+ int a __attribute((cleanup(test3clean)));
+ L:
+ return a;
+}