llvm-project/clang/test/Index/index-msguid.cpp
Ben Barham 699ae92f04 [Index] Add various missing USR generation
Over the years there's been many builtin types added without
corresponding USRs. Add a `@BT@<name>` USR for all these types. Also add
a comment so that hopefully this doesn't continue happening.

`MSGuid` was also missing a USR, use `@MG@GUID{<uuid>}` for it.

Resolves rdar://102198268.

Differential Revision: https://reviews.llvm.org/D138322
2022-11-28 11:51:08 -08:00

15 lines
491 B
C++

template <class T, const _GUID &ID = __uuidof(T)>
class GUIDHolder {
public:
virtual ~GUIDHolder() {}
};
class __declspec(uuid("12345678-1234-5678-ABCD-12345678ABCD")) GUIDInterface {};
class GUIDUse : public GUIDHolder<GUIDInterface> {
~GUIDUse() {}
// CHECK: RelOver | ~GUIDHolder | c:@S@GUIDHolder>#$@S@GUIDInterface#@MG@GUID{12345678-1234-5678-abcd-12345678abcd}@F@~GUIDHolder#
};
// RUN: c-index-test core -print-source-symbols -- -std=c++11 -fms-extensions %s | FileCheck %s