LocInfoType is a helper type used internally inside Sema and Parser, it
does not exist in valid AST. LocInfoType uses code value outside the
range of valid Type codes, as a result, dumping such type causes error.
The fix allows correct dumping LocInfoType.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@256503
91177308-0d34-0410-b5e6-
96231b3b80d8
#include "clang/Basic/Builtins.h"
#include "clang/Basic/Module.h"
#include "clang/Basic/SourceManager.h"
+#include "clang/Sema/LocInfoType.h"
#include "llvm/Support/raw_ostream.h"
using namespace clang;
using namespace clang::comments;
OS << "<<<NULL>>>";
return;
}
+ if (const LocInfoType *LIT = llvm::dyn_cast<LocInfoType>(T)) {
+ {
+ ColorScope Color(*this, TypeColor);
+ OS << "LocInfo Type";
+ }
+ dumpPointer(T);
+ dumpTypeAsChild(LIT->getTypeSourceInfo()->getType());
+ return;
+ }
{
ColorScope Color(*this, TypeColor);