Remove the DeclaredInCondition bit now that it's no longer used.

llvm-svn: 110432
This commit is contained in:
Nick Lewycky 2010-08-06 05:43:55 +00:00
parent 66ce9651f1
commit 60ecc522e0
5 changed files with 1 additions and 24 deletions

View File

@ -561,10 +561,6 @@ private:
bool ThreadSpecified : 1;
bool HasCXXDirectInit : 1;
/// DeclaredInCondition - Whether this variable was declared in a
/// condition, e.g., if (int x = foo()) { ... }.
bool DeclaredInCondition : 1;
/// \brief Whether this variable is the exception variable in a C++ catch
/// or an Objective-C @catch statement.
bool ExceptionVar : 1;
@ -580,7 +576,7 @@ protected:
StorageClass SCAsWritten)
: DeclaratorDecl(DK, DC, L, Id, T, TInfo), Init(),
ThreadSpecified(false), HasCXXDirectInit(false),
DeclaredInCondition(false), ExceptionVar(false), NRVOVariable(false) {
ExceptionVar(false), NRVOVariable(false) {
SClass = SC;
SClassAsWritten = SCAsWritten;
}
@ -902,18 +898,6 @@ public:
return HasCXXDirectInit;
}
/// isDeclaredInCondition - Whether this variable was declared as
/// part of a condition in an if/switch/while statement, e.g.,
/// @code
/// if (int x = foo()) { ... }
/// @endcode
bool isDeclaredInCondition() const {
return DeclaredInCondition;
}
void setDeclaredInCondition(bool InCondition) {
DeclaredInCondition = InCondition;
}
/// \brief Determine whether this variable is the exception variable in a
/// C++ catch statememt or an Objective-C @catch statement.
bool isExceptionVariable() const {

View File

@ -546,7 +546,6 @@ void PCHDeclReader::VisitVarDecl(VarDecl *VD) {
VD->setStorageClassAsWritten((VarDecl::StorageClass)Record[Idx++]);
VD->setThreadSpecified(Record[Idx++]);
VD->setCXXDirectInitializer(Record[Idx++]);
VD->setDeclaredInCondition(Record[Idx++]);
VD->setExceptionVariable(Record[Idx++]);
VD->setNRVOVariable(Record[Idx++]);
VisitRedeclarable(VD);

View File

@ -498,7 +498,6 @@ void PCHDeclWriter::VisitVarDecl(VarDecl *D) {
Record.push_back(D->getStorageClassAsWritten());
Record.push_back(D->isThreadSpecified());
Record.push_back(D->hasCXXDirectInitializer());
Record.push_back(D->isDeclaredInCondition());
Record.push_back(D->isExceptionVariable());
Record.push_back(D->isNRVOVariable());
VisitRedeclarable(D);
@ -554,7 +553,6 @@ void PCHDeclWriter::VisitParmVarDecl(ParmVarDecl *D) {
assert(!D->isInvalidDecl() && "Shouldn't emit invalid decls");
assert(!D->isThreadSpecified() && "PARM_VAR_DECL can't be __thread");
assert(D->getAccess() == AS_none && "PARM_VAR_DECL can't be public/private");
assert(!D->isDeclaredInCondition() && "PARM_VAR_DECL can't be in condition");
assert(!D->isExceptionVariable() && "PARM_VAR_DECL can't be exception var");
assert(D->getPreviousDeclaration() == 0 && "PARM_VAR_DECL can't be redecl");
assert(!D->isStaticDataMember() &&
@ -1091,7 +1089,6 @@ void PCHWriter::WriteDeclsBlockAbbrevs() {
Abv->Add(BitCodeAbbrevOp(0)); // StorageClassAsWritten
Abv->Add(BitCodeAbbrevOp(0)); // isThreadSpecified
Abv->Add(BitCodeAbbrevOp(0)); // hasCXXDirectInitializer
Abv->Add(BitCodeAbbrevOp(0)); // isDeclaredInCondition
Abv->Add(BitCodeAbbrevOp(0)); // isExceptionVariable
Abv->Add(BitCodeAbbrevOp(0)); // isNRVOVariable
Abv->Add(BitCodeAbbrevOp(0)); // PrevDecl

View File

@ -6647,8 +6647,6 @@ Sema::ActOnCXXConditionDeclaration(Scope *S, Declarator &D) {
if (!Dcl)
return DeclResult();
VarDecl *VD = cast<VarDecl>(Dcl.getAs<Decl>());
VD->setDeclaredInCondition(true);
return Dcl;
}

View File

@ -362,7 +362,6 @@ Decl *TemplateDeclInstantiator::VisitVarDecl(VarDecl *D) {
D->getStorageClassAsWritten());
Var->setThreadSpecified(D->isThreadSpecified());
Var->setCXXDirectInitializer(D->hasCXXDirectInitializer());
Var->setDeclaredInCondition(D->isDeclaredInCondition());
// Substitute the nested name specifier, if any.
if (SubstQualifier(D, Var))