================
@@ -2071,6 +2071,18 @@ static void handleCommonAttr(Sema &S, Decl *D, const 
ParsedAttr &AL) {
   D->addAttr(::new (S.Context) CommonAttr(S.Context, AL));
 }
 
+static void handleCompleteOnMemberInstAttr(Sema &S, Decl *D, const ParsedAttr 
&AL) {
+  if (!AL.hasParsedType()) {
+    S.Diag(AL.getLoc(), diag::err_attribute_wrong_number_arguments) << AL << 1;
+    return;
+  }
+
+  TypeSourceInfo *ParmTSI = nullptr;
+  S.GetTypeFromParser(AL.getTypeArg(), &ParmTSI);
+  assert(ParmTSI && "no type source info for attribute argument");
----------------
philnik777 wrote:

Yes. I don't think there is any constraint that wouldn't forbid anything 
reasonable without being extremely complicated. You might e.g. want to require 
that `T` and `T::something` are complete types, or the template argument of a 
parent class.

I guess it would be possible to constrain it on being dependent on a template 
argument, but IDK whether that's worth it.

https://github.com/llvm/llvm-project/pull/211231
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to