Author: Saar Raz Date: 2020-01-22T02:46:39+02:00 New Revision: 5fdad8e3f803adce501ca25118f325184e54018d
URL: https://github.com/llvm/llvm-project/commit/5fdad8e3f803adce501ca25118f325184e54018d DIFF: https://github.com/llvm/llvm-project/commit/5fdad8e3f803adce501ca25118f325184e54018d.diff LOG: [clang-tidy] Fix check for generic lambda invented template parameters clang-tidy previously relied on there being no identifier for a TemplateTypeParmDecl for checking whether 'decltype(x)' should be inserted, instead of checking whether or not it is implicit. D65042 added new names for invented generic lambda template parameters, rendering that check incorrect. Added: Modified: clang-tools-extra/clang-tidy/bugprone/MoveForwardingReferenceCheck.cpp Removed: ################################################################################ diff --git a/clang-tools-extra/clang-tidy/bugprone/MoveForwardingReferenceCheck.cpp b/clang-tools-extra/clang-tidy/bugprone/MoveForwardingReferenceCheck.cpp index bf6f2f6ed035..8953f95159a9 100644 --- a/clang-tools-extra/clang-tidy/bugprone/MoveForwardingReferenceCheck.cpp +++ b/clang-tools-extra/clang-tidy/bugprone/MoveForwardingReferenceCheck.cpp @@ -33,7 +33,7 @@ static void replaceMoveWithForward(const UnresolvedLookupExpr *Callee, if (CallRange.isValid()) { const std::string TypeName = - TypeParmDecl->getIdentifier() + (TypeParmDecl->getIdentifier() && !TypeParmDecl->isImplicit()) ? TypeParmDecl->getName().str() : (llvm::Twine("decltype(") + ParmVar->getName() + ")").str(); _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits