[clang] [BoundsSafety] WIP: Make 'counted_by' work for pointer fields; late parsing for 'counted_by' on decl attr position (PR #87596)

Dan Liew via cfe-commits cfe-commits at lists.llvm.org
Fri Apr 5 13:47:10 PDT 2024


================
@@ -2497,7 +2501,9 @@ class Parser : public CodeCompletionHandler {
 
   void ParseStructDeclaration(
       ParsingDeclSpec &DS,
-      llvm::function_ref<void(ParsingFieldDeclarator &)> FieldsCallback);
+      llvm::function_ref<void(ParsingFieldDeclarator &, Decl *&)>
----------------
delcypher wrote:

Why are we adding using `Decl*&` as a parameter? Would it make more sense as a return value? All the uses I can see unconditionally write to the variable so this isn't an `inout` parameter. It seems like its just an `out` parameter which means it could be a return value instead.

https://github.com/llvm/llvm-project/pull/87596


More information about the cfe-commits mailing list