[PATCH] Allow multiple check prefixes in FileCheck
Daniel Sanders
daniel.sanders at imgtec.com
Thu Aug 29 07:28:58 PDT 2013
It looks like FindFirstMatchingPrefix will only match CheckPrefixes[1] after all instances of the CheckPrefixes[0] have been discovered. Doesn't this lead to skipping some of the checks?
Using test/FileCheck/check-dag-multi-prefix.txt as an example. I think it would match the A prefixes on lines 19-21, fail to find any further A prefixes, then match the B prefixes on lines 23-26. I don't think the B prefixes on lines 15-17 would be added to CheckStrings in ReadCheckFile(). The test would still pass but it won't have performed all the checks.
It might also skip the second block of B's. I think it would match the 'A' in 'B-DAG', then line 739 of FileCheck.cpp would discard the 'B-' preventing the B prefix from being matched.
http://llvm-reviews.chandlerc.com/D1374
More information about the llvm-commits
mailing list