diff options
| author | Chris Lattner <sabre@nondot.org> | 2006-07-16 18:05:08 +0000 |
|---|---|---|
| committer | Chris Lattner <sabre@nondot.org> | 2006-07-16 18:05:08 +0000 |
| commit | 351050bcf58f4d9b2b1006c146bc4ea56414b5de (patch) | |
| tree | 515340784c9483f06e28b2c1bfaa43140f8625ea /clang/Basic/SourceManager.cpp | |
| parent | e1954ac1a3da4e21306b8cfc41416301872cad01 (diff) | |
| download | bcm5719-llvm-351050bcf58f4d9b2b1006c146bc4ea56414b5de.tar.gz bcm5719-llvm-351050bcf58f4d9b2b1006c146bc4ea56414b5de.zip | |
Add a check that the physloc for a macro instantiation is not another macro.
llvm-svn: 38722
Diffstat (limited to 'clang/Basic/SourceManager.cpp')
| -rw-r--r-- | clang/Basic/SourceManager.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/clang/Basic/SourceManager.cpp b/clang/Basic/SourceManager.cpp index ce5e5f776d0..c37a2c36565 100644 --- a/clang/Basic/SourceManager.cpp +++ b/clang/Basic/SourceManager.cpp @@ -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); |

