hokein added inline comments.

================
Comment at: clang/lib/Sema/SemaTemplate.cpp:6960
+    if (ParamType.isNull())
+      return ExprError();
     // CheckNonTypeTemplateParameterType will produce a diagnostic if there's
----------------
adamcz wrote:
> So this can only happen when Result is TDK_AlreadyDiagnosed above, right? In 
> that case, I would handle such case explicitly in the code above, like:
> if (Result == TDK_AlreadyDiagnosed) return ExprError();
> else if (Result != TDK_Success) { ... }
> Seems like it would be more readable. 
> 
> However, I am definitely not opposed to keeping this check here as well, in 
> case there are other ways to get into this situation.
right. I think either of them works, switched to your version. 


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D134180/new/

https://reviews.llvm.org/D134180

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to