[all-commits] [llvm/llvm-project] 8d0931: [clang] Sema::ActOnModuleImport - remove superfluo...

Simon Pilgrim via All-commits all-commits at lists.llvm.org
Wed Mar 9 03:41:03 PST 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 8d0931114f2df30c23b4eb1380185063f4684851
      https://github.com/llvm/llvm-project/commit/8d0931114f2df30c23b4eb1380185063f4684851
  Author: Simon Pilgrim <llvm-dev at redking.me.uk>
  Date:   2022-03-09 (Wed, 09 Mar 2022)

  Changed paths:
    M clang/lib/Sema/SemaModule.cpp

  Log Message:
  -----------
  [clang] Sema::ActOnModuleImport - remove superfluous nullptr test

Mod has already been dereferenced


  Commit: be2be04f9f983966be828885437a25aa1ac6f6d3
      https://github.com/llvm/llvm-project/commit/be2be04f9f983966be828885437a25aa1ac6f6d3
  Author: Simon Pilgrim <llvm-dev at redking.me.uk>
  Date:   2022-03-09 (Wed, 09 Mar 2022)

  Changed paths:
    M llvm/test/CodeGen/X86/vector-bitreverse.ll

  Log Message:
  -----------
  [X86] Add common check prefixes to vector-bitreverse.ll


  Commit: a157d839c52077001f234ce5c8b0cbc05fbb429c
      https://github.com/llvm/llvm-project/commit/a157d839c52077001f234ce5c8b0cbc05fbb429c
  Author: Simon Pilgrim <llvm-dev at redking.me.uk>
  Date:   2022-03-09 (Wed, 09 Mar 2022)

  Changed paths:
    M clang/lib/Analysis/FlowSensitive/DataflowEnvironment.cpp

  Log Message:
  -----------
  [clang] Environment::createValueUnlessSelfReferential - use castAs<> instead of getAs<> to avoid dereference of nullptr

The pointer is always dereferenced, so assert the cast is correct instead of returning nullptr


  Commit: d258196f5fddf510e785be68da803d5feae56855
      https://github.com/llvm/llvm-project/commit/d258196f5fddf510e785be68da803d5feae56855
  Author: Simon Pilgrim <llvm-dev at redking.me.uk>
  Date:   2022-03-09 (Wed, 09 Mar 2022)

  Changed paths:
    M clang/lib/CodeGen/CGExprScalar.cpp

  Log Message:
  -----------
  [clang] ScalarExprEmitter::VisitCastExpr - use castAs<> instead of getAs<> to avoid dereference of nullptr

The pointers are always dereferenced, so assert the cast is correct instead of returning nullptr


Compare: https://github.com/llvm/llvm-project/compare/dedf006fa904...d258196f5fdd


More information about the All-commits mailing list