clang-metatool
A framework for reusing code in clang tools
|
#include <clangmetatool/propagation/propagation_result.h>
Public Member Functions | |
PropagationResult () | |
PropagationResult (const ResultType &result) | |
bool | isUnresolved () const |
const ResultType & | getResult () const |
void | print (std::ostream &stream) const |
bool | operator< (const PropagationResult< ResultType > &rhs) const |
bool | operator== (const PropagationResult< ResultType > &rhs) const |
bool | operator!= (const PropagationResult< ResultType > &rhs) const |
Type to represent the result in propagation, since a value may either be unresolved in the case that it's value at some point in the code is non-deterministic, or it may have a deterministic value
Definition at line 15 of file propagation_result.h.
|
inline |
Default constructor to produce an unresolved value
Definition at line 24 of file propagation_result.h.
|
inline |
Constructor taking ResultType to produce a resolved value
Definition at line 29 of file propagation_result.h.
|
inline |
Get the resolved result.
Calling this function before the result has been determined to indeed be resolved with a call to isUnresolved()
is undefined behaviour.
Definition at line 43 of file propagation_result.h.
|
inline |
Check if the result is unresolved.
Definition at line 35 of file propagation_result.h.
|
inline |
Definition at line 70 of file propagation_result.h.
|
inline |
Definition at line 58 of file propagation_result.h.
|
inline |
Definition at line 61 of file propagation_result.h.
|
inline |
Print the result to a stream.
When the result is undefined, it will output "<UNRESOLVED>".
Definition at line 50 of file propagation_result.h.