to crash when given an instantiation location. Thanks to Fariborz for
the testcase.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63057
91177308-0d34-0410-b5e6-
96231b3b80d8
// If this comes from a macro expansion, we really do want the macro name, not
// the token this macro expanded to.
- std::pair<FileID, unsigned> LocInfo = SM.getDecomposedInstantiationLoc(Loc);
+ Loc = SM.getInstantiationLoc(Loc);
+ std::pair<FileID, unsigned> LocInfo = SM.getDecomposedLoc(Loc);
std::pair<const char *,const char *> Buffer = SM.getBufferData(LocInfo.first);
const char *StrData = Buffer.first+LocInfo.second;