summaryrefslogtreecommitdiffstats
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorPavel Labath <labath@google.com>2017-06-22 13:11:50 +0000
committerPavel Labath <labath@google.com>2017-06-22 13:11:50 +0000
commit841b888a685e24020df2d74e51641887957438d9 (patch)
treea7139b1b4d8d16a47b1c0a5c9a1dbcba587a246a /CMakeLists.txt
parent7cbb839d2be6af289da4bbbd7e81c4025b1ace72 (diff)
[Testing/Support] Remove the const_cast in TakeExpected
Summary: The const_cast in the "const" version of TakeExpected was quite dangerous, as the function does indeed modify the apparently const argument. I assume the reason the const overload was added was to make the function bind to xvalues(temporaries). That can be also achieved with rvalue references, so I use that instead. Using the ASSERT macros on const Expected objects will now become illegal, but I believe that is correct, as it is not actually possible to inspect the error stored in an Expected object without modifying it. Reviewers: zturner, chandlerc Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D34405 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@306001 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'CMakeLists.txt')
0 files changed, 0 insertions, 0 deletions