aboutsummaryrefslogtreecommitdiff
path: root/lib/Sema/SemaChecking.cpp
diff options
context:
space:
mode:
authorJohn McCall <rjmccall@apple.com>2010-02-02 08:45:54 +0000
committerJohn McCall <rjmccall@apple.com>2010-02-02 08:45:54 +0000
commit4f9506a27cb6b865bf38beea48eadfa9dc93f510 (patch)
tree74f14cf5d626982070d697032e4be5eb8a510cd6 /lib/Sema/SemaChecking.cpp
parentfb8b69aef3377aaa786d1278aaae7e7b04ac095f (diff)
Access control for implicit destructor calls. Diagnostic could be orders of
magnitude clearer. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95078 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaChecking.cpp')
-rw-r--r--lib/Sema/SemaChecking.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/Sema/SemaChecking.cpp b/lib/Sema/SemaChecking.cpp
index c6b826b327..0d9918f6e4 100644
--- a/lib/Sema/SemaChecking.cpp
+++ b/lib/Sema/SemaChecking.cpp
@@ -2637,6 +2637,9 @@ bool Sema::CheckParmsForFunctionDef(FunctionDecl *FD) {
Diag(Param->getLocation(), diag::err_array_star_in_function_definition);
}
}
+
+ if (getLangOptions().AccessControl)
+ CheckDestructorAccess(Param->getLocation(), Param->getType());
}
return HasInvalidParm;