)]}'
{
  "commit": "97c2e03d538c6b90f8c0c32182b40e0074e475f3",
  "tree": "b28f6fbb7a7a501cd4bc320319950b87a73970b5",
  "parents": [
    "176c93eebf64e5b0a05df1dfd811555c0a8d77fe"
  ],
  "author": {
    "name": "Joel E. Denny",
    "email": "jdenny.ornl@gmail.com",
    "time": "Tue Jul 28 18:09:05 2020 -0400"
  },
  "committer": {
    "name": "Copybara-Service",
    "email": "copybara-worker@google.com",
    "time": "Tue Oct 27 11:31:41 2020 -0700"
  },
  "message": "[FileCheck] Extend -dump-input with substitutions\n\nSubstitutions are already reported in the diagnostics appearing before\nthe input dump in the case of failed directives, and they\u0027re reported\nin traces (produced by `-vv -dump-input\u003dnever`) in the case of\nsuccessful directives.  However, those reports are not always\nconvenient to view while investigating the input dump, so this patch\nadds the substitution report to the input dump too.  For example:\n\n```\n$ cat check\nCHECK: hello [[WHAT:[a-z]+]]\nCHECK: [[VERB]] [[WHAT]]\n\n$ FileCheck -vv -DVERB\u003dgoodbye check \u003c input |\u0026 tail -8\n\u003c\u003c\u003c\u003c\u003c\u003c\n           1: hello world\ncheck:1       ^~~~~~~~~~~\n           2: goodbye word\ncheck:2\u00270     X~~~~~~~~~~~ error: no match found\ncheck:2\u00271                  with \"VERB\" equal to \"goodbye\"\ncheck:2\u00272                  with \"WHAT\" equal to \"world\"\n\u003e\u003e\u003e\u003e\u003e\u003e\n```\n\nWithout this patch, the location reported for a substitution for a\ndirective match is the directive\u0027s full match range.  This location is\nmisleading as it implies the substitution itself matches that range.\nThis patch changes the reported location to just the match range start\nto suggest the substitution is known at the start of the match.  (As\nin the above example, input dumps don\u0027t mark any range for\nsubstitutions.  The location info in that case simply identifies the\nright line for the annotation.)\n\nReviewed By: mehdi_amini, thopre\n\nDifferential Revision: https://reviews.llvm.org/D83650\n\nGitOrigin-RevId: d680711b94e94e9387076a0daf2a329e304e6751\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "2f0e641394d5718ea8ebadc75f180ff33431abab",
      "old_mode": 33188,
      "old_path": "include/llvm/Support/FileCheck.h",
      "new_id": "1eb609ef725eb17ef219da1ca882066fc9bedb7e",
      "new_mode": 33188,
      "new_path": "include/llvm/Support/FileCheck.h"
    },
    {
      "type": "modify",
      "old_id": "d0e79c675bcbdbacb494af25aa4f3b5539a10c96",
      "old_mode": 33188,
      "old_path": "lib/Support/FileCheck.cpp",
      "new_id": "fd426a16d02eb88b6a9c9e7e0f17c459cda728c2",
      "new_mode": 33188,
      "new_path": "lib/Support/FileCheck.cpp"
    },
    {
      "type": "modify",
      "old_id": "6ca67ec2964c29c32fc292a8ad50b4c02dc9af21",
      "old_mode": 33188,
      "old_path": "lib/Support/FileCheckImpl.h",
      "new_id": "d3f4384e0df0c01768382799620c3193d9a8f038",
      "new_mode": 33188,
      "new_path": "lib/Support/FileCheckImpl.h"
    },
    {
      "type": "modify",
      "old_id": "785ee23d03dd538aa9982a4852695da0215de8a4",
      "old_mode": 33188,
      "old_path": "test/FileCheck/dump-input-annotations.txt",
      "new_id": "fe39f39186bf19f1172884616e92c03f91761d0e",
      "new_mode": 33188,
      "new_path": "test/FileCheck/dump-input-annotations.txt"
    },
    {
      "type": "modify",
      "old_id": "d0532d02f9fc618e91ce7c2c775bf2dff19769f9",
      "old_mode": 33188,
      "old_path": "test/FileCheck/verbose.txt",
      "new_id": "2098ddc4a2d86c0988df81f52ddf2e5e33907a4a",
      "new_mode": 33188,
      "new_path": "test/FileCheck/verbose.txt"
    },
    {
      "type": "modify",
      "old_id": "fa79c5e8948940de6fe4435bd40795390f2d89c5",
      "old_mode": 33188,
      "old_path": "utils/FileCheck/FileCheck.cpp",
      "new_id": "81889b2540f9be6ea7e25863af188556537f08ac",
      "new_mode": 33188,
      "new_path": "utils/FileCheck/FileCheck.cpp"
    }
  ]
}
