)]}'
{
  "commit": "7d1e283bd3b4440aea9ac375ca51e2ee6b0e86f5",
  "tree": "4814416cd3ae189e9c0a852d1527d6b07bc6f388",
  "parents": [
    "e989e31a47375a7d556269eead538dc65edcef2b"
  ],
  "author": {
    "name": "Krystian Stasiowski",
    "email": "sdkrystian@gmail.com",
    "time": "Wed Oct 30 09:24:10 2024 -0600"
  },
  "committer": {
    "name": "GitHub",
    "email": "noreply@github.com",
    "time": "Wed Oct 30 11:24:10 2024 -0400"
  },
  "message": "[Clang][Sema] Ignore previous partial specializations of member templates explicitly specialized for an implicitly instantiated class template specialization (#113464)\n\nConsider the following:\r\n```\r\ntemplate\u003ctypename T\u003e\r\nstruct A {\r\n  template\u003ctypename U\u003e\r\n  struct B {\r\n    static constexpr int x \u003d 0; // #1\r\n  };\r\n\r\n  template\u003ctypename U\u003e\r\n  struct B\u003cU*\u003e {\r\n    static constexpr int x \u003d 1; // #2\r\n  };\r\n};\r\n\r\ntemplate\u003c\u003e\r\ntemplate\u003ctypename U\u003e\r\nstruct A\u003clong\u003e::B {\r\n  static constexpr int x \u003d 2; // #3\r\n};\r\n\r\nstatic_assert(A\u003cshort\u003e::B\u003cint\u003e::y \u003d\u003d 0); // uses #1\r\nstatic_assert(A\u003cshort\u003e::B\u003cint*\u003e::y \u003d\u003d 1); // uses #2\r\n\r\nstatic_assert(A\u003clong\u003e::B\u003cint\u003e::y \u003d\u003d 2); // uses #3\r\nstatic_assert(A\u003clong\u003e::B\u003cint*\u003e::y \u003d\u003d 2); // uses #3\r\n```\r\n\r\nAccording to [temp.spec.partial.member] p2:\r\n\u003e If the primary member template is explicitly specialized for a given\r\n(implicit) specialization of the enclosing class template, the partial\r\nspecializations of the member template are ignored for this\r\nspecialization of the enclosing class template.\r\nIf a partial specialization of the member template is explicitly\r\nspecialized for a given (implicit) specialization of the enclosing class\r\ntemplate, the primary member template and its other partial\r\nspecializations are still considered for this specialization of the\r\nenclosing class template.\r\n\r\nThe example above fails to compile because we currently don\u0027t implement\r\n[temp.spec.partial.member] p2. This patch implements the wording, fixing #51051.",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "6085352dfafe6b311845f9144b8e6a6682486be0",
      "old_mode": 33188,
      "old_path": "clang/docs/ReleaseNotes.rst",
      "new_id": "1a179e63f902f36c151d6f5e4f88a92a7a23e0d0",
      "new_mode": 33188,
      "new_path": "clang/docs/ReleaseNotes.rst"
    },
    {
      "type": "modify",
      "old_id": "fcf05798d9c709c1f9062053dab4a1a17236d0bb",
      "old_mode": 33188,
      "old_path": "clang/lib/Sema/SemaTemplate.cpp",
      "new_id": "4503e60cff8c2f0a9672fba7fabb3f0293cdd3f1",
      "new_mode": 33188,
      "new_path": "clang/lib/Sema/SemaTemplate.cpp"
    },
    {
      "type": "modify",
      "old_id": "dea97bfce532c9d58bb1ce3ecd0933a03dc15098",
      "old_mode": 33188,
      "old_path": "clang/lib/Sema/SemaTemplateInstantiate.cpp",
      "new_id": "b63063813f1b566e40a22b4324038968521b1513",
      "new_mode": 33188,
      "new_path": "clang/lib/Sema/SemaTemplateInstantiate.cpp"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "7969b7efe597f98a41fa2c821eff16500a5b619a",
      "new_mode": 33188,
      "new_path": "clang/test/CXX/temp/temp.decls/temp.spec.partial/temp.spec.partial.member/p2.cpp"
    }
  ]
}
