forked from OSchip/llvm-project
parent
73b5b5adae
commit
37e663df63
|
@ -377,8 +377,8 @@ StaticAssertDecl::~StaticAssertDecl() {
|
||||||
|
|
||||||
CXXTempVarDecl *CXXTempVarDecl::Create(ASTContext &C, DeclContext *DC,
|
CXXTempVarDecl *CXXTempVarDecl::Create(ASTContext &C, DeclContext *DC,
|
||||||
QualType T) {
|
QualType T) {
|
||||||
assert(T->isDependentType() ||
|
assert((T->isDependentType() ||
|
||||||
isa<CXXRecordDecl>(T->getAsRecordType()->getDecl()) &&
|
isa<CXXRecordDecl>(T->getAsRecordType()->getDecl())) &&
|
||||||
"CXXTempVarDecl must either have a dependent type "
|
"CXXTempVarDecl must either have a dependent type "
|
||||||
"or a C++ record type!");
|
"or a C++ record type!");
|
||||||
return new (C) CXXTempVarDecl(DC, T);
|
return new (C) CXXTempVarDecl(DC, T);
|
||||||
|
|
|
@ -268,7 +268,7 @@ void CXXConstructExpr::Destroy(ASTContext &C) {
|
||||||
}
|
}
|
||||||
|
|
||||||
CXXDestroyExpr *CXXDestroyExpr::Create(ASTContext &C, VarDecl *vd) {
|
CXXDestroyExpr *CXXDestroyExpr::Create(ASTContext &C, VarDecl *vd) {
|
||||||
assert(vd->getKind() == Decl::CXXTempVar || vd->getKind() == Decl::Var &&
|
assert((vd->getKind() == Decl::CXXTempVar || vd->getKind() == Decl::Var) &&
|
||||||
"Can only create a destroy expr with a temp var decl or a var decl!");
|
"Can only create a destroy expr with a temp var decl or a var decl!");
|
||||||
|
|
||||||
return new (C) CXXDestroyExpr(vd, C.VoidTy);
|
return new (C) CXXDestroyExpr(vd, C.VoidTy);
|
||||||
|
|
|
@ -311,7 +311,7 @@ void TokenLexer::Lex(Token &Tok) {
|
||||||
bool TokenIsFromPaste = false;
|
bool TokenIsFromPaste = false;
|
||||||
|
|
||||||
// If this token is followed by a token paste (##) operator, paste the tokens!
|
// If this token is followed by a token paste (##) operator, paste the tokens!
|
||||||
if (!isAtEnd() && Tokens[CurToken].is(tok::hashhash))
|
if (!isAtEnd() && Tokens[CurToken].is(tok::hashhash)) {
|
||||||
if (PasteTokens(Tok)) {
|
if (PasteTokens(Tok)) {
|
||||||
// When handling the microsoft /##/ extension, the final token is
|
// When handling the microsoft /##/ extension, the final token is
|
||||||
// returned by PasteTokens, not the pasted token.
|
// returned by PasteTokens, not the pasted token.
|
||||||
|
@ -319,7 +319,7 @@ void TokenLexer::Lex(Token &Tok) {
|
||||||
} else {
|
} else {
|
||||||
TokenIsFromPaste = true;
|
TokenIsFromPaste = true;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// The token's current location indicate where the token was lexed from. We
|
// The token's current location indicate where the token was lexed from. We
|
||||||
// need this information to compute the spelling of the token, but any
|
// need this information to compute the spelling of the token, but any
|
||||||
|
|
Loading…
Reference in New Issue