aboutsummaryrefslogtreecommitdiff
path: root/lib/AST/ExprConstant.cpp
diff options
context:
space:
mode:
authorDan Gohman <gohman@apple.com>2010-07-26 21:25:24 +0000
committerDan Gohman <gohman@apple.com>2010-07-26 21:25:24 +0000
commit3c46e8db99196179b30e7ac5c20c4efd5f3926d7 (patch)
tree2ef91bba064f8fe40b467e2dd0134f08eef99a5c /lib/AST/ExprConstant.cpp
parent1890eb81a6ad9df6dee4d54d5031e1ea5c6e9ce7 (diff)
Fix namespace polution.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109440 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/AST/ExprConstant.cpp')
-rw-r--r--lib/AST/ExprConstant.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/AST/ExprConstant.cpp b/lib/AST/ExprConstant.cpp
index 3c97420332..b74b327c9c 100644
--- a/lib/AST/ExprConstant.cpp
+++ b/lib/AST/ExprConstant.cpp
@@ -2321,6 +2321,8 @@ APSInt Expr::EvaluateAsInt(ASTContext &Ctx) const {
// the comma operator in C99 mode.
// 2: This expression is not an ICE, and is not a legal subexpression for one.
+namespace {
+
struct ICEDiag {
unsigned Val;
SourceLocation Loc;
@@ -2330,7 +2332,9 @@ struct ICEDiag {
ICEDiag() : Val(0) {}
};
-ICEDiag NoDiag() { return ICEDiag(); }
+}
+
+static ICEDiag NoDiag() { return ICEDiag(); }
static ICEDiag CheckEvalInICE(const Expr* E, ASTContext &Ctx) {
Expr::EvalResult EVResult;