[all-commits] [llvm/llvm-project] a63c9b: Do not pass null attributes to BuildAttributedStmt...

Aaron Ballman via All-commits all-commits at lists.llvm.org
Wed Apr 21 06:31:27 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: a63c9b25620c8a4da9fcf1e1e8535d3110819ec0
      https://github.com/llvm/llvm-project/commit/a63c9b25620c8a4da9fcf1e1e8535d3110819ec0
  Author: Aaron Ballman <aaron at aaronballman.com>
  Date:   2021-04-21 (Wed, 21 Apr 2021)

  Changed paths:
    M clang/lib/Sema/TreeTransform.h

  Log Message:
  -----------
  Do not pass null attributes to BuildAttributedStmt during instantiation

When transforming an attribute during template instantiation, if the
transformation fails, it may result in a null attribute being returned.
This null attribute should not be passed in as one of the attributes
used to create an attributed statement.

If all of the attributes fail to transform, we do not create an
attributed statement at all.

There are no attributes that return null currently, so there is no easy
way to test this currently. However, this fixes a crash caused by
8344675908424ee532d4ae30e5043c5a5834e02c.




More information about the All-commits mailing list