summaryrefslogtreecommitdiffstats
path: root/clang
diff options
context:
space:
mode:
authorNick Lewycky <nicholas@mxc.ca>2010-08-06 05:43:55 +0000
committerNick Lewycky <nicholas@mxc.ca>2010-08-06 05:43:55 +0000
commit60ecc522e0db0ffc32f15f366af8d81d5a9ac14c (patch)
tree4f3571e342d74060b2768366611f42f0829a69fa /clang
parent66ce9651f1ecd959d49ea5541315434b64acca25 (diff)
downloadbcm5719-llvm-60ecc522e0db0ffc32f15f366af8d81d5a9ac14c.tar.gz
bcm5719-llvm-60ecc522e0db0ffc32f15f366af8d81d5a9ac14c.zip
Remove the DeclaredInCondition bit now that it's no longer used.
llvm-svn: 110432
Diffstat (limited to 'clang')
-rw-r--r--clang/include/clang/AST/Decl.h18
-rw-r--r--clang/lib/Frontend/PCHReaderDecl.cpp1
-rw-r--r--clang/lib/Frontend/PCHWriterDecl.cpp3
-rw-r--r--clang/lib/Sema/SemaDeclCXX.cpp2
-rw-r--r--clang/lib/Sema/SemaTemplateInstantiateDecl.cpp1
5 files changed, 1 insertions, 24 deletions
diff --git a/clang/include/clang/AST/Decl.h b/clang/include/clang/AST/Decl.h
index 1a6c5833fff..b2f0e482044 100644
--- a/clang/include/clang/AST/Decl.h
+++ b/clang/include/clang/AST/Decl.h
@@ -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 {
diff --git a/clang/lib/Frontend/PCHReaderDecl.cpp b/clang/lib/Frontend/PCHReaderDecl.cpp
index a6a68d94250..4b6bde7b19d 100644
--- a/clang/lib/Frontend/PCHReaderDecl.cpp
+++ b/clang/lib/Frontend/PCHReaderDecl.cpp
@@ -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);
diff --git a/clang/lib/Frontend/PCHWriterDecl.cpp b/clang/lib/Frontend/PCHWriterDecl.cpp
index a3d47bba585..46af8e5836c 100644
--- a/clang/lib/Frontend/PCHWriterDecl.cpp
+++ b/clang/lib/Frontend/PCHWriterDecl.cpp
@@ -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
diff --git a/clang/lib/Sema/SemaDeclCXX.cpp b/clang/lib/Sema/SemaDeclCXX.cpp
index bd7c47683ef..c5705dfa9e7 100644
--- a/clang/lib/Sema/SemaDeclCXX.cpp
+++ b/clang/lib/Sema/SemaDeclCXX.cpp
@@ -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;
}
diff --git a/clang/lib/Sema/SemaTemplateInstantiateDecl.cpp b/clang/lib/Sema/SemaTemplateInstantiateDecl.cpp
index ad96d7ae4e0..8e184f15144 100644
--- a/clang/lib/Sema/SemaTemplateInstantiateDecl.cpp
+++ b/clang/lib/Sema/SemaTemplateInstantiateDecl.cpp
@@ -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))
OpenPOWER on IntegriCloud