summaryrefslogtreecommitdiffstats
path: root/clang/test/Index/asm-attribute.c
diff options
context:
space:
mode:
authorArgyrios Kyrtzidis <akyrtzi@gmail.com>2011-12-06 22:05:01 +0000
committerArgyrios Kyrtzidis <akyrtzi@gmail.com>2011-12-06 22:05:01 +0000
commit66f433a74644fdb4c87990fb76dbb1cada83f520 (patch)
tree591a3f70cb8a6722c3c7731eed99b0cbe55f0d09 /clang/test/Index/asm-attribute.c
parent33fe130e1277937657ea05238bdcedc27569fd8d (diff)
downloadbcm5719-llvm-66f433a74644fdb4c87990fb76dbb1cada83f520.tar.gz
bcm5719-llvm-66f433a74644fdb4c87990fb76dbb1cada83f520.zip
[libclang] API enhancements by Joe Groff!
- Exposes a CXType_Vector type kind for vector types. - Adds generalized versions of the clang_getArrayElementType and clang_getArraySize functions, named clang_getElementType and clang_getNumElements, which work on array, vector, or complex types. - Adds additional functions for querying function types. clang_isFunctionTypeVariadic returns true if a function type is variadic. clang_getFunctionCallingConv returns an enumeration value indicating the calling convention of the function type. clang_getNumArgTypes returns the number of static argument types, and clang_getArgType gets the type of an argument. - Adds a clang_getTypedefDeclUnderlyingType function to get the underlying type from a TypedefDecl cursor. - Adds a clang_getEnumDeclIntegerType function to get the integer type from an EnumDecl cursor. - Adds clang_getEnumConstantDeclValue and clang_getEnumConstantDeclUnsignedValue functions to get the value of an EnumConstantDecl as a signed or unsigned long long, respectively. - Exposes a CXCursor_AsmLabelAttr cursor kind for __asm__("label") attributes. - Alters clang_getCursorSpelling to return the label value for AsmLabelAttr-kind cursors. llvm-svn: 145972
Diffstat (limited to 'clang/test/Index/asm-attribute.c')
-rw-r--r--clang/test/Index/asm-attribute.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/clang/test/Index/asm-attribute.c b/clang/test/Index/asm-attribute.c
new file mode 100644
index 00000000000..f9524598b60
--- /dev/null
+++ b/clang/test/Index/asm-attribute.c
@@ -0,0 +1,6 @@
+int foo(int x) __asm__("_foo_");
+
+// RUN: c-index-test -test-load-source all %s | FileCheck %s
+// CHECK: asm-attribute.c:1:5: FunctionDecl=foo:1:5 Extent=[1:1 - 1:32]
+// FIXME: Location below.
+// CHECK: <invalid loc>:0:0: asm label=_foo_ Extent=[1:24 - 1:31]
OpenPOWER on IntegriCloud