[all-commits] [llvm/llvm-project] 17cd34: Fix two bugs in TGParser::ParseValue

Nicolai Hähnle via All-commits all-commits at lists.llvm.org
Fri Aug 21 14:20:21 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 17cd34409a3ab1c46ff55960b7b89c11e1d5674d
      https://github.com/llvm/llvm-project/commit/17cd34409a3ab1c46ff55960b7b89c11e1d5674d
  Author: Nicolai Hähnle <nicolai.haehnle at amd.com>
  Date:   2020-08-21 (Fri, 21 Aug 2020)

  Changed paths:
    M llvm/lib/TableGen/TGParser.cpp
    A llvm/test/TableGen/paste-reserved.td

  Log Message:
  -----------
  Fix two bugs in TGParser::ParseValue

TGParser::ParseValue contains two recursive calls, one to parse the RHS of a list paste operator and one to parse the RHS of a paste operator in a class/def name. Both of these calls neglect to check the return value to see if it is null (because of some error). This causes a crash in the next line of code, which uses the return value. The code now checks for null returns.

Differential Revision: https://reviews.llvm.org/D85852




More information about the All-commits mailing list