[cfe-commits] r97736 - in /cfe/trunk: test/Index/linkage.c tools/c-index-test/c-index-test.c
Douglas Gregor
dgregor at apple.com
Thu Mar 4 11:36:27 PST 2010
Author: dgregor
Date: Thu Mar 4 13:36:27 2010
New Revision: 97736
URL: http://llvm.org/viewvc/llvm-project?rev=97736&view=rev
Log:
c-index-test's printing of linkage was completely broken, as was the
test of this functionality. The API worked great, though! :)
Modified:
cfe/trunk/test/Index/linkage.c
cfe/trunk/tools/c-index-test/c-index-test.c
Modified: cfe/trunk/test/Index/linkage.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Index/linkage.c?rev=97736&r1=97735&r2=97736&view=diff
==============================================================================
--- cfe/trunk/test/Index/linkage.c (original)
+++ cfe/trunk/test/Index/linkage.c Thu Mar 4 13:36:27 2010
@@ -9,15 +9,18 @@
int k;
}
extern int n;
+static int wibble(int);
// CHECK: EnumDecl=Baz:3:6 (Definition)linkage=External
// CHECK: EnumConstantDecl=Qux:3:12 (Definition)linkage=External
// CHECK: VarDecl=x:4:5linkage=External
// CHECK: FunctionDecl=foo:5:6linkage=External
-// CHECK: VarDecl=w:6:12linkage=External
+// CHECK: VarDecl=w:6:12linkage=Internal
// CHECK: FunctionDecl=bar:7:6 (Definition)linkage=External
-// CHECK: ParmDecl=y:7:14 (Definition)linkage=External
-// CHECK: VarDecl=z:8:14 (Definition)linkage=External
-// CHECK: VarDecl=k:9:7 (Definition)linkage=External
-// CHECK: VarDecl=n:11:12
+// CHECK: ParmDecl=y:7:14 (Definition)linkage=NoLinkage
+// CHECK: VarDecl=z:8:14 (Definition)linkage=NoLinkage
+// CHECK: VarDecl=k:9:7 (Definition)linkage=NoLinkage
+// CHECK: VarDecl=n:11:12linkage=External
+// CHECK: FunctionDecl=wibble:12:12linkage=Internal
+// CHECL: ParmDecl=:12:22 (Definition)linkage=NoLinkage
Modified: cfe/trunk/tools/c-index-test/c-index-test.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/tools/c-index-test/c-index-test.c?rev=97736&r1=97735&r2=97736&view=diff
==============================================================================
--- cfe/trunk/tools/c-index-test/c-index-test.c (original)
+++ cfe/trunk/tools/c-index-test/c-index-test.c Thu Mar 4 13:36:27 2010
@@ -431,10 +431,10 @@
switch (clang_getCursorLinkage(cursor)) {
case CXLinkage_Invalid: break;
- case CXLinkage_NoLinkage: linkage = "NoLinkage";
- case CXLinkage_Internal: linkage = "Internal";
- case CXLinkage_UniqueExternal: linkage = "UniqueExternal";
- case CXLinkage_External: linkage = "External";
+ case CXLinkage_NoLinkage: linkage = "NoLinkage"; break;
+ case CXLinkage_Internal: linkage = "Internal"; break;
+ case CXLinkage_UniqueExternal: linkage = "UniqueExternal"; break;
+ case CXLinkage_External: linkage = "External"; break;
}
if (linkage) {
More information about the cfe-commits
mailing list