Skip to content

Commit a67c62b

Browse files
committed
Whitespace cleanup, comment type fixed
1 parent 5c14d09 commit a67c62b

4 files changed

+9
-10
lines changed

src/cpp/cpp_constructor.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ codet cpp_typecheckt::cpp_constructor(
4141
{
4242
// We allow only one operand and it must be tagged with '#array_ini'.
4343
// Note that the operand is an array that is used for copy-initialization.
44-
// In the general case, a program is not allow to use this form of
44+
// In the general case, a program is not allowed to use this form of
4545
// construct. This way of initializing an array is used internally only.
4646
// The purpose of the tag #array_ini is to rule out ill-formed
4747
// programs.

src/cpp/cpp_declarator_converter.cpp

-1
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,6 @@ symbolt &cpp_declarator_convertert::convert(
4444
typet type;
4545
type.swap(declarator.name().get_sub().back());
4646
declarator.type().subtype()=type;
47-
std::string tmp;
4847
cpp_typecheck.typecheck_type(type);
4948
irept name(ID_name);
5049
name.set(ID_identifier, "("+cpp_type2name(type)+")");

src/cpp/cpp_instantiate_template.cpp

+5-5
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,7 @@ const symbolt &cpp_typecheckt::instantiate_template(
225225
const typet &specialization)
226226
{
227227
#ifdef DEBUG
228-
std::cout << "instantiate_template: " << template_symbol.name << std::endl;
228+
std::cout << "instantiate_template: " << template_symbol.name << '\n';
229229
#endif
230230

231231
if(instantiation_stack.size()==MAX_DEPTH)
@@ -386,7 +386,7 @@ const symbolt &cpp_typecheckt::instantiate_template(
386386
}
387387

388388
#ifdef DEBUG
389-
std::cout << "CLASS MAP:" << std::endl;
389+
std::cout << "CLASS MAP:\n";
390390
template_map.print(std::cout);
391391
#endif
392392

@@ -445,7 +445,7 @@ const symbolt &cpp_typecheckt::instantiate_template(
445445
// mapping from template arguments to values/types
446446
template_map.build(method_type, specialization_template_args);
447447
#ifdef DEBUG
448-
std::cout << "METHOD MAP:" << std::endl;
448+
std::cout << "METHOD MAP:\n";
449449
template_map.print(std::cout);
450450
#endif
451451

@@ -464,8 +464,8 @@ const symbolt &cpp_typecheckt::instantiate_template(
464464
new_symb.type.set(ID_C_template_arguments, specialization_template_args);
465465

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

471471
return new_symb;

src/cpp/cpp_typecheck_compound_type.cpp

+3-3
Original file line numberDiff line numberDiff line change
@@ -887,15 +887,15 @@ void cpp_typecheckt::typecheck_friend_declaration(
887887
// Do the declarators.
888888

889889
#ifdef DEBUG
890-
std::cout << "friend declaration: " << declaration.pretty() << std::endl;
890+
std::cout << "friend declaration: " << declaration.pretty() << '\n';
891891
#endif
892892

893893
for(auto &sub_it : declaration.declarators())
894894
{
895895
#ifdef DEBUG
896896
std::cout << "decl: " << sub_it->pretty() << "\n with value "
897-
<< sub_it->value().pretty() << std::endl;
898-
std::cout << " scope: " << cpp_scopes.current_scope().prefix << std::endl;
897+
<< sub_it->value().pretty() << '\n';
898+
std::cout << " scope: " << cpp_scopes.current_scope().prefix << '\n';
899899
#endif
900900
// In which scope are we going to typecheck this?
901901
#if 0

0 commit comments

Comments
 (0)