Daniel Dunbar | d7d5f02 | 2009-03-24 02:24:46 +0000 | [diff] [blame] | 1 | // RUN: clang-cc -fsyntax-only -verify %s |
Ted Kremenek | 4f03fd6 | 2008-10-29 18:41:34 +0000 | [diff] [blame] | 2 | |
| 3 | // Test for absence of crash reported in PR 2923: |
| 4 | // |
| 5 | // http://llvm.org/bugs/show_bug.cgi?id=2923 |
| 6 | // |
| 7 | // Previously we had a crash when deallocating the FunctionDecl for 'bar' |
| 8 | // because FunctionDecl::getNumParams() just used the type of foo to determine |
| 9 | // the number of parameters it has. In the case of 'bar' there are no |
| 10 | // ParmVarDecls. |
| 11 | int foo(int x, int y) { return x + y; } |
| 12 | extern typeof(foo) bar; |