llvm-project/clang/tools/c-index-test
Ivan Donchevskii 50be573ed2 [libclang] Restore old clang_Cursor_isAnonymous behaviour
D54996 Changed the behaviour of clang_Cursor_isAnonymous, but there is no alternative available to get the old behaviour in some cases, which is essential for determining if a record is syntactically accessible, e.g.

struct {
  int x;
  int y;
} foo;

struct {
  struct {
    int x;
    int y;
  };
} bar;

void fun(struct { int x; int y; } *param);
The only 'anonymous' struct here is the one nested in bar, since there is
no way to reference the struct itself, only the fields within. Though the
anonymity applies to the instance itself, not the type.

To avoid confusion, I have added a new function called clang_Cursor_isAnonymousRecordDecl
which has the old behaviour of clang_Cursor_isAnonymous (and updated the doc
for the latter as well, which was seemingly forgotten).

Patch by Jorn Vernee.

Differential Revision: https://reviews.llvm.org/D61232

llvm-svn: 359448
2019-04-29 13:44:07 +00:00
..
CMakeLists.txt [clang] Switch to LLVM_ENABLE_IDE 2019-02-20 23:08:43 +00:00
c-index-test.c [libclang] Restore old clang_Cursor_isAnonymous behaviour 2019-04-29 13:44:07 +00:00
core_main.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00