)]}'
{
  "commit": "98f4db8d30d4da325298a3c2ab66d7d45ce191e9",
  "tree": "cb7f4ba58c252dd0f42b5068d0b670bcb187a485",
  "parents": [
    "eb645ddf272fdcd753f55d907af0f83f18dcf523"
  ],
  "author": {
    "name": "Francois Ferrand",
    "email": "thetypz@gmail.com",
    "time": "Fri Jul 28 07:56:14 2017 +0000"
  },
  "committer": {
    "name": "Copybara-Service",
    "email": "copybara-worker@google.com",
    "time": "Sun Sep 20 06:23:20 2020 -0700"
  },
  "message": "clang-format: fix block OpeningLineIndex around preprocessor\n\nSummary:\nThe current code would return an incorrect value when a preprocessor\ndirective is present immediately after the opening brace: this causes\nthe nanespace end comment fixer to break in some places, for exemple it\nwould not add the comment in this case:\n\n  namespace a {\n  #define FOO\n  }\n\nFixing the computation is simple enough, but it was breaking a feature,\nas it would cause comments to be added also when the namespace\ndeclaration was dependant on conditional compilation.\n\nTo fix this, a hash of the current preprocessor stack/branches is\ncomputed at the beginning of parseBlock(), so that we explicitely do not\nstore the OpeningLineIndex when the beginning and end of the block are\nnot in the same preprocessor conditions.\n\nTthe hash is computed based on the line, but this could propbably be\nimproved by using the actual condition, so that clang-format would be\nable to match multiple identical #ifdef blocks.\n\nReviewers: krasimir, djasper\n\nReviewed By: krasimir\n\nSubscribers: klimek, cfe-commits\n\nDifferential Revision: https://reviews.llvm.org/D35483\n\nllvm-svn: 309369\nGitOrigin-RevId: a98a95cca735b95cca5c904fa5ca875d916effc1\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "9bb9ed19183ccbaaa0b9add510ab278671ab2228",
      "old_mode": 33188,
      "old_path": "lib/Format/UnwrappedLineParser.cpp",
      "new_id": "bbed83263ce0de7aea4bb1b3cc47833763320ea0",
      "new_mode": 33188,
      "new_path": "lib/Format/UnwrappedLineParser.cpp"
    },
    {
      "type": "modify",
      "old_id": "5e1eef766196bce94916b707dedf449627b72428",
      "old_mode": 33188,
      "old_path": "lib/Format/UnwrappedLineParser.h",
      "new_id": "47e41b3bb29dd3caa2dc3b53aa6d920568e473c3",
      "new_mode": 33188,
      "new_path": "lib/Format/UnwrappedLineParser.h"
    },
    {
      "type": "modify",
      "old_id": "92f34216293877f71547520698d19ab569d81721",
      "old_mode": 33188,
      "old_path": "unittests/Format/NamespaceEndCommentsFixerTest.cpp",
      "new_id": "fda8b4d69fe099745c25b4a213a08c68e0be3396",
      "new_mode": 33188,
      "new_path": "unittests/Format/NamespaceEndCommentsFixerTest.cpp"
    }
  ]
}
