diff options
author | John McCall <rjmccall@apple.com> | 2010-02-02 09:10:11 +0000 |
---|---|---|
committer | John McCall <rjmccall@apple.com> | 2010-02-02 09:10:11 +0000 |
commit | 68c6c9a21e2d9d587477e07522fe55769d3aa26a (patch) | |
tree | a9822e55cd8fd01efed12ed744e79b49adbdd707 /lib/Sema/SemaChecking.cpp | |
parent | 4f9506a27cb6b865bf38beea48eadfa9dc93f510 (diff) |
Mark dtors for parameter variables and eliminate some redundant type munging.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95079 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaChecking.cpp')
-rw-r--r-- | lib/Sema/SemaChecking.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/Sema/SemaChecking.cpp b/lib/Sema/SemaChecking.cpp index 0d9918f6e4..cb0e5fb218 100644 --- a/lib/Sema/SemaChecking.cpp +++ b/lib/Sema/SemaChecking.cpp @@ -2638,8 +2638,9 @@ bool Sema::CheckParmsForFunctionDef(FunctionDecl *FD) { } } - if (getLangOptions().AccessControl) - CheckDestructorAccess(Param->getLocation(), Param->getType()); + if (getLangOptions().CPlusPlus) + if (const RecordType *RT = Param->getType()->getAs<RecordType>()) + FinalizeVarWithDestructor(Param, RT); } return HasInvalidParm; |