[cfe-commits] r47104 - in /cfe/trunk: Parse/DeclSpec.cpp include/clang/Parse/DeclSpec.h
Steve Naroff
snaroff at apple.com
Wed Feb 13 19:30:24 PST 2008
Author: snaroff
Date: Wed Feb 13 21:30:24 2008
New Revision: 47104
URL: http://llvm.org/viewvc/llvm-project?rev=47104&view=rev
Log:
Remove DeclSpec::Invalid, a recently added bool that allowed the parser to detect if the decl spec was invalid.
For now, we will stick with the original strategy - clients of Parse::ParseDeclarationSpecifiers() should never have to know this.
Modified:
cfe/trunk/Parse/DeclSpec.cpp
cfe/trunk/include/clang/Parse/DeclSpec.h
Modified: cfe/trunk/Parse/DeclSpec.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/Parse/DeclSpec.cpp?rev=47104&r1=47103&r2=47104&view=diff
==============================================================================
--- cfe/trunk/Parse/DeclSpec.cpp (original)
+++ cfe/trunk/Parse/DeclSpec.cpp Wed Feb 13 21:30:24 2008
@@ -48,13 +48,11 @@
}
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(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(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 @@
}
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;
Modified: cfe/trunk/include/clang/Parse/DeclSpec.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Parse/DeclSpec.h?rev=47104&r1=47103&r2=47104&view=diff
==============================================================================
--- cfe/trunk/include/clang/Parse/DeclSpec.h (original)
+++ cfe/trunk/include/clang/Parse/DeclSpec.h Wed Feb 13 21:30:24 2008
@@ -135,8 +135,6 @@
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 @@
FS_inline_specified(false),
TypeRep(0),
AttrList(0),
- ProtocolQualifiers(0),
- Invalid(false) {
+ ProtocolQualifiers(0) {
}
~DeclSpec() {
delete AttrList;
@@ -170,8 +167,6 @@
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;
More information about the cfe-commits
mailing list