================
@@ -345,15 +345,19 @@ MultiLevelTemplateArgumentList 
Sema::getTemplateInstantiationArgs(
 
   using namespace TemplateInstArgsHelpers;
   const Decl *CurDecl = ND;
+
+  if (!ND)
----------------
shafik wrote:

Seems less error prone to check `!CurDecl` here. If the surrounding code get 
modified or refactored the relationship between `ND` and `CurDecl` may break 
down.

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

Reply via email to