Skip to content
Commit efe4a548 authored by Sam McCall's avatar Sam McCall
Browse files

[Sema] Clean up ActionResult type a little. NFCI

* Document the valid states: invalid/unset/pointer
  (Currently both documentation and implementation strongly suggest that
   pointer+invalid is poissible, when it's not)
* Remove unused set() functions, which had different semantics between the
  compressed/uncompressed specialization! (The former allowing escaping the
  tristate into pointer+invalid)
* Make the compressed specialization's internals directly model the tristate,
  rather than pretending pointer + invalid were independent.
* Make members of each version identical where possible, remove repetition
* fix operator= accidentally returning a const reference
* Fix indentation :-)

This was motivated by D157868, in which an experienced clang dev was
confused about the possible states for ExprResult - and I vividly
remember getting very confused about this myself.

Differential Revision: https://reviews.llvm.org/D158093
parent 4cd1c074
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment