Browse Source

Desugar a type to test whether or not it is a tag declaration.

pull/219/merge
Elias Holzer 11 years ago committed by triton
parent
commit
fd0cabb8eb
  1. 2
      src/AST/TypeExtensions.cs
  2. 10
      tests/Basic/Basic.h

2
src/AST/TypeExtensions.cs

@ -114,7 +114,7 @@ @@ -114,7 +114,7 @@
public static bool IsTagDecl<T>(this Type t, out T decl) where T : Declaration
{
var tag = t as TagType;
var tag = t.Desugar() as TagType;
if (tag == null)
{

10
tests/Basic/Basic.h

@ -302,3 +302,13 @@ struct EmptyNamedNestedEnum @@ -302,3 +302,13 @@ struct EmptyNamedNestedEnum
{
enum { Value = 10 };
};
typedef struct SomeStruct
{
}
SomeStruct;
class SomeClassExtendingTheStruct : public SomeStruct
{
};
Loading…
Cancel
Save