summaryrefslogtreecommitdiffstats
path: root/clang/lib/AST
diff options
context:
space:
mode:
authorArgyrios Kyrtzidis <akyrtzi@gmail.com>2009-02-16 14:28:33 +0000
committerArgyrios Kyrtzidis <akyrtzi@gmail.com>2009-02-16 14:28:33 +0000
commitac152f1a1ae6830d77b8ec9cb1dabdf1b15df315 (patch)
tree15cd49a8d17509780f77e30bfba1fe390214dba9 /clang/lib/AST
parent7b1c6c09f79284aaf970f39668049923592a027a (diff)
downloadbcm5719-llvm-ac152f1a1ae6830d77b8ec9cb1dabdf1b15df315.tar.gz
bcm5719-llvm-ac152f1a1ae6830d77b8ec9cb1dabdf1b15df315.zip
Make DeclContexts maintenance a bit easier.
-In DeclNodes.def, only mark as DeclContexts the top classes that directly derive from DeclContext. If the Decl has subclasses, it should be marked with DECL_CONTEXT_BASE. -Use DeclNodes.def to automate the DeclContext::classof and DeclContext::CastTo definitions. llvm-svn: 64629
Diffstat (limited to 'clang/lib/AST')
-rw-r--r--clang/lib/AST/DeclBase.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/AST/DeclBase.cpp b/clang/lib/AST/DeclBase.cpp
index 1e3683c8576..91f2bf2765e 100644
--- a/clang/lib/AST/DeclBase.cpp
+++ b/clang/lib/AST/DeclBase.cpp
@@ -50,7 +50,7 @@ const char *Decl::getDeclKindName() const {
const char *DeclContext::getDeclKindName() const {
switch (DeclKind) {
default: assert(0 && "Declaration context not in DeclNodes.def!");
-#define DECL_CONTEXT(Node) case Decl::Node: return #Node;
+#define DECL(Derived, Base) case Decl::Derived: return #Derived;
#include "clang/AST/DeclNodes.def"
}
}
OpenPOWER on IntegriCloud