]> granicus.if.org Git - clang/commitdiff
Remove DeclSpec::Invalid, a recently added bool that allowed the parser to detect...
authorSteve Naroff <snaroff@apple.com>
Thu, 14 Feb 2008 03:30:24 +0000 (03:30 +0000)
committerSteve Naroff <snaroff@apple.com>
Thu, 14 Feb 2008 03:30:24 +0000 (03:30 +0000)
For now, we will stick with the original strategy - clients of Parse::ParseDeclarationSpecifiers() should never have to know this.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47104 91177308-0d34-0410-b5e6-96231b3b80d8

Parse/DeclSpec.cpp
include/clang/Parse/DeclSpec.h

index 8f9a5fd79195cae3bc07e7c9530512c81ede996b..1cd350893f4425fc7cd146c15744d09335d82cfe 100644 (file)
@@ -48,13 +48,11 @@ const char *DeclSpec::getSpecifierName(DeclSpec::SCS S) {
 }
 
 bool DeclSpec::BadSpecifier(SCS S, const char *&PrevSpec) {
-  Invalid = true;
   PrevSpec = getSpecifierName(S);
   return true;
 }
 
 bool DeclSpec::BadSpecifier(TSW W, const char *&PrevSpec) {
-  Invalid = true;
   switch (W) {
   case TSW_unspecified: PrevSpec = "unspecified"; break;
   case TSW_short:       PrevSpec = "short"; break;
@@ -65,7 +63,6 @@ bool DeclSpec::BadSpecifier(TSW W, const char *&PrevSpec) {
 }
 
 bool DeclSpec::BadSpecifier(TSC C, const char *&PrevSpec) {
-  Invalid = true;
   switch (C) {
   case TSC_unspecified: PrevSpec = "unspecified"; break;
   case TSC_imaginary:   PrevSpec = "imaginary"; break;
@@ -76,7 +73,6 @@ bool DeclSpec::BadSpecifier(TSC C, const char *&PrevSpec) {
 
 
 bool DeclSpec::BadSpecifier(TSS S, const char *&PrevSpec) {
-  Invalid = true;
   switch (S) {
   case TSS_unspecified: PrevSpec = "unspecified"; break;
   case TSS_signed:      PrevSpec = "signed"; break;
@@ -108,13 +104,11 @@ const char *DeclSpec::getSpecifierName(DeclSpec::TST T) {
 }
 
 bool DeclSpec::BadSpecifier(TST T, const char *&PrevSpec) {
-  Invalid = true;
   PrevSpec = getSpecifierName(T);
   return true;
 }
 
 bool DeclSpec::BadSpecifier(TQ T, const char *&PrevSpec) {
-  Invalid = true;
   switch (T) {
   case DeclSpec::TQ_unspecified: PrevSpec = "unspecified"; break;
   case DeclSpec::TQ_const:       PrevSpec = "const"; break;
index e38f764af6a3afb17cf4cc39ecde78d21326811a..8c07f6f92f588870a013ffe5494a3924522c7800 100644 (file)
@@ -135,8 +135,6 @@ private:
   SourceLocation TQ_constLoc, TQ_restrictLoc, TQ_volatileLoc;
   SourceLocation FS_inlineLoc;
   
-  bool Invalid;
-  
   bool BadSpecifier(TST T, const char *&PrevSpec);
   bool BadSpecifier(TQ T, const char *&PrevSpec);
   bool BadSpecifier(TSS T, const char *&PrevSpec);
@@ -156,8 +154,7 @@ public:
       FS_inline_specified(false),
       TypeRep(0),
       AttrList(0),
-      ProtocolQualifiers(0),
-      Invalid(false) {
+      ProtocolQualifiers(0) {
   }
   ~DeclSpec() {
     delete AttrList;
@@ -170,8 +167,6 @@ public:
   SourceLocation getStorageClassSpecLoc() const { return StorageClassSpecLoc; }
   SourceLocation getThreadSpecLoc() const { return SCS_threadLoc; }
   
-  bool isInvalid() { return Invalid; }
-  
   void ClearStorageClassSpecs() {
     StorageClassSpec     = DeclSpec::SCS_unspecified;
     SCS_thread_specified = false;