[all-commits] [llvm/llvm-project] 7ff4f4: Relax assert in ExprConstant to a return None.

Jon Chesterfield via All-commits all-commits at lists.llvm.org
Thu Oct 21 05:10:20 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 7ff4f48adb26429086d6fd85a14336e57cd340dc
      https://github.com/llvm/llvm-project/commit/7ff4f48adb26429086d6fd85a14336e57cd340dc
  Author: Jon Chesterfield <jonathanchesterfield at gmail.com>
  Date:   2021-10-21 (Thu, 21 Oct 2021)

  Changed paths:
    M clang/lib/AST/ExprConstant.cpp
    M clang/lib/Sema/SemaAttr.cpp
    M clang/lib/Sema/SemaDeclAttr.cpp
    M clang/lib/Sema/SemaExprCXX.cpp
    M clang/lib/Sema/SemaTemplateDeduction.cpp
    M clang/lib/Sema/SemaType.cpp
    M clang/test/SemaTemplate/atomics.cpp

  Log Message:
  -----------
  Relax assert in ExprConstant to a return None.

Fixes a compiler assert on passing a compile time integer to atomic builtins.

Assert introduced in D61522
Function changed from ->bool to ->Optional in D76646
Simplifies call sites to getIntegerConstantExpr to elide the now-redundant
isValueDependent checks.

Reviewed By: aaron.ballman

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




More information about the All-commits mailing list