https://github.com/NagyDonat created https://github.com/llvm/llvm-project/pull/100570
This commit contains two unrelated trivial changes: (1) Three unused variables are removed from `ctor.mm`. (2) A FIXME block is removed from `ctor-array.cpp` because it described an issue that was resolved since then. From 15fae768b0ad2412858520a137a51e7190a591cd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Don=C3=A1t=20Nagy?= <donat.n...@ericsson.com> Date: Thu, 25 Jul 2024 15:43:05 +0200 Subject: [PATCH] [analyzer][NFC] Minor cleanup in two test files. This commit contains two unrelated trivial changes: (1) Three unused variables are removed from `ctor.mm`. (2) A FIXME block is removed from `ctor-array.cpp` because it described an issue that was resolved since then. --- clang/test/Analysis/ctor-array.cpp | 12 +----------- clang/test/Analysis/ctor.mm | 2 -- 2 files changed, 1 insertion(+), 13 deletions(-) diff --git a/clang/test/Analysis/ctor-array.cpp b/clang/test/Analysis/ctor-array.cpp index 053669cc2aada..49412ee5a68c7 100644 --- a/clang/test/Analysis/ctor-array.cpp +++ b/clang/test/Analysis/ctor-array.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_analyze_cc1 -analyzer-checker=core,debug.ExprInspection -analyzer-disable-checker=cplusplus -analyzer-config c++-inlining=constructors -verify %s +// RUN: %clang_analyze_cc1 -analyzer-checker=core,debug.ExprInspection -analyzer-config c++-inlining=constructors -verify %s #include "Inputs/system-header-simulator-cxx.h" @@ -119,16 +119,6 @@ struct s5 { }; void g1(void) { - // FIXME: This test requires -analyzer-disable-checker=cplusplus, - // because of the checker's weird behaviour in case of arrays. - // E.g.: - // s3 *arr = new s3[4]; - // s3 *arr2 = new (arr + 1) s3[1]; - // ^~~~~~~~~~~~~~~~~~~ - // warning: 12 bytes is possibly not enough - // for array allocation which requires - // 4 bytes. - s5::c = 0; s5 *arr = new s5[4]; new (arr + 1) s5[3]; diff --git a/clang/test/Analysis/ctor.mm b/clang/test/Analysis/ctor.mm index fb385833df9c7..6ac9050fc29f7 100644 --- a/clang/test/Analysis/ctor.mm +++ b/clang/test/Analysis/ctor.mm @@ -56,8 +56,6 @@ void testNonPODCopyConstructor() { namespace ConstructorVirtualCalls { class A { public: - int *out1, *out2, *out3; - virtual int get() { return 1; } A(int *out1) { _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits