1*67e74705SXin Li // RUN: %clang_cc1 -fsyntax-only -verify %s 2*67e74705SXin Li // expected-no-diagnostics 3*67e74705SXin Li 4*67e74705SXin Li // Test for absence of crash reported in PR 2923: 5*67e74705SXin Li // 6*67e74705SXin Li // http://llvm.org/bugs/show_bug.cgi?id=2923 7*67e74705SXin Li // 8*67e74705SXin Li // Previously we had a crash when deallocating the FunctionDecl for 'bar' 9*67e74705SXin Li // because FunctionDecl::getNumParams() just used the type of foo to determine 10*67e74705SXin Li // the number of parameters it has. In the case of 'bar' there are no 11*67e74705SXin Li // ParmVarDecls. foo(int x,int y)12*67e74705SXin Liint foo(int x, int y) { return x + y; } 13*67e74705SXin Li extern typeof(foo) bar; 14