Skip to content

Commit

Permalink
Annotate seemingly unneeded function to make sure it is kept.
Browse files Browse the repository at this point in the history
clang-tidy fails to see that a function is needed in a subsequent
*.inc file, and complains. Tell it not to worry.

#xls-build-gardener

PiperOrigin-RevId: 684086376
  • Loading branch information
hzeller authored and copybara-github committed Oct 9, 2024
1 parent 12c2ede commit 8b75961
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions xls/contrib/mlir/transforms/arith_to_xls.cc
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,8 @@ using ::llvm::SmallVector;
using ::mlir::StringAttr;
using ::mlir::func::FuncOp;

// clang-tidy fails to see that these are needed by the *.inc file below
// NOLINTNEXTLINE(clang-diagnostic-unused-function)
FuncOp maybeDeclareDslxFn(SymbolTable& symtab, OpBuilder builder,
const std::string& symbolName,
const std::string& dslxName,
Expand All @@ -67,6 +69,8 @@ FuncOp maybeDeclareDslxFn(SymbolTable& symtab, OpBuilder builder,
return fn;
}

// clang-tidy fails to see that these are needed by the *.inc file below
// NOLINTNEXTLINE(clang-diagnostic-unused-function)
xls::ImportDslxFilePackageOp maybeImportDslxFilePackage(
SymbolTable& symtab, OpBuilder builder, std::string_view packageName,
std::string_view symbolName) {
Expand Down

0 comments on commit 8b75961

Please sign in to comment.