[PATCH] D70094: [clang-tidy] new altera ID dependent backward branch check
Eugene Zelenko via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Apr 5 07:03:49 PDT 2021
Eugene.Zelenko added inline comments.
================
Comment at: clang-tools-extra/clang-tidy/altera/IdDependentBackwardBranchCheck.cpp:200
+ if (isa<DoStmt>(Loop))
+ return DO_LOOP; // loop_type = 0;
+ else if (isa<WhileStmt>(Loop))
----------------
Is loop ID is not enough? Why does comment with numerical code used? Same below.
================
Comment at: clang-tools-extra/clang-tidy/altera/IdDependentBackwardBranchCheck.h:1
+//===--- IdDependentBackwardBranchCheck.h - clang-tidy---------------------===//
+//
----------------
Please add space after clang-tidy and language code. See other checks as example.
================
Comment at: clang-tools-extra/clang-tidy/altera/IdDependentBackwardBranchCheck.h:36
+ : FieldDeclaration(Declaration), Location(Location), Message(Message) {}
+ IdDependencyRecord() {}
+ const VarDecl *VariableDeclaration;
----------------
Please use `= default;`
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D70094/new/
https://reviews.llvm.org/D70094
More information about the cfe-commits
mailing list