[clang] [BoundsSafety][Clang][Sema][AST] Introduce CThisExpr for C __counted_by attributes (PR #199241)
Karthik P via cfe-commits
cfe-commits at lists.llvm.org
Sat May 30 23:28:55 PDT 2026
================
@@ -335,6 +335,16 @@ ExprDependence clang::computeDependence(CXXThisExpr *E) {
return D;
}
+ExprDependence clang::computeDependence(CThisExpr *E) {
+ // The implicit reference is type-dependent if the enclosing record type
+ // is dependent. This primarily matters when the C struct is utilized
+ // within a C++ template context.
+ // Unlike CXXThisExpr, CThisExpr cannot be captured by lambdas or
+ // explicitly object parameters, so we only need to forward the implied
+ // type's dependence.
----------------
Caryoake wrote:
Got it yep
https://github.com/llvm/llvm-project/pull/199241
More information about the cfe-commits
mailing list