================
@@ -1533,13 +1535,11 @@ class NonTypeTemplateParmDecl final
   /// Return the constraint introduced by the placeholder type of this non-type
   /// template parameter (if any).
   Expr *getPlaceholderTypeConstraint() const {
-    return hasPlaceholderTypeConstraint() ? *getTrailingObjects<Expr *>() :
-        nullptr;
+    return PlaceholderTypeConstraintInitialized ? *getTrailingObjects<Expr *>()
+                                                : nullptr;
   }
 
-  void setPlaceholderTypeConstraint(Expr *E) {
-    *getTrailingObjects<Expr *>() = E;
----------------
alejandro-alvarez-sonarsource wrote:

Both inside `Sema` and `ASTReaderDecl` the `NonTypeTemplateParmDecl` is created 
relatively far from the parsing / deserialization of the constraint.

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

Reply via email to