[cfe-commits] r39279 - in /cfe/cfe/trunk: Parse/DeclSpec.cpp include/clang/Parse/DeclSpec.h
sabre at cs.uiuc.edu
sabre at cs.uiuc.edu
Wed Jul 11 09:42:24 PDT 2007
Author: sabre
Date: Wed Jul 11 11:42:24 2007
New Revision: 39279
URL: http://llvm.org/viewvc/llvm-project?rev=39279&view=rev
Log:
Make some file-static functions be static methods in the DeclSpec class.
Modified:
cfe/cfe/trunk/Parse/DeclSpec.cpp
cfe/cfe/trunk/include/clang/Parse/DeclSpec.h
Modified: cfe/cfe/trunk/Parse/DeclSpec.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/cfe/trunk/Parse/DeclSpec.cpp?rev=39279&r1=39278&r2=39279&view=diff
==============================================================================
--- cfe/cfe/trunk/Parse/DeclSpec.cpp (original)
+++ cfe/cfe/trunk/Parse/DeclSpec.cpp Wed Jul 11 11:42:24 2007
@@ -82,7 +82,7 @@
return true;
}
-static const char *getSpecifierName(DeclSpec::TST T) {
+const char *DeclSpec::getSpecifierName(DeclSpec::TST T) {
switch (T) {
default: assert(0 && "Unknown typespec!");
case DeclSpec::TST_unspecified: return "unspecified";
@@ -103,7 +103,7 @@
}
static bool BadSpecifier(DeclSpec::TST T, const char *&PrevSpec) {
- PrevSpec = getSpecifierName(T);
+ PrevSpec = DeclSpec::getSpecifierName(T);
return true;
}
Modified: cfe/cfe/trunk/include/clang/Parse/DeclSpec.h
URL: http://llvm.org/viewvc/llvm-project/cfe/cfe/trunk/include/clang/Parse/DeclSpec.h?rev=39279&r1=39278&r2=39279&view=diff
==============================================================================
--- cfe/cfe/trunk/include/clang/Parse/DeclSpec.h (original)
+++ cfe/cfe/trunk/include/clang/Parse/DeclSpec.h Wed Jul 11 11:42:24 2007
@@ -165,6 +165,11 @@
SourceLocation getTypeSpecSignLoc() const { return TSSLoc; }
SourceLocation getTypeSpecTypeLoc() const { return TSTLoc; }
+ /// getSpecifierName - Turn a type-specifier-type into a string like "_Bool"
+ /// or "union".
+ static const char *getSpecifierName(DeclSpec::TST T);
+ static const char *getSpecifierName(DeclSpec::SCS S);
+
// type-qualifiers
/// getTypeQualifiers - Return a set of TQs.
More information about the cfe-commits
mailing list