[PATCH] Allow multiple check prefixes in FileCheck

Matt Arsenault arsenm2 at gmail.com
Thu Aug 29 10:12:23 PDT 2013


On Aug 29, 2013, at 7:28 , Daniel Sanders <Daniel.Sanders at imgtec.com> wrote:

> 
>  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?

No, it just searches for the first one that matches in the buffer. It doesn't advance the point it's searching from in any way while doing that.

> 
>  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
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits





More information about the llvm-commits mailing list