[cfe-commits] r39341 - in /cfe/cfe/trunk: AST/Sema.h AST/SemaExpr.cpp AST/StmtPrinter.cpp Parse/ParseExpr.cpp Sema/Sema.h Sema/SemaExpr.cpp clang.xcodeproj/project.pbxproj include/clang/AST/Expr.h include/clang/AST/StmtNodes.def include/clang/Parse/Action.h
snaroff at cs.uiuc.edu
snaroff at cs.uiuc.edu
Wed Jul 11 09:43:20 PDT 2007
Author: snaroff
Date: Wed Jul 11 11:43:20 2007
New Revision: 39341
URL: http://llvm.org/viewvc/llvm-project?rev=39341&view=rev
Log:
rename IntegerConstant->IntegerLiteral
rename FloatingConstant->FloatingLiteral
rename StringExpr->StringLiteral
Modified:
cfe/cfe/trunk/AST/Sema.h
cfe/cfe/trunk/AST/SemaExpr.cpp
cfe/cfe/trunk/AST/StmtPrinter.cpp
cfe/cfe/trunk/Parse/ParseExpr.cpp
cfe/cfe/trunk/Sema/Sema.h
cfe/cfe/trunk/Sema/SemaExpr.cpp
cfe/cfe/trunk/clang.xcodeproj/project.pbxproj
cfe/cfe/trunk/include/clang/AST/Expr.h
cfe/cfe/trunk/include/clang/AST/StmtNodes.def
cfe/cfe/trunk/include/clang/Parse/Action.h
Modified: cfe/cfe/trunk/AST/Sema.h
URL: http://llvm.org/viewvc/llvm-project/cfe/cfe/trunk/AST/Sema.h?rev=39341&r1=39340&r2=39341&view=diff
==============================================================================
--- cfe/cfe/trunk/AST/Sema.h (original)
+++ cfe/cfe/trunk/AST/Sema.h Wed Jul 11 11:43:20 2007
@@ -155,8 +155,8 @@
bool HasTrailingLParen);
virtual ExprResult ParseSimplePrimaryExpr(SourceLocation Loc,
tok::TokenKind Kind);
- virtual ExprResult ParseIntegerConstant(SourceLocation Loc);
- virtual ExprResult ParseFloatingConstant(SourceLocation Loc);
+ virtual ExprResult ParseStringLiteral(SourceLocation Loc);
+ virtual ExprResult ParseFloatingLiteral(SourceLocation Loc);
virtual ExprResult ParseParenExpr(SourceLocation L, SourceLocation R,
ExprTy *Val);
Modified: cfe/cfe/trunk/AST/SemaExpr.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/cfe/trunk/AST/SemaExpr.cpp?rev=39341&r1=39340&r2=39341&view=diff
==============================================================================
--- cfe/cfe/trunk/AST/SemaExpr.cpp (original)
+++ cfe/cfe/trunk/AST/SemaExpr.cpp Wed Jul 11 11:43:20 2007
@@ -285,11 +285,11 @@
}
}
-Sema::ExprResult Sema::ParseIntegerConstant(SourceLocation Loc) {
- return new IntegerConstant();
+Sema::ExprResult Sema::ParseStringLiteral(SourceLocation Loc) {
+ return new StringLiteral();
}
-Sema::ExprResult Sema::ParseFloatingConstant(SourceLocation Loc) {
- return new FloatingConstant();
+Sema::ExprResult Sema::ParseFloatingLiteral(SourceLocation Loc) {
+ return new FloatingLiteral();
}
Action::ExprResult Sema::ParseParenExpr(SourceLocation L, SourceLocation R,
@@ -339,7 +339,7 @@
if (isa<FunctionType>(ArgTy) && isSizeof) {
// alignof(function) is allowed.
Diag(OpLoc, diag::ext_sizeof_function_type);
- return new IntegerConstant(/*1*/);
+ return new StringLiteral(/*1*/);
} else if (ArgTy->isVoidType()) {
Diag(OpLoc, diag::ext_sizeof_void_type, isSizeof ? "sizeof" : "__alignof");
} else if (ArgTy->isIncompleteType()) {
@@ -347,7 +347,7 @@
ArgTy->getAsString(TypeName);
Diag(OpLoc, isSizeof ? diag::err_sizeof_incomplete_type :
diag::err_alignof_incomplete_type, TypeName);
- return new IntegerConstant(/*0*/);
+ return new StringLiteral(/*0*/);
}
return new SizeOfAlignOfTypeExpr(isSizeof, ArgTy);
Modified: cfe/cfe/trunk/AST/StmtPrinter.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/cfe/trunk/AST/StmtPrinter.cpp?rev=39341&r1=39340&r2=39341&view=diff
==============================================================================
--- cfe/cfe/trunk/AST/StmtPrinter.cpp (original)
+++ cfe/cfe/trunk/AST/StmtPrinter.cpp Wed Jul 11 11:43:20 2007
@@ -215,11 +215,11 @@
OS << Node->getDecl()->getName();
}
-void StmtPrinter::VisitIntegerConstant(IntegerConstant *Node) {
+void StmtPrinter::VisitStringLiteral(StringLiteral *Node) {
// FIXME: print value.
OS << "1";
}
-void StmtPrinter::VisitFloatingConstant(FloatingConstant *Node) {
+void StmtPrinter::VisitFloatingLiteral(FloatingLiteral *Node) {
// FIXME: print value.
OS << "1.0";
}
Modified: cfe/cfe/trunk/Parse/ParseExpr.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/cfe/trunk/Parse/ParseExpr.cpp?rev=39341&r1=39340&r2=39341&view=diff
==============================================================================
--- cfe/cfe/trunk/Parse/ParseExpr.cpp (original)
+++ cfe/cfe/trunk/Parse/ParseExpr.cpp Wed Jul 11 11:43:20 2007
@@ -476,9 +476,9 @@
// TODO: Validate whether this is an integer or floating-constant or
// neither.
if (1) {
- Res = Actions.ParseIntegerConstant(Tok.getLocation());
+ Res = Actions.ParseStringLiteral(Tok.getLocation());
} else {
- Res = Actions.ParseFloatingConstant(Tok.getLocation());
+ Res = Actions.ParseFloatingLiteral(Tok.getLocation());
}
ConsumeToken();
Modified: cfe/cfe/trunk/Sema/Sema.h
URL: http://llvm.org/viewvc/llvm-project/cfe/cfe/trunk/Sema/Sema.h?rev=39341&r1=39340&r2=39341&view=diff
==============================================================================
--- cfe/cfe/trunk/Sema/Sema.h (original)
+++ cfe/cfe/trunk/Sema/Sema.h Wed Jul 11 11:43:20 2007
@@ -155,8 +155,8 @@
bool HasTrailingLParen);
virtual ExprResult ParseSimplePrimaryExpr(SourceLocation Loc,
tok::TokenKind Kind);
- virtual ExprResult ParseIntegerConstant(SourceLocation Loc);
- virtual ExprResult ParseFloatingConstant(SourceLocation Loc);
+ virtual ExprResult ParseStringLiteral(SourceLocation Loc);
+ virtual ExprResult ParseFloatingLiteral(SourceLocation Loc);
virtual ExprResult ParseParenExpr(SourceLocation L, SourceLocation R,
ExprTy *Val);
Modified: cfe/cfe/trunk/Sema/SemaExpr.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/cfe/trunk/Sema/SemaExpr.cpp?rev=39341&r1=39340&r2=39341&view=diff
==============================================================================
--- cfe/cfe/trunk/Sema/SemaExpr.cpp (original)
+++ cfe/cfe/trunk/Sema/SemaExpr.cpp Wed Jul 11 11:43:20 2007
@@ -285,11 +285,11 @@
}
}
-Sema::ExprResult Sema::ParseIntegerConstant(SourceLocation Loc) {
- return new IntegerConstant();
+Sema::ExprResult Sema::ParseStringLiteral(SourceLocation Loc) {
+ return new StringLiteral();
}
-Sema::ExprResult Sema::ParseFloatingConstant(SourceLocation Loc) {
- return new FloatingConstant();
+Sema::ExprResult Sema::ParseFloatingLiteral(SourceLocation Loc) {
+ return new FloatingLiteral();
}
Action::ExprResult Sema::ParseParenExpr(SourceLocation L, SourceLocation R,
@@ -339,7 +339,7 @@
if (isa<FunctionType>(ArgTy) && isSizeof) {
// alignof(function) is allowed.
Diag(OpLoc, diag::ext_sizeof_function_type);
- return new IntegerConstant(/*1*/);
+ return new StringLiteral(/*1*/);
} else if (ArgTy->isVoidType()) {
Diag(OpLoc, diag::ext_sizeof_void_type, isSizeof ? "sizeof" : "__alignof");
} else if (ArgTy->isIncompleteType()) {
@@ -347,7 +347,7 @@
ArgTy->getAsString(TypeName);
Diag(OpLoc, isSizeof ? diag::err_sizeof_incomplete_type :
diag::err_alignof_incomplete_type, TypeName);
- return new IntegerConstant(/*0*/);
+ return new StringLiteral(/*0*/);
}
return new SizeOfAlignOfTypeExpr(isSizeof, ArgTy);
Modified: cfe/cfe/trunk/clang.xcodeproj/project.pbxproj
URL: http://llvm.org/viewvc/llvm-project/cfe/cfe/trunk/clang.xcodeproj/project.pbxproj?rev=39341&r1=39340&r2=39341&view=diff
==============================================================================
--- cfe/cfe/trunk/clang.xcodeproj/project.pbxproj (original)
+++ cfe/cfe/trunk/clang.xcodeproj/project.pbxproj Wed Jul 11 11:43:20 2007
@@ -199,7 +199,7 @@
DEC8DABF0A94402500353FCA /* ASTStreamer.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = ASTStreamer.h; path = clang/AST/ASTStreamer.h; sourceTree = "<group>"; };
DED626C80AE0C065001E80A4 /* TargetInfo.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = TargetInfo.cpp; sourceTree = "<group>"; };
DED627020AE0C51D001E80A4 /* Targets.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = Targets.cpp; path = Driver/Targets.cpp; sourceTree = "<group>"; };
- DED62ABA0AE2EDF1001E80A4 /* Decl.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = Decl.cpp; path = AST/Decl.cpp; sourceTree = "<group>"; };
+ DED62ABA0AE2EDF1001E80A4 /* Decl.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = Decl.cpp; path = AST/Decl.cpp; sourceTree = "<group>"; usesTabs = 1; };
DED676D00B6C786700AAD4A3 /* Builtins.def */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; name = Builtins.def; path = clang/AST/Builtins.def; sourceTree = "<group>"; };
DED676F90B6C797B00AAD4A3 /* Builtins.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = Builtins.h; path = clang/AST/Builtins.h; sourceTree = "<group>"; };
DED677C80B6C854100AAD4A3 /* Builtins.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = Builtins.cpp; path = AST/Builtins.cpp; sourceTree = "<group>"; };
@@ -472,9 +472,12 @@
08FB7793FE84155DC02AAC07 /* Project object */ = {
isa = PBXProject;
buildConfigurationList = 1DEB923508733DC60010E9CD /* Build configuration list for PBXProject "clang" */;
+ compatibilityVersion = "Xcode 2.4";
hasScannedForEncodings = 1;
mainGroup = 08FB7794FE84155DC02AAC07 /* clang */;
projectDirPath = "";
+ projectRoot = "";
+ shouldCheckCompatibility = 1;
targets = (
8DD76F620486A84900D96B5E /* clang */,
);
Modified: cfe/cfe/trunk/include/clang/AST/Expr.h
URL: http://llvm.org/viewvc/llvm-project/cfe/cfe/trunk/include/clang/AST/Expr.h?rev=39341&r1=39340&r2=39341&view=diff
==============================================================================
--- cfe/cfe/trunk/include/clang/AST/Expr.h (original)
+++ cfe/cfe/trunk/include/clang/AST/Expr.h Wed Jul 11 11:43:20 2007
@@ -51,15 +51,15 @@
virtual void visit(StmtVisitor &Visitor);
};
-class IntegerConstant : public Expr {
+class StringLiteral : public Expr {
public:
- IntegerConstant() {}
+ StringLiteral() {}
virtual void visit(StmtVisitor &Visitor);
};
-class FloatingConstant : public Expr {
+class FloatingLiteral : public Expr {
public:
- FloatingConstant() {}
+ FloatingLiteral() {}
virtual void visit(StmtVisitor &Visitor);
};
Modified: cfe/cfe/trunk/include/clang/AST/StmtNodes.def
URL: http://llvm.org/viewvc/llvm-project/cfe/cfe/trunk/include/clang/AST/StmtNodes.def?rev=39341&r1=39340&r2=39341&view=diff
==============================================================================
--- cfe/cfe/trunk/include/clang/AST/StmtNodes.def (original)
+++ cfe/cfe/trunk/include/clang/AST/StmtNodes.def Wed Jul 11 11:43:20 2007
@@ -30,8 +30,8 @@
// Expressions.
STMT(Expr , Stmt)
STMT(DeclRefExpr , Expr)
-STMT(IntegerConstant , Expr)
-STMT(FloatingConstant , Expr)
+STMT(StringLiteral , Expr)
+STMT(FloatingLiteral , Expr)
STMT(StringExpr , Expr)
STMT(ParenExpr , Expr)
STMT(UnaryOperator , Expr)
Modified: cfe/cfe/trunk/include/clang/Parse/Action.h
URL: http://llvm.org/viewvc/llvm-project/cfe/cfe/trunk/include/clang/Parse/Action.h?rev=39341&r1=39340&r2=39341&view=diff
==============================================================================
--- cfe/cfe/trunk/include/clang/Parse/Action.h (original)
+++ cfe/cfe/trunk/include/clang/Parse/Action.h Wed Jul 11 11:43:20 2007
@@ -263,8 +263,8 @@
tok::TokenKind Kind) {
return 0;
}
- virtual ExprResult ParseIntegerConstant(SourceLocation Loc) { return 0; }
- virtual ExprResult ParseFloatingConstant(SourceLocation Loc) { return 0; }
+ virtual ExprResult ParseStringLiteral(SourceLocation Loc) { return 0; }
+ virtual ExprResult ParseFloatingLiteral(SourceLocation Loc) { return 0; }
/// ParseStringExpr - The specified tokens were lexed as pasted string
/// fragments (e.g. "foo" "bar" L"baz").
More information about the cfe-commits
mailing list