aboutsummaryrefslogtreecommitdiffstats
path: root/SourceReferenceFormatter.cpp
diff options
context:
space:
mode:
authorLiana Husikyan <liana@ethdev.com>2015-05-04 21:46:46 +0800
committerLiana Husikyan <liana@ethdev.com>2015-05-04 23:18:44 +0800
commitebaf3c48a64ce7bbd6643b1d115d1c59005d15ec (patch)
tree5ec4d1a40c99b769ce8127899f5b4031ea0430bc /SourceReferenceFormatter.cpp
parent10c3d7655570277b78912b6ff14b5078fce1077a (diff)
downloaddexon-solidity-ebaf3c48a64ce7bbd6643b1d115d1c59005d15ec.tar
dexon-solidity-ebaf3c48a64ce7bbd6643b1d115d1c59005d15ec.tar.gz
dexon-solidity-ebaf3c48a64ce7bbd6643b1d115d1c59005d15ec.tar.bz2
dexon-solidity-ebaf3c48a64ce7bbd6643b1d115d1c59005d15ec.tar.lz
dexon-solidity-ebaf3c48a64ce7bbd6643b1d115d1c59005d15ec.tar.xz
dexon-solidity-ebaf3c48a64ce7bbd6643b1d115d1c59005d15ec.tar.zst
dexon-solidity-ebaf3c48a64ce7bbd6643b1d115d1c59005d15ec.zip
small fix
Diffstat (limited to 'SourceReferenceFormatter.cpp')
-rw-r--r--SourceReferenceFormatter.cpp30
1 files changed, 18 insertions, 12 deletions
diff --git a/SourceReferenceFormatter.cpp b/SourceReferenceFormatter.cpp
index 87796aa3..e6685135 100644
--- a/SourceReferenceFormatter.cpp
+++ b/SourceReferenceFormatter.cpp
@@ -32,9 +32,11 @@ namespace dev
namespace solidity
{
-void SourceReferenceFormatter::printSourceLocation(ostream& _stream,
- SourceLocation const& _location,
- Scanner const& _scanner)
+void SourceReferenceFormatter::printSourceLocation(
+ ostream& _stream,
+ SourceLocation const& _location,
+ Scanner const& _scanner
+)
{
int startLine;
int startColumn;
@@ -64,9 +66,11 @@ void SourceReferenceFormatter::printSourceLocation(ostream& _stream,
<< "Spanning multiple lines.\n";
}
-void SourceReferenceFormatter::printSourceName(ostream& _stream,
- SourceLocation const& _location,
- Scanner const& _scanner)
+void SourceReferenceFormatter::printSourceName(
+ ostream& _stream,
+ SourceLocation const& _location,
+ Scanner const& _scanner
+)
{
int startLine;
int startColumn;
@@ -74,14 +78,16 @@ void SourceReferenceFormatter::printSourceName(ostream& _stream,
_stream << *_location.sourceName << ":" << (startLine + 1) << ":" << (startColumn + 1) << ": ";
}
-void SourceReferenceFormatter::printExceptionInformation(ostream& _stream,
- Exception const& _exception,
- string const& _name,
- CompilerStack const& _compiler)
+void SourceReferenceFormatter::printExceptionInformation(
+ ostream& _stream,
+ Exception const& _exception,
+ string const& _name,
+ CompilerStack const& _compiler
+)
{
SourceLocation const* location = boost::get_error_info<errinfo_sourceLocation>(_exception);
auto secondarylocation = boost::get_error_info<errinfo_secondarySourceLocation>(_exception);
- Scanner const* scanner;
+ Scanner const* scanner = nullptr;
if (location)
{
@@ -101,7 +107,7 @@ void SourceReferenceFormatter::printExceptionInformation(ostream& _stream,
if (secondarylocation && !secondarylocation->infos.empty())
{
- for(auto info: secondarylocation->infos)
+ for (auto info: secondarylocation->infos)
{
scanner = &_compiler.getScanner(*info.second.sourceName);
_stream << info.first << " ";