Skip to content

Commit b95cb30

Browse files
j-piaseckifacebook-github-bot
authored andcommitted
Fix array brackets appearing in the wrong place in the snapshot (facebook#56214)
Summary: Changelog: [Internal] Snapshot generator was putting `[]` in wrong place when generating array type - it was adding it to the type name instead of the variable name. This diff addresses that. Differential Revision: D98102328
1 parent 5d37b5e commit b95cb30

3 files changed

Lines changed: 21 additions & 0 deletions

File tree

scripts/cxx-api/parser/builders.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -333,6 +333,8 @@ def get_doxygen_params(
333333
+ param_array
334334
)
335335
param_name = None
336+
elif param_name:
337+
param_name += param_array
336338
else:
337339
param_type += param_array
338340

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
void test::arrayParam(const char name[]);
2+
void test::arrayParamSized(int values[10]);
3+
void test::arrayParamUnnamed(const char[]);
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
/*
2+
* Copyright (c) Meta Platforms, Inc. and affiliates.
3+
*
4+
* This source code is licensed under the MIT license found in the
5+
* LICENSE file in the root directory of this source tree.
6+
*/
7+
8+
#pragma once
9+
10+
namespace test {
11+
12+
void arrayParam(const char name[]);
13+
void arrayParamSized(int values[10]);
14+
void arrayParamUnnamed(const char[]);
15+
16+
} // namespace test

0 commit comments

Comments
 (0)