r288444 - Delete tautological assertion.

Jonathan Roelofs via cfe-commits cfe-commits at lists.llvm.org
Thu Dec 1 16:51:59 PST 2016


Author: jroelofs
Date: Thu Dec  1 18:51:58 2016
New Revision: 288444

URL: http://llvm.org/viewvc/llvm-project?rev=288444&view=rev
Log:
Delete tautological assertion.

After r256463, both the LHS and RHS now refer to the same variable. Before,
they referred to the member, the parameter respectively. Now GCC6's
-Wtautological-compare complains.

Modified:
    cfe/trunk/lib/AST/DeclTemplate.cpp

Modified: cfe/trunk/lib/AST/DeclTemplate.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/AST/DeclTemplate.cpp?rev=288444&r1=288443&r2=288444&view=diff
==============================================================================
--- cfe/trunk/lib/AST/DeclTemplate.cpp (original)
+++ cfe/trunk/lib/AST/DeclTemplate.cpp Thu Dec  1 18:51:58 2016
@@ -36,7 +36,6 @@ TemplateParameterList::TemplateParameter
   : TemplateLoc(TemplateLoc), LAngleLoc(LAngleLoc), RAngleLoc(RAngleLoc),
     NumParams(Params.size()), ContainsUnexpandedParameterPack(false),
     HasRequiresClause(static_cast<bool>(RequiresClause)) {
-  assert(this->NumParams == NumParams && "Too many template parameters");
   for (unsigned Idx = 0; Idx < NumParams; ++Idx) {
     NamedDecl *P = Params[Idx];
     begin()[Idx] = P;




More information about the cfe-commits mailing list