Add a check that the physloc for a macro instantiation is not another macro.

llvm-svn: 38722
This commit is contained in:
Chris Lattner
2006-07-16 18:05:08 +00:00
parent e1954ac1a3
commit 351050bcf5

View File

@@ -115,6 +115,10 @@ unsigned SourceManager::createFileID(const InfoRec *File,
/// InstantiationLoc.
SourceLocation SourceManager::getInstantiationLoc(SourceLocation PhysLoc,
SourceLocation InstantLoc) {
assert(getFIDInfo(PhysLoc.getFileID())->IDType !=
SrcMgr::FileIDInfo::MacroExpansion &&
"Location instantiated in a macro?");
// Resolve InstantLoc down to a real logical location.
InstantLoc = getLogicalLoc(InstantLoc);