Armor v0.7.1#46
Closed
Likith Viswanath Basina (likivisw) wants to merge 2 commits into
Closed
Conversation
- Bump TOOL_VERSION from 0.6.8 to 0.6.9 - Fix tree_builder to set access specifier on enum, typedef, and friend CXX record nodes via getAccessSpecifier() Signed-off-by: likith viswanath <likivisw@qti.qualcomm.com>
0.6.9 -> 0.7.1 Signed-off-by: likith viswanath <likivisw@qti.qualcomm.com>
Likith Viswanath Basina (likivisw)
force-pushed
the
main
branch
from
July 16, 2026 06:49
e7b76f7 to
3b51666
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Overview
This release fixes a gap in the beta analysis engine where nested declarations
(enums, typedefs, and friend class records) inside a class or struct were not
having their C++ access specifier (
public,protected,private) recorded.As a result, changes to a nested declaration's access level were previously
invisible to the diff engine. Version is bumped from 0.6.8 → 0.6.9.
What Changed
1. Access Specifier Now Captured for Nested Declarations
Previously, when the beta tree-builder visited a nested
enum,typedef, orfriendclass declaration, it did not callgetAccessSpecifier()on that node.This meant the
AccessSpecifierfield was absent from the AST node, so anychange to the access level of a nested type went undetected.
The fix ensures that every nested declaration type now records its access level
at parse time, making access-specifier changes a first-class detectable
difference.
Affected declaration kinds:
enum/enum classBuildEnumNodetypedefBuildTypedefDeclBuildFriendCxxRecordDeclBuildCXXRecordNodePractical Example
Consider a header
mylib.hthat evolves between two versions:v1/mylib.h — original layout:
v2/mylib.h — access specifiers shuffled:
Before this fix — armor reported no differences for these nodes because the
AccessSpecifierfield was never populated.After this fix — armor correctly reports each access-level change. The JSON
diff output now looks like:
{ "astDiff": [ { "nodeType": "Class", "qualifiedName": "mylib::Device", "tag": "modified", "children": [ { "nodeType": "Enum", "qualifiedName": "mylib::Device::PowerLevel", "tag": "modified", "children": [ { "AccessSpecifier": "Public", "nodeType": "Enum", "qualifiedName": "mylib::Device::PowerLevel", "tag": "removed" }, { "AccessSpecifier": "Protected", "nodeType": "Enum", "qualifiedName": "mylib::Device::PowerLevel", "tag": "added" } ] }, { "nodeType": "Enum", "qualifiedName": "mylib::Device::State", "tag": "modified", "children": [ { "AccessSpecifier": "Protected", "nodeType": "Enum", "qualifiedName": "mylib::Device::State", "tag": "removed" }, { "AccessSpecifier": "Private", "nodeType": "Enum", "qualifiedName": "mylib::Device::State", "tag": "added" } ] } ] } ] }Each modified node now carries a
"removed"child (old access level) and an"added"child (new access level), giving a precise picture of what changed.