]> granicus.if.org Git - clang/commitdiff
Fix compatibility with z3-4.8.1
authorJan Kratochvil <jan.kratochvil@redhat.com>
Mon, 12 Nov 2018 06:48:02 +0000 (06:48 +0000)
committerJan Kratochvil <jan.kratochvil@redhat.com>
Mon, 12 Nov 2018 06:48:02 +0000 (06:48 +0000)
With z3-4.8.1:
../tools/clang/lib/StaticAnalyzer/Core/Z3ConstraintManager.cpp:49:40: error:
'Z3_get_error_msg_ex' was not declared in this scope
../tools/clang/lib/StaticAnalyzer/Core/Z3ConstraintManager.cpp:49:40: note:
suggested alternative: 'Z3_get_error_msg'

Formerly used Z3_get_error_msg_ex() as one could find in z3-4.7.1 states:
"Retained function name for backwards compatibility within v4.1"
And it is implemented only as a forwarding call:
return Z3_get_error_msg(c, err);

Differential Revision: https://reviews.llvm.org/D54391

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@346635 91177308-0d34-0410-b5e6-96231b3b80d8

lib/StaticAnalyzer/Core/Z3ConstraintManager.cpp

index 028010726a8f448ef0bc026ef061baa444d3abb0..61bba5683579184e02d91f32a057d3e898b54316 100644 (file)
@@ -46,7 +46,7 @@ public:
 // Function used to report errors
 void Z3ErrorHandler(Z3_context Context, Z3_error_code Error) {
   llvm::report_fatal_error("Z3 error: " +
-                           llvm::Twine(Z3_get_error_msg_ex(Context, Error)));
+                           llvm::Twine(Z3_get_error_msg(Context, Error)));
 }
 
 /// Wrapper for Z3 context