Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions MODULE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,7 @@ crate.spec(
version = "1.0",
)
crate.spec(
features = ["preserve_order"],
package = "serde_json",
version = "1.0",
)
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# *******************************************************************************
# Copyright (c) 2026 Contributors to the Eclipse Foundation
#
# See the NOTICE file(s) distributed with this work for additional
# information regarding copyright ownership.
#
# This program and the accompanying materials are made available under the
# terms of the Apache License Version 2.0 which is available at
# https://www.apache.org/licenses/LICENSE-2.0
#
# SPDX-License-Identifier: Apache-2.0
# *******************************************************************************
load("//cpp/libclang/integration_test:test_rules.bzl", "cpp_parser_integration_test")

cc_library(
name = "free_function_identity",
srcs = glob(["*.cpp"]),
visibility = ["//cpp/libclang:__subpackages__"],
)

cpp_parser_integration_test(
name = "test_free_function_identity",
expected_output = ["expected.json"],
target = ":free_function_identity",
)
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
{
"functions": [
{
"id": {
"name": "global_value",
"scope": "Global"
},
"kind": "Free",
"return_type": {
"Builtin": "int"
},
"body": []
},
{
"id": {
"name": "run",
"scope": {
"Namespace": [
"app"
]
}
},
"kind": "Free",
"return_type": {
"Builtin": "void"
},
"body": []
},
{
"id": {
"name": "enabled",
"scope": {
"Namespace": [
"app",
"internal"
]
}
},
"kind": "Free",
"return_type": {
"Builtin": "bool"
},
"body": []
}
],
"types": {}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
/********************************************************************************
* Copyright (c) 2026 Contributors to the Eclipse Foundation
*
* See the NOTICE file(s) distributed with this work for additional
* information regarding copyright ownership.
*
* This program and the accompanying materials are made available under the
* terms of the Apache License Version 2.0 which is available at
* https://www.apache.org/licenses/LICENSE-2.0
*
* SPDX-License-Identifier: Apache-2.0
********************************************************************************/

void declared_only();

int global_value() {
return 1;
}

namespace app
{

void run() {}

namespace internal
{

bool enabled() {
return true;
}

} // namespace internal
} // namespace app
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
// *******************************************************************************
// Copyright (c) 2026 Contributors to the Eclipse Foundation
//
// See the NOTICE file(s) distributed with this work for additional
// information regarding copyright ownership.
//
// This program and the accompanying materials are made available under the
// terms of the Apache License Version 2.0 which is available at
// <https://www.apache.org/licenses/LICENSE-2.0>
//
// SPDX-License-Identifier: Apache-2.0
// *******************************************************************************

use test_framework::run_parser_case;
#[test]
fn test_free_function_identity() {
run_parser_case();
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# *******************************************************************************
# Copyright (c) 2026 Contributors to the Eclipse Foundation
#
# See the NOTICE file(s) distributed with this work for additional
# information regarding copyright ownership.
#
# This program and the accompanying materials are made available under the
# terms of the Apache License Version 2.0 which is available at
# https://www.apache.org/licenses/LICENSE-2.0
#
# SPDX-License-Identifier: Apache-2.0
# *******************************************************************************
load("//cpp/libclang/integration_test:test_rules.bzl", "cpp_parser_integration_test")

cc_library(
name = "guard_associativity",
srcs = ["flow.cpp"],
visibility = ["//cpp/libclang:__subpackages__"],
)

cpp_parser_integration_test(
name = "test_guard_associativity",
expected_output = ["expected.json"],
target = ":guard_associativity",
)
Loading
Loading