================
@@ -74,6 +83,15 @@ int get_value(int *p) SHARED_LOCKS_REQUIRED(foo_.mu_){
 
 void unlock_scope(struct Mutex *const *mu) 
__attribute__((release_capability(**mu)));
 
+// Verify late parsing:
+#ifdef LATE_PARSING
+struct LateParsing {
+  int a_value_defined_before GUARDED_BY(a_mutex_defined_late);
+  struct Mutex *a_mutex_defined_late ACQUIRED_AFTER(a_mutex_defined_very_late);
+  struct Mutex *a_mutex_defined_very_late;
----------------
delcypher wrote:

@pdherbemont Also I can't see any uses of the `LateParsing` struct. It might be 
worth testing the attributes were parsed. You could do that as a separate AST 
test or use the `LateParsing` struct in a way that will make the thread safety 
analysis emit warnings.

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

Reply via email to