You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mesos.apache.org by ya...@apache.org on 2017/10/05 22:27:14 UTC
mesos git commit: Fixed the clang complation problem for the executor
tests.
Repository: mesos
Updated Branches:
refs/heads/1.4.x 26fe45fcd -> 43ca8825a
Fixed the clang complation problem for the executor tests.
It appears that g++ throws away the cv-qualifiers when doing the
lvalue-to-rvalue conversion for lambdas returning strings but clang does
not, so we make `f3` in `THREADSAFE_Executor_Execute` return a
non-constant string.
Review: https://reviews.apache.org/r/62698/
Project: http://git-wip-us.apache.org/repos/asf/mesos/repo
Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/43ca8825
Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/43ca8825
Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/43ca8825
Branch: refs/heads/1.4.x
Commit: 43ca8825a1bef7d2156157cd4dfd361158917aac
Parents: 26fe45f
Author: Chun-Hung Hsiao <ch...@mesosphere.io>
Authored: Fri Sep 29 16:26:00 2017 -0700
Committer: Jiang Yan Xu <xu...@apple.com>
Committed: Thu Oct 5 15:26:05 2017 -0700
----------------------------------------------------------------------
3rdparty/libprocess/src/tests/process_tests.cpp | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/mesos/blob/43ca8825/3rdparty/libprocess/src/tests/process_tests.cpp
----------------------------------------------------------------------
diff --git a/3rdparty/libprocess/src/tests/process_tests.cpp b/3rdparty/libprocess/src/tests/process_tests.cpp
index e494318..952c92c 100644
--- a/3rdparty/libprocess/src/tests/process_tests.cpp
+++ b/3rdparty/libprocess/src/tests/process_tests.cpp
@@ -1273,7 +1273,10 @@ TEST(ProcessTest, THREADSAFE_Executor_Execute)
AWAIT_READY(f2Result.triggered());
// A non-void immutable lambda.
- const string f3Result = "f3";
+ // NOTE: It appears that g++ throws away the cv-qualifiers when doing
+ // the lvalue-to-rvalue conversion for the returned string but clang
+ // does not, so `f3` should return a non-constant string.
+ string f3Result = "f3";
auto f3 = [&f3Result] {
return f3Result;
};