Index: test/clang-query/has-underlying-type.cpp =================================================================== --- /dev/null +++ test/clang-query/has-underlying-type.cpp @@ -0,0 +1,25 @@ +// RUN: clang-query -c "match typedefDecl(hasUnderlyingType(asString(\"int\")))" %s -- -std=c++11 | FileCheck %s + +typedef char Character; +typedef const char ConstCharacter; +typedef volatile char VolatileCharacter; +typedef short Short; +typedef const short ConstShort; +typedef volatile short VolatileShort; +typedef int Integer; +// CHECK: has-underlying-type.cpp:[[@LINE-1]]:1: note: "root" binds here +typedef const int ConstInteger; +typedef volatile int VolatileInteger; +typedef long Long; +typedef const long ConstLong; +typedef volatile long VolatileLong; + +typedef float Float; +typedef const float ConstFloat; +typedef volatile float VolatileFloat; +typedef double Double; +typedef const double ConstDouble; +typedef volatile double VolatileDouble; + +typedef void NullaryFunctionReturningVoid(); +typedef int NullaryFunctionReturningInt();