Skip to content

add a test case that uses compilation database #34

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 4, 2025

Conversation

andrurogerz
Copy link
Collaborator

@andrurogerz andrurogerz commented Feb 3, 2025

Purpose

Add a lit-based test case for idt that verifies it properly uses a clang compilation database when provided via the -p command line argument.

Overview

  • Add a new test source file GlobalIncludes.cc that depends on header file GlobalHeader.h which is located in a new iuncludes sub-directory and defines a public function globalFunction
  • Generate a compile_commands.json file as part of testing GlobalIncludes.cc which adds the new includes subdir to the include path during compilation
  • Verify idt generates a warning that globalFunction, defined in the included header`, is not annotated as an exported fucntion
  • Update lit config to include .cc files when testing

Validation

@andrurogerz andrurogerz force-pushed the test-compile_commands.json branch from ee14132 to 3ca4c44 Compare February 4, 2025 01:18
@andrurogerz andrurogerz marked this pull request as ready for review February 4, 2025 01:24
@compnerd compnerd merged commit 9d1ca1b into compnerd:main Feb 4, 2025
2 checks passed
@andrurogerz andrurogerz deleted the test-compile_commands.json branch February 4, 2025 15:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants