Merge remote-tracking branch 'origin/swift-4.1-branch' into stable
diff --git a/docs/ReleaseNotes.rst b/docs/ReleaseNotes.rst
index d6bc7d1..982abb0 100644
--- a/docs/ReleaseNotes.rst
+++ b/docs/ReleaseNotes.rst
@@ -200,7 +200,13 @@
Static Analyzer
---------------
-...
+- The static analyzer now supports using the
+ `z3 theorem prover <https://github.com/z3prover/z3>`_ from Microsoft Research
+ as an external constraint solver. This allows reasoning over more complex
+ queries, but performance is ~15x slower than the default range-based
+ constraint solver. To enable the z3 solver backend, clang must be built with
+ the ``CLANG_ANALYZER_BUILD_Z3=ON`` option, and the
+ ``-Xanalyzer -analyzer-constraints=z3`` arguments passed at runtime.
Undefined Behavior Sanitizer (UBSan)
------------------------------------
@@ -240,8 +246,20 @@
Python Binding Changes
----------------------
+Python bindings now support both Python 2 and Python 3.
+
The following methods have been added:
+- ``is_scoped_enum`` has been added to ``Cursor``.
+
+- ``exception_specification_kind`` has been added to ``Cursor``.
+
+- ``get_address_space`` has been added to ``Type``.
+
+- ``get_typedef_name`` has been added to ``Type``.
+
+- ``get_exception_specification_kind`` has been added to ``Type``.
+
- ...
Significant Known Problems
diff --git a/lib/AST/ExprConstant.cpp b/lib/AST/ExprConstant.cpp
index 0c0c861..a26b608 100644
--- a/lib/AST/ExprConstant.cpp
+++ b/lib/AST/ExprConstant.cpp
@@ -9788,6 +9788,8 @@
bool Success(const APValue &V, const Expr *e) { return true; }
+ bool ZeroInitialization(const Expr *E) { return true; }
+
bool VisitCastExpr(const CastExpr *E) {
switch (E->getCastKind()) {
default:
diff --git a/test/SemaCXX/constant-expression-cxx1y.cpp b/test/SemaCXX/constant-expression-cxx1y.cpp
index ac4e0fd..0c0cb0e 100644
--- a/test/SemaCXX/constant-expression-cxx1y.cpp
+++ b/test/SemaCXX/constant-expression-cxx1y.cpp
@@ -982,3 +982,9 @@
int *p = &n;
p += (__int128)(unsigned long)-1; // expected-note {{cannot refer to element 18446744073709551615 of non-array object in a constant expression}}
}
+
+constexpr void Void(int n) {
+ void(n + 1);
+ void();
+}
+constexpr int void_test = (Void(0), 1);