Skip to content
  1. Nov 24, 2009
  2. Nov 23, 2009
  3. Nov 22, 2009
    • Daniel Dunbar's avatar
      FileCheck, PR5239: Try to find the intended match on failures, but looking for a · fd29d886
      Daniel Dunbar authored
      good nearby fuzzy match. Frequently the input is nearly correct, and just
      showing the user the a nearby sensible match is enough to diagnose the problem.
       - The "fuzzyness" is pretty simple and arbitrary, but worked on my three test
         cases. If you encounter problems, or places you think FileCheck should have
         guessed but didn't, please add test cases to PR5239.
      
      For example, previously FileCheck would report this:
      --
      t.cpp:21:55: error: expected string not found in input
      // CHECK: define void @_Z2f25f2_s1([[i64_i64_ty]] %a0)
                                                            ^
      <stdin>:19:30: note: scanning from here
      define void @_Z2f15f1_s1(%1) nounwind {
                                   ^
      <stdin>:19:30: note: with variable "i64_i64_ty" equal to "%0"
      --
      
      and now it also reports this:
      --
      <stdin>:27:1: note: possible intended match here
      define void @_Z2f25f2_s1(%0) nounwind {
      ^
      --
      
      which makes it clear that the CHECK just has an extra ' %a0' in it, without
      having to check the input.
      
      llvm-svn: 89631
      fd29d886
Loading