Reinstate 347294 with a fix for the failures.
EvaluateAsInt() is sometimes called in a constant context. When that's the
case, we need to specify it as so.
llvm-svn: 347364
diff --git a/clang/lib/Sema/SemaOverload.cpp b/clang/lib/Sema/SemaOverload.cpp
index ba4b67a..f36668f 100644
--- a/clang/lib/Sema/SemaOverload.cpp
+++ b/clang/lib/Sema/SemaOverload.cpp
@@ -5469,7 +5469,7 @@
if (Notes.empty()) {
// It's a constant expression.
- return new (S.Context) ConstantExpr(Result.get());
+ return ConstantExpr::Create(S.Context, Result.get());
}
}