[llvm] Add missing return on nullptr check (PR #92125)
Jon Roelofs via llvm-commits
llvm-commits at lists.llvm.org
Wed May 15 07:09:17 PDT 2024
================
@@ -3392,8 +3392,10 @@ static bool HandleUse(TreePattern &I, TreePatternNodePtr Pat,
Record *Rec;
if (Pat->isLeaf()) {
DefInit *DI = dyn_cast<DefInit>(Pat->getLeafValue());
- if (!DI)
+ if (!DI) {
I.error("Input $" + Pat->getName() + " must be an identifier!");
----------------
jroelofs wrote:
Mind adding a test that covers this error message? ubsan'd builds of llvm would have caught this if we had one.
https://github.com/llvm/llvm-project/pull/92125
More information about the llvm-commits
mailing list