Refactor location tracking.
R=kbr@chromium.org
Review URL: https://codereview.appspot.com/9078046
git-svn-id: https://angleproject.googlecode.com/svn/trunk@2202 736b8ea6-26fd-11df-bfd4-992fa37f6226
TRAC #23333
Authored-by: alokp@chromium.org
Signed-off-by: Shannon Woods
Signed-off-by Nicolas Capens
Merged-by: Jamie Madill
diff --git a/src/compiler/parseConst.cpp b/src/compiler/parseConst.cpp
index 09f6e2b..fd2af0e 100644
--- a/src/compiler/parseConst.cpp
+++ b/src/compiler/parseConst.cpp
@@ -61,7 +61,7 @@
void TConstTraverser::visitSymbol(TIntermSymbol* node)
{
- infoSink.info.message(EPrefixInternalError, "Symbol Node found in constant constructor", node->getLine());
+ infoSink.info.message(EPrefixInternalError, node->getLine(), "Symbol Node found in constant constructor");
return;
}
@@ -74,12 +74,12 @@
TString buf;
buf.append("'constructor' : assigning non-constant to ");
buf.append(type.getCompleteString());
- infoSink.info.message(EPrefixError, buf.c_str(), node->getLine());
+ infoSink.info.message(EPrefixError, node->getLine(), buf.c_str());
error = true;
return false;
}
- infoSink.info.message(EPrefixInternalError, "Binary Node found in constant constructor", node->getLine());
+ infoSink.info.message(EPrefixInternalError, node->getLine(), "Binary Node found in constant constructor");
return false;
}
@@ -89,7 +89,7 @@
TString buf;
buf.append("'constructor' : assigning non-constant to ");
buf.append(type.getCompleteString());
- infoSink.info.message(EPrefixError, buf.c_str(), node->getLine());
+ infoSink.info.message(EPrefixError, node->getLine(), buf.c_str());
error = true;
return false;
}
@@ -100,7 +100,7 @@
TString buf;
buf.append("'constructor' : assigning non-constant to ");
buf.append(type.getCompleteString());
- infoSink.info.message(EPrefixError, buf.c_str(), node->getLine());
+ infoSink.info.message(EPrefixError, node->getLine(), buf.c_str());
error = true;
return false;
}
@@ -146,7 +146,7 @@
bool TConstTraverser::visitSelection(Visit visit, TIntermSelection* node)
{
- infoSink.info.message(EPrefixInternalError, "Selection Node found in constant constructor", node->getLine());
+ infoSink.info.message(EPrefixInternalError, node->getLine(), "Selection Node found in constant constructor");
error = true;
return false;
}
@@ -219,14 +219,14 @@
bool TConstTraverser::visitLoop(Visit visit, TIntermLoop* node)
{
- infoSink.info.message(EPrefixInternalError, "Loop Node found in constant constructor", node->getLine());
+ infoSink.info.message(EPrefixInternalError, node->getLine(), "Loop Node found in constant constructor");
error = true;
return false;
}
bool TConstTraverser::visitBranch(Visit visit, TIntermBranch* node)
{
- infoSink.info.message(EPrefixInternalError, "Branch Node found in constant constructor", node->getLine());
+ infoSink.info.message(EPrefixInternalError, node->getLine(), "Branch Node found in constant constructor");
error = true;
return false;
}
@@ -236,7 +236,7 @@
// Individual functions can be initialized to 0 to skip processing of that
// type of node. It's children will still be processed.
//
-bool TIntermediate::parseConstTree(TSourceLoc line, TIntermNode* root, ConstantUnion* unionArray, TOperator constructorType, TType t, bool singleConstantParam)
+bool TIntermediate::parseConstTree(const TSourceLoc& line, TIntermNode* root, ConstantUnion* unionArray, TOperator constructorType, TType t, bool singleConstantParam)
{
if (root == 0)
return false;