Skip to content

clang-tidy: Identifier rename IfdsIde FF/EF#453

Merged
pdschubert merged 4 commits intodevelopmentfrom
f-ClangTidyIdentifierRenameIfdsIdeFFEF
Jan 4, 2022
Merged

clang-tidy: Identifier rename IfdsIde FF/EF#453
pdschubert merged 4 commits intodevelopmentfrom
f-ClangTidyIdentifierRenameIfdsIdeFFEF

Conversation

@MMory
Copy link
Copy Markdown
Member

@MMory MMory commented Dec 23, 2021

please merge after #452

@MMory MMory requested review from pdschubert and vulder December 23, 2021 16:49
Comment thread lib/PhasarLLVM/ControlFlow/Resolver/Resolver.cpp Outdated
Comment thread unittests/PhasarLLVM/ControlFlow/LLVMBasedICFGGlobCtorDtorTest.cpp Outdated
Comment thread unittests/PhasarLLVM/DataFlowSolver/IfdsIde/EdgeFunctionSingletonFactoryTest.cpp Outdated
@vulder vulder force-pushed the f-ClangTidyIdentifierRenameIfdsIdeFFEF branch from 245cae1 to 44c0630 Compare December 24, 2021 14:01
…tonFactoryTest.cpp

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
static std::map<N, std::set<D>> make(std::vector<N> Nodes, D ZeroNode) {
std::map<N, std::set<D>> Result;
for (N Node : Nodes) {
Result.insert(Node, {ZeroNode});
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

As we have copied the Nodes vector already, we should move the elements into the map.

Suggested change
Result.insert(Node, {ZeroNode});
Result.insert(std::move(Node), {ZeroNode});

const unsigned EFComposer_Id;
static inline unsigned CurrEFComposer_Id = 0;
const unsigned EFComposerId;
static inline unsigned CurrEFComposerId = 0; // NOLINT
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

What's the issue here?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Variable 'CurrEfComposerId' is non-const and globally accessible, consider making it constclang-tidy(cppcoreguidelines-avoid-non-const-global-variables)

Comment on lines +19 to 20
: EdgeFunctionComposer<int>(F, G){};
std::shared_ptr<EdgeFunction<int>>
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Suggested change
: EdgeFunctionComposer<int>(F, G){};
std::shared_ptr<EdgeFunction<int>>
: EdgeFunctionComposer<int>(F, G){};
std::shared_ptr<EdgeFunction<int>>

An empty line here would make it more readable ;)

PS: Why did you remove the moves?

@pdschubert pdschubert merged commit 2778903 into development Jan 4, 2022
@pdschubert pdschubert deleted the f-ClangTidyIdentifierRenameIfdsIdeFFEF branch January 4, 2022 13:43
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.

3 participants