Skip to content

Conversation

@aaronj0
Copy link
Collaborator

@aaronj0 aaronj0 commented Apr 9, 2024

No description provided.

EXPECT_EQ(Cpp::GetFunctionArgName(Decls[1], 2), "l");
EXPECT_EQ(Cpp::GetFunctionArgName(Decls[1], 3), "ch");

// EXPECT_EQ(Cpp::GetFunctionArgName(Decls[2], 0), "");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you remove the commented code or I comment it.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

these tests pass, have uncommented

Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

clang-tidy made some suggestions

auto *D = (clang::Decl *)func;
auto *FD = llvm::cast<clang::FunctionDecl>(D);
auto PI = FD->getParamDecl(param_index);
clang::ParmVarDecl* PI;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

warning: variable 'PI' is not initialized [cppcoreguidelines-init-variables]

Suggested change
clang::ParmVarDecl* PI;
clang::ParmVarDecl* PI = nullptr;

@vgvassilev vgvassilev merged commit ffeec07 into compiler-research:main Apr 10, 2024
@aaronj0 aaronj0 deleted the update-functionargname branch April 22, 2024 12:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants