Skip to content

Commit 43f9ee4

Browse files
NagyDonatyuxuanchen1997
authored andcommitted
[analyzer][NFC] Minor cleanup in two test files. (#100570)
Summary: 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. Test Plan: Reviewers: Subscribers: Tasks: Tags: Differential Revision: https://phabricator.intern.facebook.com/D60250625
1 parent f412fdd commit 43f9ee4

File tree

2 files changed

+1
-13
lines changed

2 files changed

+1
-13
lines changed

clang/test/Analysis/ctor-array.cpp

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: %clang_analyze_cc1 -analyzer-checker=core,debug.ExprInspection -analyzer-disable-checker=cplusplus -analyzer-config c++-inlining=constructors -verify %s
1+
// RUN: %clang_analyze_cc1 -analyzer-checker=core,debug.ExprInspection -analyzer-config c++-inlining=constructors -verify %s
22

33
#include "Inputs/system-header-simulator-cxx.h"
44

@@ -119,16 +119,6 @@ struct s5 {
119119
};
120120

121121
void g1(void) {
122-
// FIXME: This test requires -analyzer-disable-checker=cplusplus,
123-
// because of the checker's weird behaviour in case of arrays.
124-
// E.g.:
125-
// s3 *arr = new s3[4];
126-
// s3 *arr2 = new (arr + 1) s3[1];
127-
// ^~~~~~~~~~~~~~~~~~~
128-
// warning: 12 bytes is possibly not enough
129-
// for array allocation which requires
130-
// 4 bytes.
131-
132122
s5::c = 0;
133123
s5 *arr = new s5[4];
134124
new (arr + 1) s5[3];

clang/test/Analysis/ctor.mm

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,6 @@ void testNonPODCopyConstructor() {
5656
namespace ConstructorVirtualCalls {
5757
class A {
5858
public:
59-
int *out1, *out2, *out3;
60-
6159
virtual int get() { return 1; }
6260

6361
A(int *out1) {

0 commit comments

Comments
 (0)