Skip to content

Commit

Permalink
Upgrade clang to 18.1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
xoofx committed Oct 16, 2024
1 parent a78f00f commit 8c5212e
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 7 deletions.
2 changes: 1 addition & 1 deletion readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ CppAst provides a C/C++ parser for header files with access to the full AST, com

- Compatible with `net8.0`
- For `netstandard2.0` use `0.14.0` version.
- Using `Clang/libclang 17.0.1`
- Using `Clang/libclang 18.1.0`
- Allow to parse *in-memory* C/C++ text and C/C++ files from the disk
- Simple AST model
- Full type system
Expand Down
6 changes: 3 additions & 3 deletions src/CppAst.Tests/CppAst.Tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,12 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="nunit" Version="4.0.1" />
<PackageReference Include="NUnit3TestAdapter" Version="4.5.0">
<PackageReference Include="nunit" Version="4.2.2" />
<PackageReference Include="NUnit3TestAdapter" Version="4.6.0">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.8.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.11.1" />
</ItemGroup>

<ItemGroup>
Expand Down
6 changes: 3 additions & 3 deletions src/CppAst/CppAst.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,12 @@
<None Include="../../img/cppast.png" Pack="true" PackagePath="/logo.png" />
<None Include="../../readme.md" Pack="true" PackagePath="/" />

<PackageReference Include="ClangSharp" Version="17.0.1" />
<PackageReference Include="ClangSharp" Version="18.1.0.2" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="Irony" Version="1.2.0" />
<PackageReference Include="MinVer" Version="4.3.0">
<PackageReference Include="Irony" Version="1.5.3" />
<PackageReference Include="MinVer" Version="6.0.0">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
Expand Down
10 changes: 10 additions & 0 deletions src/CppAst/CppModelBuilder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,11 @@ private CppType TryToCreateTemplateParameters(CXCursor cursor, void* data)

private CppContainerContext GetOrCreateDeclarationContainer(CXCursor cursor, void* data)
{
while (cursor.Kind == CXCursorKind.CXCursor_LinkageSpec)
{
cursor = cursor.SemanticParent;
}

var typeAsCString = CXUtil.GetCursorUsrString(cursor);
if (string.IsNullOrEmpty(typeAsCString))
{
Expand Down Expand Up @@ -427,6 +432,11 @@ private CXChildVisitResult VisitMember(CXCursor cursor, CXCursor parent, void* d
case CXCursorKind.CXCursor_AnnotateAttr:
// Don't emit warning
break;

case CXCursorKind.CXCursor_LinkageSpec:
cursor.VisitChildren(VisitMember, new CXClientData((IntPtr)data));
break;

default:
WarningUnhandled(cursor, parent);
break;
Expand Down

0 comments on commit 8c5212e

Please sign in to comment.