================
@@ -7952,13 +7948,18 @@ class Parser : public CodeCompletionHandler {
       Depth += D;
       AddedLevels += D;
     }
-    void setAddedDepth(unsigned D) {
-      Depth = Depth - AddedLevels + D;
-      AddedLevels = D;
-    }
-
     unsigned getDepth() const { return Depth; }
-    unsigned getOriginalDepth() const { return Depth - AddedLevels; }
+  };
+
+  /// Utility to re-enter a possibly-templated scope while parsing its
+  /// late-parsed components.
+  struct ReenterTemplateScopeRAII {
+    MultiParseScope Scopes;
+    TemplateParameterDepthRAII CurTemplateDepthTracker;
----------------
shafik wrote:

You should delete the copy ctor and copy assignment of 
`TemplateParameterDepthRAII` since it is not following the rule of three. This 
will make copy not work for `ReenterTemplateScopeRAII` although explicitly 
deleting for this struct as well might be nice.

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

Reply via email to