Skip to content

Commit 7b574bc

Browse files
fix: Fix errors & warnings in release build (#153)
1 parent 8e31e0a commit 7b574bc

File tree

3 files changed

+6
-1
lines changed

3 files changed

+6
-1
lines changed

indexer/RAII.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,9 @@ class Bomb final {
8484

8585
#else
8686

87-
struct Bomb {};
87+
struct Bomb {
88+
void defuse() {}
89+
};
8890

8991
#define BOMB_INIT(__msg) scip_clang::Bomb()
9092

indexer/ScipExtras.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,7 @@ class SymbolInformationBuilder final {
8585
: documentation(), relationships(),
8686
_bomb(
8787
BOMB_INIT(fmt::format("SymbolInformationBuilder for '{}'", name))) {
88+
(void)name;
8889
this->setDocumentation(std::move(docs));
8990
this->mergeRelationships(std::move(rels));
9091
}

indexer/SymbolFormatter.cc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -506,8 +506,10 @@ SymbolFormatter::getVarSymbol(const clang::VarDecl &varDecl) {
506506
ENFORCE(false, "DecompositionDecls require recursive traversal"
507507
" and do not have a single symbol name;"
508508
" they should be handled in TuIndexer");
509+
return {}; // in release mode
509510
case Kind::ParmVar:
510511
ENFORCE(false, "already handled parameter case earlier");
512+
return {}; // in release mode
511513
case Kind::VarTemplatePartialSpecialization:
512514
case Kind::VarTemplateSpecialization:
513515
case Kind::Var: {

0 commit comments

Comments
 (0)