From 33815690af25a41f6739ff9a5cc71bde389f2363 Mon Sep 17 00:00:00 2001 From: John McCall Date: Thu, 15 Oct 2009 03:50:32 +0000 Subject: Better living through metaprogramming. Create a base class which abstracts most of the unsafe boilerplate out of TypeLoc. Create a QualifiedLoc class to represent the idea that we *might* start representing source locations of qualifiers. Dealing with qualifiers explicitly like this also lets us efficiently ignore them in all the concrete cases. This should make it obvious and easy to add new TypeLoc subclasses. llvm-svn: 84168 --- clang/lib/Frontend/PCHReaderDecl.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'clang/lib/Frontend/PCHReaderDecl.cpp') diff --git a/clang/lib/Frontend/PCHReaderDecl.cpp b/clang/lib/Frontend/PCHReaderDecl.cpp index 353a6464b18..b6732561dff 100644 --- a/clang/lib/Frontend/PCHReaderDecl.cpp +++ b/clang/lib/Frontend/PCHReaderDecl.cpp @@ -162,7 +162,7 @@ public: : Reader(Reader), Record(Record), Idx(Idx) { } #define ABSTRACT_TYPELOC(CLASS) -#define TYPELOC(CLASS, PARENT, TYPE) \ +#define TYPELOC(CLASS, PARENT) \ void Visit##CLASS(CLASS TyLoc); #include "clang/AST/TypeLocNodes.def" @@ -173,6 +173,9 @@ public: } +void TypeLocReader::VisitQualifiedLoc(QualifiedLoc TyLoc) { + // nothing to do +} void TypeLocReader::VisitDefaultTypeSpecLoc(DefaultTypeSpecLoc TyLoc) { TyLoc.setStartLoc(SourceLocation::getFromRawEncoding(Record[Idx++])); } -- cgit v1.2.3