Skip to content

Commit 8c5212e

Browse files
committed
Upgrade clang to 18.1.0
1 parent a78f00f commit 8c5212e

File tree

4 files changed

+17
-7
lines changed

4 files changed

+17
-7
lines changed

readme.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ CppAst provides a C/C++ parser for header files with access to the full AST, com
1212

1313
- Compatible with `net8.0`
1414
- For `netstandard2.0` use `0.14.0` version.
15-
- Using `Clang/libclang 17.0.1`
15+
- Using `Clang/libclang 18.1.0`
1616
- Allow to parse *in-memory* C/C++ text and C/C++ files from the disk
1717
- Simple AST model
1818
- Full type system

src/CppAst.Tests/CppAst.Tests.csproj

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,12 @@
2626
</ItemGroup>
2727

2828
<ItemGroup>
29-
<PackageReference Include="nunit" Version="4.0.1" />
30-
<PackageReference Include="NUnit3TestAdapter" Version="4.5.0">
29+
<PackageReference Include="nunit" Version="4.2.2" />
30+
<PackageReference Include="NUnit3TestAdapter" Version="4.6.0">
3131
<PrivateAssets>all</PrivateAssets>
3232
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
3333
</PackageReference>
34-
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.8.0" />
34+
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.11.1" />
3535
</ItemGroup>
3636

3737
<ItemGroup>

src/CppAst/CppAst.csproj

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,12 +27,12 @@
2727
<None Include="../../img/cppast.png" Pack="true" PackagePath="/logo.png" />
2828
<None Include="../../readme.md" Pack="true" PackagePath="/" />
2929

30-
<PackageReference Include="ClangSharp" Version="17.0.1" />
30+
<PackageReference Include="ClangSharp" Version="18.1.0.2" />
3131
</ItemGroup>
3232

3333
<ItemGroup>
34-
<PackageReference Include="Irony" Version="1.2.0" />
35-
<PackageReference Include="MinVer" Version="4.3.0">
34+
<PackageReference Include="Irony" Version="1.5.3" />
35+
<PackageReference Include="MinVer" Version="6.0.0">
3636
<PrivateAssets>all</PrivateAssets>
3737
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
3838
</PackageReference>

src/CppAst/CppModelBuilder.cs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,11 @@ private CppType TryToCreateTemplateParameters(CXCursor cursor, void* data)
8686

8787
private CppContainerContext GetOrCreateDeclarationContainer(CXCursor cursor, void* data)
8888
{
89+
while (cursor.Kind == CXCursorKind.CXCursor_LinkageSpec)
90+
{
91+
cursor = cursor.SemanticParent;
92+
}
93+
8994
var typeAsCString = CXUtil.GetCursorUsrString(cursor);
9095
if (string.IsNullOrEmpty(typeAsCString))
9196
{
@@ -427,6 +432,11 @@ private CXChildVisitResult VisitMember(CXCursor cursor, CXCursor parent, void* d
427432
case CXCursorKind.CXCursor_AnnotateAttr:
428433
// Don't emit warning
429434
break;
435+
436+
case CXCursorKind.CXCursor_LinkageSpec:
437+
cursor.VisitChildren(VisitMember, new CXClientData((IntPtr)data));
438+
break;
439+
430440
default:
431441
WarningUnhandled(cursor, parent);
432442
break;

0 commit comments

Comments
 (0)