Unverified Commit 0ba5f6e6 authored by Amy Huang's avatar Amy Huang Committed by GitHub
Browse files

Fix to attribute plugins reaching an unreachable (#70877)

[0faee97a](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
[0faee97a](https://github.com/llvm/llvm-project/commit/0faee97a924adec76d5c7cd680c289ced51e6b5a),
and this patch fixes it.

Bug: [70702](https://github.com/llvm/llvm-project/issues/70702)
parent 24044772
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment