[llvm] Add missing return on nullptr check (PR #92125)

Daniel Kuts via llvm-commits llvm-commits at lists.llvm.org
Wed May 15 08:21:19 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!");
----------------
apach301 wrote:

Unfortunately I don't have input or compiled target to reproduce error - the bug was found by static analysis

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


More information about the llvm-commits mailing list