return;
}
- for (int i = 0; i < StackSaveValues.size(); i++) {
+ for (unsigned i = 0; i < StackSaveValues.size(); i++) {
if (StackSaveValues[i]) {
CGM.ErrorUnsupported(&S, "goto inside scope with VLA");
return;
/// if the function returns void, or may be missing one if the function returns
/// non-void. Fun stuff :).
void CodeGenFunction::EmitReturnStmt(const ReturnStmt &S) {
- for (int i = 0; i < StackSaveValues.size(); i++) {
+ for (unsigned i = 0; i < StackSaveValues.size(); i++) {
if (StackSaveValues[i]) {
CGM.ErrorUnsupported(&S, "return inside scope with VLA");
return;
return;
}
- if (StackSaveValues.back()) {
- CGM.ErrorUnsupported(&S, "break inside scope with VLA");
- return;
+ for (unsigned i = 0; i < StackSaveValues.size(); i++) {
+ if (StackSaveValues[i]) {
+ CGM.ErrorUnsupported(&S, "break inside scope with VLA");
+ return;
+ }
}
// If this code is reachable then emit a stop point (if generating
return;
}
- if (StackSaveValues.back()) {
- CGM.ErrorUnsupported(&S, "continue inside scope with VLA");
- return;
+ for (unsigned i = 0; i < StackSaveValues.size(); i++) {
+ if (StackSaveValues[i]) {
+ CGM.ErrorUnsupported(&S, "continue inside scope with VLA");
+ return;
+ }
}
// If this code is reachable then emit a stop point (if generating