blob: 7717c10aaf69322a2376fec685c0aedbc73950df [file] [log] [blame]
Matt Arsenaultb79a25b2019-05-22 21:28:20 +00001// RUN: not llvm-tblgen %s 2>&1 | FileCheck -DFILE=%s %s
2
3class ConstantsImpl {
4 int NegOne = -1;
5}
6
7def Constants : ConstantsImpl;
8
9// CHECK: [[FILE]]:[[@LINE+2]]:38: error: invalid range, cannot be negative
10// CHECK: [[FILE]]:[[@LINE+1]]:38: error: expected declaration in for
11foreach Index = 0 - Constants.NegOne in {
12
13}