[clang-tools-extra] [NFC] Fix potential underflow constant. (PR #118528)

Zahira Ammarguellat via cfe-commits cfe-commits at lists.llvm.org
Wed Dec 4 11:10:35 PST 2024


================
@@ -58,10 +58,10 @@ getDerivedParameter(const ClassTemplateSpecializationDecl *CRTP,
                Arg.getAsType()->getAsCXXRecordDecl() == Derived;
       });
 
-  return AnyOf ? CRTP->getSpecializedTemplate()
-                     ->getTemplateParameters()
-                     ->getParam(Idx - 1)
-               : nullptr;
+  return AnyOf && Idx > 0 ? CRTP->getSpecializedTemplate()
----------------
zahiraam wrote:

Sorry for the noise.

https://github.com/llvm/llvm-project/pull/118528


More information about the cfe-commits mailing list