================
@@ -19001,9 +19001,9 @@ void Sema::ActOnFields(Scope *S, SourceLocation RecLoc, 
Decl *EnclosingDecl,
 
   // Verify that all the fields are okay.
   SmallVector<FieldDecl*, 32> RecFields;
-
+  std::optional<const FieldDecl *> PreviousField;
----------------
ojhunt wrote:

@rnk this is sufficiently constrained/non-escaping but in general I prefer 
optional<> to null pointers as there's no other signal to indicate whether a 
pointer can be legitimately null. (It would be nice if optional<&> was a thing 
:D )

https://github.com/llvm/llvm-project/pull/117428
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to