[all-commits] [llvm/llvm-project] 003e03: [clang-tidy] getOutermostNamespace - remove redund...

Simon Pilgrim via All-commits all-commits at lists.llvm.org
Sat Feb 12 02:56:44 PST 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 003e0382647fa311e1bd48bc5298a3182d6f2552
      https://github.com/llvm/llvm-project/commit/003e0382647fa311e1bd48bc5298a3182d6f2552
  Author: Simon Pilgrim <llvm-dev at redking.me.uk>
  Date:   2022-02-12 (Sat, 12 Feb 2022)

  Changed paths:
    M clang-tools-extra/clang-tidy/llvmlibc/CalleeNamespaceCheck.cpp

  Log Message:
  -----------
  [clang-tidy] getOutermostNamespace - remove redundant nullptr check

The pointer is always dereferenced


  Commit: 99acc0dc6434373dc391ac4c89f6ae6b72ec7208
      https://github.com/llvm/llvm-project/commit/99acc0dc6434373dc391ac4c89f6ae6b72ec7208
  Author: Simon Pilgrim <llvm-dev at redking.me.uk>
  Date:   2022-02-12 (Sat, 12 Feb 2022)

  Changed paths:
    M clang-tools-extra/clang-tidy/modernize/UseNoexceptCheck.cpp

  Log Message:
  -----------
  [clang-tidy] UseNoexceptCheck::check - use cast<> instead of dyn_cast<> to avoid dereference of nullptr

The pointer is referenced immediately, so assert the cast is correct instead of returning nullptr


Compare: https://github.com/llvm/llvm-project/compare/5bc13f9d9471...99acc0dc6434


More information about the All-commits mailing list