Author: DonĂ¡t Nagy Date: 2024-07-25T15:56:17+02:00 New Revision: 9ad92c476907451bdc95a6c2b6a6bbba03815b4b
URL: https://github.com/llvm/llvm-project/commit/9ad92c476907451bdc95a6c2b6a6bbba03815b4b DIFF: https://github.com/llvm/llvm-project/commit/9ad92c476907451bdc95a6c2b6a6bbba03815b4b.diff LOG: [analyzer][NFC] Minor cleanup in two test files. (#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. Added: Modified: clang/test/Analysis/ctor-array.cpp clang/test/Analysis/ctor.mm Removed: ################################################################################ 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