This is an archive of the discontinued LLVM Phabricator instance.

[libclang] add support for arrays to clang_Cursor_Evaluate
Needs ReviewPublic

Authored by BartmanAbyss on Feb 17 2022, 7:49 AM.

Details

Summary

This allows evaluating array initializer such as

int array[4]{1, 2, 3, 4};
const char* str[2]{ "hello", "world" };

Adds CXEval_Array to the CXEvalResultKind enum, clang_EvalResult_getArraySize(), clang_EvalResult_getArrayElt

Diff Detail