staticmembers
cpp.StaticMembers.first
Section titled “cpp.StaticMembers.first”def StaticMembers.first {A : Type} (found : List (Option A)) : Option AThe first of the values found.
cpp.StaticMembers.anyNamed
Section titled “cpp.StaticMembers.anyNamed”def StaticMembers.anyNamed (cs : List ClassMembers) (name : String) : BoolWhether some class has a static member by a name (before checking an object for one).
cpp.StaticMembers.named
Section titled “cpp.StaticMembers.named”def StaticMembers.named (fuel : Nat) (cs : List ClassMembers) (x : String) (name : String) : Option (String * StaticMember)The static member a class has by a name, its own or a base’s (the class it belongs to with it).
cpp.StaticMembers.lowered
Section titled “cpp.StaticMembers.lowered”def StaticMembers.lowered (cs : List ClassMembers) (lowered : String) : Option (String * StaticMember)The static member a declaration or a function is lowered from, with its class.
cpp.StaticMembers.checked
Section titled “cpp.StaticMembers.checked”def StaticMembers.checked (g : Globals Cpp.constructs) (n : NodeId) (lowered : String) : Option (CheckResult Cpp.constructs (Lifted Cpp.constructs))A use of a static member rejected when the function being checked may not use it.
cpp.StaticMembers.through
Section titled “cpp.StaticMembers.through”def StaticMembers.through (checker : Checker Cpp.constructs) (asLvalue : Bool) (g : Globals Cpp.constructs) (env : Env Cpp.constructs) (n : NodeId) (o : Expr) (arrow : Bool) (name : String) (use : String -> Expr) : Option (CheckResult Cpp.constructs (Lifted Cpp.constructs))A static member through an object, as the object evaluated and then the member (use makes it from what the
member is lowered to), as an lvalue or not; none when the object’s class has no static member by the name.
cpp.StaticMembers.unmodeled
Section titled “cpp.StaticMembers.unmodeled”def StaticMembers.unmodeled (n : NodeId) (name : String) (owner : String) (member : String) : Option (CheckResult Cpp.constructs (Lifted Cpp.constructs))A name written through a standard class (owner), at n, that the class as modeled does not declare: the model
has the members programs have needed, not all of the standard’s, so this is not the program’s error. A constant of the
headers’ table (std::string::npos) goes on to the core, which has it; any other is not provided.
member is the name as written after the class.
cpp.StaticMembers.missing
Section titled “cpp.StaticMembers.missing”def StaticMembers.missing (g : Globals Cpp.constructs) (n : NodeId) (name : String) : Option (CheckResult Cpp.constructs (Lifted Cpp.constructs))A name written through a class the program has that nothing declares (C::m, ns::D::m, which a front end
that leaves names to Cella sends as it is written), at n: the class has no member by that name
([expr.prim.id.qual]p2, the name is looked up in the class), rejected as clang says it; none when the part before the
last :: is not such a class, or the class has a member by that name (used where it may not be: the checker’s other
words). The classes are g’s.
cpp.StaticMembers.expression
Section titled “cpp.StaticMembers.expression”def StaticMembers.expression (checker : Checker Cpp.constructs) (asLvalue : Bool) (g : Globals Cpp.constructs) (env : Env Cpp.constructs) (e : Expr) : Option (CheckResult Cpp.constructs (Lifted Cpp.constructs))A use of a static member (as an lvalue or not): its access checked by name, its object evaluated through an
object; a name written through a class that has no member by it rejected (StaticMembers.missing).
cpp.StaticMembers.call
Section titled “cpp.StaticMembers.call”def StaticMembers.call (g : Globals Cpp.constructs) (n : NodeId) (f : String) : Option (CheckResult Cpp.constructs (Lifted Cpp.constructs))A call of a static member function by name, its access checked (a call statement is not an expression).