[llvm] Improve diagnostic for malformed constant vectors (PR #216253)

via llvm-commits llvm-commits at lists.llvm.org
Sun Aug 23 04:02:37 PDT 2026


================

----------------
im-lunex wrote:

I looked into this: there is no `case lltok::Type:` inside `parseValID` — the only `case lltok::Type:` (~line 3182) belongs to `LLParser::parseType`, a different function that handles type keywords themselves. A Type token never reaches `parseValID`'s switch directly because vector elements are parsed via `parseGlobalValueVector` -> `parseGlobalTypeAndValue` -> `parseType` first. So I kept the conditional logic within `parseValID`'s existing `case lltok::less:` branch instead, tuned to reject only bare literal tokens right after `<`. Happy to adjust if you had a different placement in mind!

https://github.com/llvm/llvm-project/pull/216253


More information about the llvm-commits mailing list