[all-commits] [llvm/llvm-project] f1e455: [NFC][Sema][OpenMP] Fix free-nonheap-object warnin...

Jinsong Ji via All-commits all-commits at lists.llvm.org
Mon Oct 21 09:22:12 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: f1e455ed51be4f53462db87aa5d64dbd830e5de2
      https://github.com/llvm/llvm-project/commit/f1e455ed51be4f53462db87aa5d64dbd830e5de2
  Author: Jinsong Ji <jinsong.ji at intel.com>
  Date:   2024-10-21 (Mon, 21 Oct 2024)

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

  Log Message:
  -----------
  [NFC][Sema][OpenMP] Fix free-nonheap-object warning (#112942)

This is one of the many PRs to fix errors with LLVM_ENABLE_WERROR=on.
Built by GCC 11.

Fix warning

In destructor ‘llvm::APInt::~APInt()’,
inlined from ‘llvm::APInt::~APInt()’ at
llvm-project/llvm/include/llvm/ADT/APInt.h:190:3,
inlined from ‘llvm::APSInt::~APSInt()’ at
llvm-project/llvm/include/llvm/ADT/APSInt.h:23:21,
inlined from ‘bool
checkOMPArraySectionConstantForReduction(clang::ASTContext&, const
clang::ArraySectionExpr*, bool&, llvm::SmallVectorImpl<llvm::APSInt>&)’
at llvm-project/clang/lib/Sema/SemaOpenMP.cpp:18357:45,
inlined from ‘bool actOnOMPReductionKindClause(clang::Sema&,
{anonymous}::DSAStackTy*, clang::OpenMPClauseKind,
llvm::ArrayRef<clang::Expr*>, clang::SourceLocation,
clang::SourceLocation, clang::SourceLocation, clang::SourceLocation,
clang::CXXScopeSpec&, const clang::DeclarationNameInfo&,
llvm::ArrayRef<clang::Expr*>, {anonymous}::ReductionData&)’ at
llvm-project/clang/lib/Sema/SemaOpenMP.cpp:18715:68:
llvm-project/llvm/include/llvm/ADT/APInt.h:192:18: error: ‘void operator
delete [](void*)’ called on a pointer to an unallocated object ‘1’
[-Werror=free-nonheap-object]
  192 |       delete[] U.pVal;
      |                  ^~~~



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list