mirror of
https://github.com/intel/llvm.git
synced 2026-02-08 17:28:30 +08:00
Add a check that the physloc for a macro instantiation is not another macro.
llvm-svn: 38722
This commit is contained in:
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user