Lines Matching full:scope
1 //===- Scope.cpp - Lexical scope information --------------------*- C++ -*-===//
9 // This file implements the Scope class, which is used for recording
10 // information about a lexical scope.
14 #include "clang/Sema/Scope.h"
20 void Scope::setFlags(Scope *parent, unsigned flags) {
61 // If this scope is a function or contains breaks/continues, remember it.
75 // If this is a prototype scope, record that. Lambdas have an extra prototype
76 // scope that doesn't add any depth.
95 void Scope::Init(Scope *parent, unsigned flags) {
105 bool Scope::containedInPrototypeScope() const {
106 const Scope *S = this;
115 void Scope::AddFlags(unsigned FlagsToSet) {
117 "Unsupported scope flags");
133 // scope and in outer scopes.
136 void Scope::updateNRVOCandidate(VarDecl *VD) {
137 auto UpdateReturnSlotsInScopeForVD = [VD](Scope *S) -> bool {
142 // slot in the same scope.
161 // for it in the current scope, or if it can be available in outer scopes.
165 void Scope::applyNRVO() {
166 // There is no NRVO candidate in the current scope.
173 // It's necessary to propagate NRVO candidate to the parent scope for cases
174 // when the parent scope doesn't contain a return statement.
183 // allowed in this scope.
196 LLVM_DUMP_METHOD void Scope::dump() const { dumpImpl(llvm::errs()); }
198 void Scope::dumpImpl(raw_ostream &OS) const {
248 assert(Flags == 0 && "Unknown scope flags");
253 if (const Scope *Parent = getParent())
254 OS << "Parent: (clang::Scope*)" << Parent << '\n';