Skip to content

Commit 9fdefe8

Browse files
andreast271tautschnig
authored andcommitted
Enable compilation with DEBUG defined. Some of the code inside #ifdef DEBUG ... #ENDIF had become stale
1 parent d3c2f9d commit 9fdefe8

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

src/cpp/cpp_instantiate_template.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -465,7 +465,7 @@ const symbolt &cpp_typecheckt::instantiate_template(
465465

466466
#ifdef DEBUG
467467
std::cout << "instance symbol: " << new_symb.name << "\n\n";
468-
std::cout << "template type: " << template_type << "\n\n";
468+
std::cout << "template type: " << template_type.pretty() << "\n\n";
469469
#endif
470470

471471
return new_symb;

src/cpp/cpp_typecheck_compound_type.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -893,8 +893,8 @@ void cpp_typecheckt::typecheck_friend_declaration(
893893
for(auto &sub_it : declaration.declarators())
894894
{
895895
#ifdef DEBUG
896-
std::cout << "decl: " << sub_it->pretty() << "\n with value "
897-
<< sub_it->value().pretty() << '\n';
896+
std::cout << "decl: " << sub_it.pretty() << "\n with value "
897+
<< sub_it.value().pretty() << '\n';
898898
std::cout << " scope: " << cpp_scopes.current_scope().prefix << '\n';
899899
#endif
900900
// In which scope are we going to typecheck this?

src/cpp/cpp_typecheck_resolve.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1413,11 +1413,11 @@ exprt cpp_typecheck_resolvet::resolve(
14131413
resolve_scope(cpp_name, base_name, template_args);
14141414

14151415
#ifdef DEBUG
1416-
std::cout << "base name: " << base_name << std::endl;
1417-
std::cout << "template args: " << template_args << std::endl;
1418-
std::cout << "original-scope: " << original_scope->prefix << std::endl;
1416+
std::cout << "base name: " << base_name << "\n";
1417+
std::cout << "template args: " << template_args.pretty() << "\n";
1418+
std::cout << "original-scope: " << original_scope->prefix << "\n";
14191419
std::cout << "scope: "
1420-
<< cpp_typecheck.cpp_scopes.current_scope().prefix << std::endl;
1420+
<< cpp_typecheck.cpp_scopes.current_scope().prefix << "\n";
14211421
#endif
14221422

14231423
const source_locationt &source_location=cpp_name.source_location();

0 commit comments

Comments
 (0)