ConstructionContext.h (341825) | ConstructionContext.h (344779) |
---|---|
1//===- ConstructionContext.h - CFG constructor information ------*- C++ -*-===// 2// 3// The LLVM Compiler Infrastructure 4// 5// This file is distributed under the University of Illinois Open Source 6// License. See LICENSE.TXT for details. 7// 8//===----------------------------------------------------------------------===// --- 5 unchanged lines hidden (view full) --- 14// 15//===----------------------------------------------------------------------===// 16 17#ifndef LLVM_CLANG_ANALYSIS_CONSTRUCTIONCONTEXT_H 18#define LLVM_CLANG_ANALYSIS_CONSTRUCTIONCONTEXT_H 19 20#include "clang/Analysis/Support/BumpVector.h" 21#include "clang/AST/ExprCXX.h" | 1//===- ConstructionContext.h - CFG constructor information ------*- C++ -*-===// 2// 3// The LLVM Compiler Infrastructure 4// 5// This file is distributed under the University of Illinois Open Source 6// License. See LICENSE.TXT for details. 7// 8//===----------------------------------------------------------------------===// --- 5 unchanged lines hidden (view full) --- 14// 15//===----------------------------------------------------------------------===// 16 17#ifndef LLVM_CLANG_ANALYSIS_CONSTRUCTIONCONTEXT_H 18#define LLVM_CLANG_ANALYSIS_CONSTRUCTIONCONTEXT_H 19 20#include "clang/Analysis/Support/BumpVector.h" 21#include "clang/AST/ExprCXX.h" |
22#include "clang/AST/ExprObjC.h" |
|
22 23namespace clang { 24 25/// Represents a single point (AST node) in the program that requires attention 26/// during construction of an object. ConstructionContext would be represented 27/// as a list of such items. 28class ConstructionContextItem { 29public: --- 588 unchanged lines hidden (view full) --- 618 const CXXBindTemporaryExpr *getCXXBindTemporaryExpr() const { return BTE; } 619 620 static bool classof(const ConstructionContext *CC) { 621 return CC->getKind() == CXX17ElidedCopyReturnedValueKind; 622 } 623}; 624 625class ArgumentConstructionContext : public ConstructionContext { | 23 24namespace clang { 25 26/// Represents a single point (AST node) in the program that requires attention 27/// during construction of an object. ConstructionContext would be represented 28/// as a list of such items. 29class ConstructionContextItem { 30public: --- 588 unchanged lines hidden (view full) --- 619 const CXXBindTemporaryExpr *getCXXBindTemporaryExpr() const { return BTE; } 620 621 static bool classof(const ConstructionContext *CC) { 622 return CC->getKind() == CXX17ElidedCopyReturnedValueKind; 623 } 624}; 625 626class ArgumentConstructionContext : public ConstructionContext { |
626 const Expr *CE; // The call of which the context is an argument. 627 unsigned Index; // Which argument we're constructing. 628 const CXXBindTemporaryExpr *BTE; // Whether the object needs to be destroyed. | 627 // The call of which the context is an argument. 628 const Expr *CE; |
629 | 629 |
630 // Which argument we're constructing. Note that when numbering between 631 // arguments and parameters is inconsistent (eg., operator calls), 632 // this is the index of the argument, not of the parameter. 633 unsigned Index; 634 635 // Whether the object needs to be destroyed. 636 const CXXBindTemporaryExpr *BTE; 637 |
|
630 friend class ConstructionContext; // Allows to create<>() itself. 631 632 explicit ArgumentConstructionContext(const Expr *CE, unsigned Index, 633 const CXXBindTemporaryExpr *BTE) 634 : ConstructionContext(ArgumentKind), CE(CE), 635 Index(Index), BTE(BTE) { 636 assert(isa<CallExpr>(CE) || isa<CXXConstructExpr>(CE) || 637 isa<ObjCMessageExpr>(CE)); --- 16 unchanged lines hidden --- | 638 friend class ConstructionContext; // Allows to create<>() itself. 639 640 explicit ArgumentConstructionContext(const Expr *CE, unsigned Index, 641 const CXXBindTemporaryExpr *BTE) 642 : ConstructionContext(ArgumentKind), CE(CE), 643 Index(Index), BTE(BTE) { 644 assert(isa<CallExpr>(CE) || isa<CXXConstructExpr>(CE) || 645 isa<ObjCMessageExpr>(CE)); --- 16 unchanged lines hidden --- |