зеркало из https://github.com/microsoft/clang-1.git
Fix an ast-print/ast-dump bug.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44550 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Родитель
acb4977dd3
Коммит
0d6ca11db0
|
@ -60,9 +60,9 @@ void DeclPrinter::PrintFunctionDeclStart(FunctionDecl *FD) {
|
|||
Out << "inline ";
|
||||
|
||||
std::string Proto = FD->getName();
|
||||
FunctionType *AFT = cast<FunctionType>(FD->getType());
|
||||
const FunctionType *AFT = FD->getType()->getAsFunctionType();
|
||||
|
||||
if (FunctionTypeProto *FT = dyn_cast<FunctionTypeProto>(AFT)) {
|
||||
if (const FunctionTypeProto *FT = dyn_cast<FunctionTypeProto>(AFT)) {
|
||||
Proto += "(";
|
||||
for (unsigned i = 0, e = FD->getNumParams(); i != e; ++i) {
|
||||
if (i) Proto += ", ";
|
||||
|
|
|
@ -0,0 +1,6 @@
|
|||
// RUN: clang %s -ast-print
|
||||
|
||||
typedef void func_typedef();
|
||||
func_typedef xxx;
|
||||
|
||||
|
Загрузка…
Ссылка в новой задаче