[cfe-commits] r68436 - in /cfe/trunk: test/Coverage/c-language-features.inc tools/clang-cc/ASTConsumers.cpp
Zhongxing Xu
xuzhongxing at gmail.com
Sat Apr 4 19:04:38 PDT 2009
Author: zhongxingxu
Date: Sat Apr 4 21:04:38 2009
New Revision: 68436
URL: http://llvm.org/viewvc/llvm-project?rev=68436&view=rev
Log:
Apply a patch which adds 'OriginalParmVar' to the DeclContextPrinter by Jon
Simons.
Modified:
cfe/trunk/test/Coverage/c-language-features.inc
cfe/trunk/tools/clang-cc/ASTConsumers.cpp
Modified: cfe/trunk/test/Coverage/c-language-features.inc
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Coverage/c-language-features.inc?rev=68436&r1=68435&r2=68436&view=diff
==============================================================================
--- cfe/trunk/test/Coverage/c-language-features.inc (original)
+++ cfe/trunk/test/Coverage/c-language-features.inc Sat Apr 4 21:04:38 2009
@@ -172,3 +172,6 @@
short x;
{
}
+
+// Function which inputs an array
+void f9(int x[]) { }
Modified: cfe/trunk/tools/clang-cc/ASTConsumers.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/tools/clang-cc/ASTConsumers.cpp?rev=68436&r1=68435&r2=68436&view=diff
==============================================================================
--- cfe/trunk/tools/clang-cc/ASTConsumers.cpp (original)
+++ cfe/trunk/tools/clang-cc/ASTConsumers.cpp Sat Apr 4 21:04:38 2009
@@ -926,13 +926,18 @@
Out << "<parameter> " << PVD->getNameAsString() << "\n";
break;
}
+ case Decl::OriginalParmVar: {
+ OriginalParmVarDecl* OPVD = cast<OriginalParmVarDecl>(*I);
+ Out << "<original parameter> " << OPVD->getNameAsString() << "\n";
+ break;
+ }
case Decl::ObjCProperty: {
ObjCPropertyDecl* OPD = cast<ObjCPropertyDecl>(*I);
Out << "<objc property> " << OPD->getNameAsString() << "\n";
break;
}
default:
- fprintf(stderr, "DeclKind: %d\n", DK);
+ fprintf(stderr, "DeclKind: %d \"%s\"\n", DK, I->getDeclKindName());
assert(0 && "decl unhandled");
}
}
More information about the cfe-commits
mailing list