Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

misc-unused-parameters causes an assertion failure in clang::CallExpr::getArg(unsigned int) const: Arg < NumArgs && "Arg access out of range!" #37403

Closed
llvmbot opened this issue Jul 4, 2018 · 1 comment
Labels
bugzilla Issues migrated from bugzilla clang-tidy

Comments

@llvmbot
Copy link
Collaborator

llvmbot commented Jul 4, 2018

Bugzilla Link 38055
Resolution FIXED
Resolved on Jul 04, 2018 08:21
Version unspecified
OS Linux
Reporter LLVM Bugzilla Contributor

Extended Description

$ cat test-UnusedParametersCheck__warnOnUnusedParameter.cc
namespace {
struct a {
void b(unsigned c) {}
};
template
class d {
a e;
void f() { e.b(); }
};
} // namespace
$ ./clang-tidy -checks=-*,misc-unused-parameters test-UnusedParametersCheck__warnOnUnusedParameter.cc --
assertion failed at llvm/tools/clang/include/clang/AST/Expr.h:2301 in const clang::Expr *clang::CallExpr::getArg(unsigned int) const: Arg < NumArgs && "Arg access out of range!"
@ 0x55cec6baa026 __assert_fail
@ 0x55cec4450e33 clang::tidy::misc::UnusedParametersCheck::warnOnUnusedParameter()
@ 0x55cec445109c clang::tidy::misc::UnusedParametersCheck::check()
@ 0x55cec49fe56d clang::ast_matchers::internal::(anonymous namespace)::MatchASTVisitor::MatchVisitor::visitMatch()
@ 0x55cec4a221f4 clang::ast_matchers::internal::BoundNodesTreeBuilder::visitMatches()
@ 0x55cec49fdc04 clang::ast_matchers::internal::(anonymous namespace)::MatchASTVisitor::matchWithFilter()
@ 0x55cec49c666e clang::ast_matchers::internal::(anonymous namespace)::MatchASTVisitor::TraverseDecl()
@ 0x55cec4a00ce9 clang::RecursiveASTVisitor<>::TraverseCXXRecordDecl()
@ 0x55cec49c7a2c clang::ast_matchers::internal::(anonymous namespace)::MatchASTVisitor::TraverseDecl()
@ 0x55cec49ff509 clang::RecursiveASTVisitor<>::TraverseNamespaceDecl()
@ 0x55cec49c79b4 clang::ast_matchers::internal::(anonymous namespace)::MatchASTVisitor::TraverseDecl()
@ 0x55cec4a03199 clang::RecursiveASTVisitor<>::TraverseTranslationUnitDecl()
@ 0x55cec49c7c60 clang::ast_matchers::internal::(anonymous namespace)::MatchASTVisitor::TraverseDecl()
@ 0x55cec49c63dc clang::ast_matchers::MatchFinder::matchAST()
@ 0x55cec4c134dc clang::MultiplexConsumer::HandleTranslationUnit()

@llvmbot
Copy link
Collaborator Author

llvmbot commented Jul 4, 2018

Fixed in r336283.

@llvmbot llvmbot transferred this issue from llvm/llvm-bugzilla-archive Dec 10, 2021
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bugzilla Issues migrated from bugzilla clang-tidy
Projects
None yet
Development

No branches or pull requests

1 participant