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