blob: 5741de8e38ec1a9cb28218d6e5bd6568da121ee0 [file] [log] [blame]
Daniel Dunbara5728872009-12-15 20:14:24 +00001// RUN: %clang_cc1 -fsyntax-only -verify %s
Andy Gibbs8e8fb3b2012-10-19 12:44:48 +00002// expected-no-diagnostics
Ted Kremenek4f03fd62008-10-29 18:41:34 +00003
4// Test for absence of crash reported in PR 2923:
5//
6// http://llvm.org/bugs/show_bug.cgi?id=2923
7//
8// Previously we had a crash when deallocating the FunctionDecl for 'bar'
9// because FunctionDecl::getNumParams() just used the type of foo to determine
10// the number of parameters it has. In the case of 'bar' there are no
11// ParmVarDecls.
12int foo(int x, int y) { return x + y; }
13extern typeof(foo) bar;