[all-commits] [llvm/llvm-project] 0ba5f6: Fix to attribute plugins reaching an unreachable (...

Amy Huang via All-commits all-commits at lists.llvm.org
Mon Nov 20 11:14:55 PST 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 0ba5f6e6bd971d74c530e50587c69489e625ce8e
      https://github.com/llvm/llvm-project/commit/0ba5f6e6bd971d74c530e50587c69489e625ce8e
  Author: Amy Huang <akhuang at google.com>
  Date:   2023-11-20 (Mon, 20 Nov 2023)

  Changed paths:
    M clang/lib/Sema/ParsedAttr.cpp

  Log Message:
  -----------
  Fix to attribute plugins reaching an unreachable (#70877)

[0faee97](https://github.com/llvm/llvm-project/commit/0faee97a924adec76d5c7cd680c289ced51e6b5a)
broke attribute plugins. Specifically, it added a call to
`getAttributeSpellingListIndex()` in situations that reached an
unreachable statement. This patch adds a check before calling that to
avoid hitting the unreachable.

`clang/test/Frontend/plugin-attribute.cpp` has been broken since
[0faee97](https://github.com/llvm/llvm-project/commit/0faee97a924adec76d5c7cd680c289ced51e6b5a),
and this patch fixes it.

Bug: [70702](https://github.com/llvm/llvm-project/issues/70702)




More information about the All-commits mailing list