Skip to content

Commit

Permalink
treewide: Silence gcc warnings.
Browse files Browse the repository at this point in the history
  • Loading branch information
Jezurko committed May 16, 2023
1 parent 366d642 commit d1e375f
Show file tree
Hide file tree
Showing 7 changed files with 7 additions and 5 deletions.
2 changes: 1 addition & 1 deletion lib/vast/Dialect/HighLevel/HighLevelLinkage.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@ namespace vast::hl {
auto &actx = decl->getASTContext();
auto linkage = actx.GetGVALinkageForFunction(decl);

if (const auto *dtor = clang::dyn_cast< clang::CXXDestructorDecl >(decl)) {
if (/*const auto *dtor =*/ clang::dyn_cast< clang::CXXDestructorDecl >(decl)) {
VAST_UNIMPLEMENTED;
}

Expand Down
1 change: 1 addition & 0 deletions lib/vast/Frontend/GenAction.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,7 @@ namespace vast::cc {
case target_dialect::low_level: return "low_level";
case target_dialect::llvm: return "llvm";
}
VAST_UNREACHABLE("Unknown target dialect to string.");
}

void compile_via_vast(auto mod, mcontext_t *mctx)
Expand Down
2 changes: 1 addition & 1 deletion lib/vast/Translation/CodeGenDriver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@ namespace vast::cg
VAST_UNIMPLEMENTED_MSG("codegen for multi version function");
}

if (const auto *method = llvm::dyn_cast< clang::CXXMethodDecl >(decl)) {
if (/*const auto *method =*/ llvm::dyn_cast< clang::CXXMethodDecl >(decl)) {
VAST_UNIMPLEMENTED_MSG("cxx methods");
}

Expand Down
2 changes: 1 addition & 1 deletion lib/vast/Translation/CodeGenFunction.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ namespace vast::cg
bool codegen_driver::may_drop_function_return(qual_type rty) const {
// We can't just disard the return value for a record type with a complex
// destructor or a non-trivially copyable type.
if (const auto *recorrd_type = rty.getCanonicalType()->getAs< clang::RecordType >()) {
if (/*const auto *record_type =*/ rty.getCanonicalType()->getAs< clang::RecordType >()) {
VAST_UNIMPLEMENTED;
}

Expand Down
1 change: 1 addition & 0 deletions lib/vast/Translation/CodeGenStmtVisitor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@ namespace vast::hl
case clang::PredefinedExpr::IdentKind::PrettyFunctionNoVirtual :
return IdentKind::PrettyFunctionNoVirtual;
}
VAST_UNREACHABLE( "unsupported ident kind" );
}

} // namespace vast::hl
2 changes: 1 addition & 1 deletion lib/vast/Translation/Mangler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ namespace vast::cg

// Some ABIs don't have constructor variants. Make sure that base and complete
// constructors get mangled the same.
if (const auto *ctor = clang::dyn_cast< clang::CXXConstructorDecl >(canonical.getDecl())) {
if (/*const auto *ctor =*/ clang::dyn_cast< clang::CXXConstructorDecl >(canonical.getDecl())) {
VAST_UNIMPLEMENTED_IF(!target_info.getCXXABI().hasConstructorVariants());
}

Expand Down
2 changes: 1 addition & 1 deletion tools/vast-repl/vast-repl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ namespace vast::repl

while (!cli.exit()) {
std::string cmd;
if (auto quit = linenoise::Readline("> ", cmd)) {
if (linenoise::Readline("> ", cmd)) {
break;
}

Expand Down

0 comments on commit d1e375f

Please sign in to comment.