llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT--> @llvm/pr-subscribers-clang Author: Amy Huang (amykhuang) <details> <summary>Changes</summary> [0faee97](https://github.com/llvm/llvm-project/commit/0faee97a924adec76d5c7cd680c289ced51e6b5a) made the attribute plugin code hit an unreachable. Bug: [70702](https://github.com/llvm/llvm-project/issues/70702) --- Full diff: https://github.com/llvm/llvm-project/pull/70877.diff 1 Files Affected: - (modified) clang/lib/Sema/ParsedAttr.cpp (+6-2) ``````````diff diff --git a/clang/lib/Sema/ParsedAttr.cpp b/clang/lib/Sema/ParsedAttr.cpp index f59b01efe7ed8f4..2d6d17e74f6e38d 100644 --- a/clang/lib/Sema/ParsedAttr.cpp +++ b/clang/lib/Sema/ParsedAttr.cpp @@ -193,9 +193,13 @@ bool ParsedAttr::isTypeAttr() const { return getInfo().IsType; } bool ParsedAttr::isStmtAttr() const { return getInfo().IsStmt; } bool ParsedAttr::existsInTarget(const TargetInfo &Target) const { + Kind K = getParsedKind(); + bool HasSpelling = K != IgnoredAttribute && K != UnknownAttribute && + K != NoSemaHandlerAttribute; return getInfo().existsInTarget(Target) && - getInfo().spellingExistsInTarget(Target, - getAttributeSpellingListIndex()); + (HasSpelling && + getInfo().spellingExistsInTarget(Target, + getAttributeSpellingListIndex())); } bool ParsedAttr::isKnownToGCC() const { return getInfo().IsKnownToGCC; } `````````` </details> https://github.com/llvm/llvm-project/pull/70877 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits