Skip to content

Commit

Permalink
[clang-tidy] Fix check for generic lambda invented template parameters
Browse files Browse the repository at this point in the history
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.

(cherry picked from commit 5fdad8e)
  • Loading branch information
saarraz committed Jan 24, 2020
1 parent fe039ec commit b597c9e
Showing 1 changed file with 1 addition and 1 deletion.
Expand Up @@ -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();

Expand Down

0 comments on commit b597c9e

Please sign in to comment.