Fix up translator style.
Using git cl format.
BUG=angleproject:650
Change-Id: I7d3f98d2b0dcfb0a8de6c35327db74e55c28d761
Reviewed-on: https://chromium-review.googlesource.com/419059
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
diff --git a/src/compiler/translator/Diagnostics.cpp b/src/compiler/translator/Diagnostics.cpp
index 3b41686..a97aa37 100644
--- a/src/compiler/translator/Diagnostics.cpp
+++ b/src/compiler/translator/Diagnostics.cpp
@@ -14,10 +14,8 @@
namespace sh
{
-TDiagnostics::TDiagnostics(TInfoSink& infoSink) :
- mInfoSink(infoSink),
- mNumErrors(0),
- mNumWarnings(0)
+TDiagnostics::TDiagnostics(TInfoSink &infoSink)
+ : mInfoSink(infoSink), mNumErrors(0), mNumWarnings(0)
{
}
@@ -26,32 +24,32 @@
}
void TDiagnostics::writeInfo(Severity severity,
- const pp::SourceLocation& loc,
- const std::string& reason,
- const std::string& token,
- const std::string& extra)
+ const pp::SourceLocation &loc,
+ const std::string &reason,
+ const std::string &token,
+ const std::string &extra)
{
TPrefixType prefix = EPrefixNone;
switch (severity)
{
- case PP_ERROR:
- ++mNumErrors;
- prefix = EPrefixError;
- break;
- case PP_WARNING:
- ++mNumWarnings;
- prefix = EPrefixWarning;
- break;
- default:
- UNREACHABLE();
- break;
+ case PP_ERROR:
+ ++mNumErrors;
+ prefix = EPrefixError;
+ break;
+ case PP_WARNING:
+ ++mNumWarnings;
+ prefix = EPrefixWarning;
+ break;
+ default:
+ UNREACHABLE();
+ break;
}
- TInfoSinkBase& sink = mInfoSink.info;
+ TInfoSinkBase &sink = mInfoSink.info;
/* VC++ format: file(linenum) : error #: 'token' : extrainfo */
sink.prefix(prefix);
sink.location(loc.file, loc.line);
- sink << "'" << token << "' : " << reason << " " << extra << "\n";
+ sink << "'" << token << "' : " << reason << " " << extra << "\n";
}
void TDiagnostics::error(const TSourceLoc &loc,
@@ -76,9 +74,7 @@
writeInfo(pp::Diagnostics::PP_WARNING, srcLoc, reason, token, extraInfo);
}
-void TDiagnostics::print(ID id,
- const pp::SourceLocation& loc,
- const std::string& text)
+void TDiagnostics::print(ID id, const pp::SourceLocation &loc, const std::string &text)
{
writeInfo(severity(id), loc, message(id), text, "");
}