Skip to content

Release v0.6.5#39

Closed
likivisw wants to merge 1 commit intoqualcomm:mainfrom
likivisw:main
Closed

Release v0.6.5#39
likivisw wants to merge 1 commit intoqualcomm:mainfrom
likivisw:main

Conversation

@likivisw
Copy link
Copy Markdown
Contributor

Release v0.6.5 — ARMOR

🚀 New Features

Missing Header Handling — Report Generation on Absent Files

Previously, when a header file was missing from either the older (projectroot1) or newer
(projectroot2) version of a project, ARMOR would only log an error and halt processing for
that header. No report artefact was produced, leaving callers with nothing to inspect.

Report generation is now performed in both processing paths — the explicit headers list
and the --header-dir directory scan — for the two single-file-missing cases described below.

  • Case 1 — file1 missing (header absent in the older version): A report is now generated
    using the filename derived from file2, with compatibility verdict BACKWARD_COMPATIBLE,
    parsed diff status SUPPORTED_UPDATES, unparsed diff status UN_CHANGED, and note
    "Missing header in older version"
  • Case 2 — file2 missing (header absent in the newer version): A report is now generated
    using the filename derived from file1, with compatibility verdict BACKWARD_COMPATIBLE,
    parsed diff status SUPPORTED_UPDATES, unparsed diff status UN_CHANGED, and note
    "Missing header in newer version"
  • Case 3 — Both file1 and file2 missing: No change in behaviour. An error is logged
    and no report is generated, as there is no file from which to derive a meaningful header
    name or report content

C Language Mode — --lang / -l Option

Adds a --lang / -l CLI option to the ARMOR AST diff tool, enabling correct parsing of
C headers that use C++ reserved keywords (e.g. class, template, namespace) as
identifiers. Without this flag such headers would previously fail to parse entirely.

-l, --lang TEXT:{c,cpp}
    Language mode: cpp (default) or c.
    Use 'c' for C headers, 'cpp' for C++ headers.

Default: cpp — existing invocations are unaffected.

Example:

./build/src/armor/armor /path/to/old /path/to/new \
  --header-dir include \
  --lang c \
  foo.h

🐛 Bug Fixes

Parser Accuracy Improvements

  • C keyword conflicts: Resolved parsing failures on C headers that use C++ reserved
    keywords (class, template, namespace, etc.) as valid C identifiers — these headers
    now parse correctly when --lang c is supplied

📊 Technical Improvements

  • Build: Separate C / C++ Clang flag sets defined at compile time, selected based on the
    resolved language mode
  • Shared types: LANG_OPTIONS enum (C = 0, CPP = 1) and string constants LANG_C /
    LANG_CPP added to comm_def.hpp for consistent language-mode handling across the codebase
  • CLI: --lang / -l option wired through options_handler.cpp; resolved value forwarded
    to both the alpha and beta header processors
  • Parsers: Alpha and beta parsers select the appropriate Clang flags based on the resolved
    LANG_OPTIONS value
  • Tests: New tests covering C-mode parsing validation and no-diff exit-code behaviour

Missing headers now produce reports instead of halting:
- file1 missing: report from file2, BACKWARD_COMPATIBLE
- file2 missing: report from file1, BACKWARD_COMPATIBLE
- Both missing: unchanged, no report

Adds --lang/-l for C/C++ mode; fixes parse failures on C
headers using C++ reserved keywords. Default remains cpp.

Signed-off-by: likith viswanath <likivisw@qti.qualcomm.com>
@likivisw likivisw closed this Apr 21, 2026
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.

1 participant