[cfe-commits] r38722 - /cfe/cfe/trunk/Basic/SourceManager.cpp
sabre at cs.uiuc.edu
sabre at cs.uiuc.edu
Wed Jul 11 09:24:06 PDT 2007
Author: sabre
Date: Wed Jul 11 11:24:05 2007
New Revision: 38722
URL: http://llvm.org/viewvc/llvm-project?rev=38722&view=rev
Log:
Add a check that the physloc for a macro instantiation is not another macro.
Modified:
cfe/cfe/trunk/Basic/SourceManager.cpp
Modified: cfe/cfe/trunk/Basic/SourceManager.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/cfe/trunk/Basic/SourceManager.cpp?rev=38722&r1=38721&r2=38722&view=diff
==============================================================================
--- cfe/cfe/trunk/Basic/SourceManager.cpp (original)
+++ cfe/cfe/trunk/Basic/SourceManager.cpp Wed Jul 11 11:24:05 2007
@@ -115,6 +115,10 @@
/// 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);
More information about the cfe-commits
mailing list