summaryrefslogtreecommitdiffstats
path: root/clang/lib/AST/StmtDumper.cpp
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2008-12-24 00:01:03 +0000
committerDouglas Gregor <dgregor@apple.com>2008-12-24 00:01:03 +0000
commit583540360c39e5512edefb667d9e7f3da91d8720 (patch)
tree94fa0ff5032daa72302885df09a0154b094bdd63 /clang/lib/AST/StmtDumper.cpp
parentee573fcefc55ca4c672d2991145ada28ee584651 (diff)
downloadbcm5719-llvm-583540360c39e5512edefb667d9e7f3da91d8720.tar.gz
bcm5719-llvm-583540360c39e5512edefb667d9e7f3da91d8720.zip
Correct the order in which we cope with end-of-class-definition
semantics and improve our handling of default arguments. Specifically, we follow this order: - As soon as the see the '}' in the class definition, the class is complete and we add any implicit declarations (default constructor, copy constructor, etc.) to the class. - If there are any default function arguments, parse them - If there were any inline member function definitions, parse them As part of this change, we now keep track of the the fact that we've seen unparsed default function arguments within the AST. See the new ParmVarDecl::hasUnparsedDefaultArg member. This allows us to properly cope with calls inside default function arguments to other functions where we're making use of the default arguments. Made some C++ error messages regarding failed initializations more specific. llvm-svn: 61406
Diffstat (limited to 'clang/lib/AST/StmtDumper.cpp')
-rw-r--r--clang/lib/AST/StmtDumper.cpp14
1 files changed, 8 insertions, 6 deletions
diff --git a/clang/lib/AST/StmtDumper.cpp b/clang/lib/AST/StmtDumper.cpp
index f11536f9c2d..c3ce92de60b 100644
--- a/clang/lib/AST/StmtDumper.cpp
+++ b/clang/lib/AST/StmtDumper.cpp
@@ -83,12 +83,14 @@ namespace {
void DumpType(QualType T) {
fprintf(F, "'%s'", T.getAsString().c_str());
- // If the type is directly a typedef, strip off typedefness to give at
- // least one level of concreteness.
- if (TypedefType *TDT = dyn_cast<TypedefType>(T)) {
- QualType Simplified =
- TDT->LookThroughTypedefs().getQualifiedType(T.getCVRQualifiers());
- fprintf(F, ":'%s'", Simplified.getAsString().c_str());
+ if (!T.isNull()) {
+ // If the type is directly a typedef, strip off typedefness to give at
+ // least one level of concreteness.
+ if (TypedefType *TDT = dyn_cast<TypedefType>(T)) {
+ QualType Simplified =
+ TDT->LookThroughTypedefs().getQualifiedType(T.getCVRQualifiers());
+ fprintf(F, ":'%s'", Simplified.getAsString().c_str());
+ }
}
}
void DumpStmt(const Stmt *Node) {
OpenPOWER on IntegriCloud