[cfe-commits] r39489 - in /cfe/cfe/trunk: AST/StmtPrinter.cpp clang.xcodeproj/project.pbxproj include/clang/AST/ExprCXX.h
clattner at cs.uiuc.edu
clattner at cs.uiuc.edu
Wed Jul 11 09:44:55 PDT 2007
Author: clattner
Date: Wed Jul 11 11:44:55 2007
New Revision: 39489
URL: http://llvm.org/viewvc/llvm-project?rev=39489&view=rev
Log:
implement printer support for C++ bool literals
Modified:
cfe/cfe/trunk/AST/StmtPrinter.cpp
cfe/cfe/trunk/clang.xcodeproj/project.pbxproj
cfe/cfe/trunk/include/clang/AST/ExprCXX.h
Modified: cfe/cfe/trunk/AST/StmtPrinter.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/cfe/trunk/AST/StmtPrinter.cpp?rev=39489&r1=39488&r2=39489&view=diff
==============================================================================
--- cfe/cfe/trunk/AST/StmtPrinter.cpp (original)
+++ cfe/cfe/trunk/AST/StmtPrinter.cpp Wed Jul 11 11:44:55 2007
@@ -352,7 +352,7 @@
}
void StmtPrinter::VisitCXXBoolLiteralExpr(CXXBoolLiteralExpr *Node) {
- assert(0 && "TODO: should print CXXBoolLiteralExpr!");
+ OS << (Node->getValue() ? "true" : "false");
}
void StmtPrinter::VisitBinaryOperator(BinaryOperator *Node) {
Modified: cfe/cfe/trunk/clang.xcodeproj/project.pbxproj
URL: http://llvm.org/viewvc/llvm-project/cfe/cfe/trunk/clang.xcodeproj/project.pbxproj?rev=39489&r1=39488&r2=39489&view=diff
==============================================================================
--- cfe/cfe/trunk/clang.xcodeproj/project.pbxproj (original)
+++ cfe/cfe/trunk/clang.xcodeproj/project.pbxproj Wed Jul 11 11:44:55 2007
@@ -359,13 +359,13 @@
DEC8D98B0A9433BC00353FCA /* AST */ = {
isa = PBXGroup;
children = (
- 1A30A9E80B93A4C800201A91 /* ExprCXX.h */,
DEC8D9A30A94346E00353FCA /* AST.h */,
DE75ED280B044DC90020CF81 /* ASTContext.h */,
DED676D00B6C786700AAD4A3 /* Builtins.def */,
DED676F90B6C797B00AAD4A3 /* Builtins.h */,
DEC8D9900A9433CD00353FCA /* Decl.h */,
DE0FCA620A95859D00248FD5 /* Expr.h */,
+ 1A30A9E80B93A4C800201A91 /* ExprCXX.h */,
DE3452800AEF1B1800DBC861 /* Stmt.h */,
DE345F210AFD347900DBC861 /* StmtNodes.def */,
DE345C190AFC658B00DBC861 /* StmtVisitor.h */,
@@ -495,12 +495,10 @@
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/ExprCXX.h
URL: http://llvm.org/viewvc/llvm-project/cfe/cfe/trunk/include/clang/AST/ExprCXX.h?rev=39489&r1=39488&r2=39489&view=diff
==============================================================================
--- cfe/cfe/trunk/include/clang/AST/ExprCXX.h (original)
+++ cfe/cfe/trunk/include/clang/AST/ExprCXX.h Wed Jul 11 11:44:55 2007
@@ -51,6 +51,8 @@
public:
CXXBoolLiteralExpr(bool val, SourceLocation l) :
Expr(CXXBoolLiteralExprClass, QualType()), Value(val), Loc(l) {}
+
+ bool getValue() const { return Value; }
virtual SourceRange getSourceRange() const { return SourceRange(Loc); }
More information about the cfe-commits
mailing list