================
@@ -6192,6 +6192,12 @@ bool TreeTransform<Derived>::TransformExceptionSpec(
 
   // Instantiate a dynamic noexcept expression, if any.
   if (isComputedNoexcept(ESI.Type)) {
+    // Update this scrope because ContextDecl in Sema will be used in 
TransformExpr.
+    auto *Method = dyn_cast_or_null<CXXMethodDecl>(ESI.SourceTemplate);
----------------
tbaederr wrote:

```suggestion
    auto *Method = dyn_cast_if_present<CXXMethodDecl>(ESI.SourceTemplate);
```

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

Reply via email to