Skip to content

Commit a0d1b84

Browse files
committed
Exposed raw macro value source string.
Also fixed our editorconfig affecting LLVM. (No idea how this wasn't a problem sooner.)
1 parent 8137f82 commit a0d1b84

File tree

3 files changed

+6
-1
lines changed

3 files changed

+6
-1
lines changed

ClangSharp.Pathogen/PathogenMacroInformation.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,16 @@ public unsafe readonly struct PathogenMacroInformation
2121
private readonly byte** ParameterNames;
2222
private readonly ulong* ParameterNameLengths;
2323
public readonly int TokenCount;
24+
private readonly byte* _RawValueSourceString;
25+
private readonly ulong _RawValueSourceStringLength;
2426

2527
public string Name => Encoding.UTF8.GetString(_Name, checked((int)_NameLength));
2628
public bool WasUndefined => _WasUndefined != 0;
2729
public bool IsFunctionLike => _IsFunctionLike != 0;
2830
public bool IsBuiltinMacro => _IsBuiltinMacro != 0;
2931
public bool HasCommaPasting => _HasCommaPasting != 0;
3032
public bool IsUsedForHeaderGuard => _IsUsedForHeaderGuard != 0;
33+
public string RawValueSourceString => Encoding.UTF8.GetString(_RawValueSourceString, checked((int)_RawValueSourceStringLength));
3134

3235
public string GetParameterName(int index)
3336
{

external/.editorconfig

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# This file exists to protect LLVM from our editorconfig.
2+
root = true

0 commit comments

Comments
 (0)