diff options
| author | Ted Kremenek <kremenek@apple.com> | 2009-01-16 18:40:33 +0000 |
|---|---|---|
| committer | Ted Kremenek <kremenek@apple.com> | 2009-01-16 18:40:33 +0000 |
| commit | 86afde337d7c7da00db43dbf0ba26cd3049c0928 (patch) | |
| tree | 5cd506ddd182b00539a392b8c28047f960cfd880 /clang/lib/Analysis/CFRefCount.cpp | |
| parent | 4b79e47f9434d5084dd0bbb2eabe7d2095ed6997 (diff) | |
| download | bcm5719-llvm-86afde337d7c7da00db43dbf0ba26cd3049c0928.tar.gz bcm5719-llvm-86afde337d7c7da00db43dbf0ba26cd3049c0928.zip | |
Fix PR 3337 [retain/release checker]: Handle FunctionDecl's declared using typedefs.
llvm-svn: 62331
Diffstat (limited to 'clang/lib/Analysis/CFRefCount.cpp')
| -rw-r--r-- | clang/lib/Analysis/CFRefCount.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/clang/lib/Analysis/CFRefCount.cpp b/clang/lib/Analysis/CFRefCount.cpp index af96c0672b6..c72d2a3070b 100644 --- a/clang/lib/Analysis/CFRefCount.cpp +++ b/clang/lib/Analysis/CFRefCount.cpp @@ -737,7 +737,9 @@ RetainSummary* RetainSummaryManager::getSummary(FunctionDecl* FD) { break; } - FunctionType* FT = cast<FunctionType>(FD->getType()); + // [PR 3337] Use 'getDesugaredType' to strip away any typedefs on the + // function's type. + FunctionType* FT = cast<FunctionType>(FD->getType()->getDesugaredType()); const char* FName = FD->getIdentifier()->getName(); // Inspect the result type. |

