Better Error Reporting
Report missing template arguments more helpfully by supplying the name of the missing argument in the error message. llvm-svn: 140034
This commit is contained in:
parent
1c4831764c
commit
39db48d0d4
|
@ -1416,6 +1416,10 @@ std::vector<Init*> TGParser::ParseValueList(Record *CurRec, Record *ArgsRec,
|
|||
if (ArgsRec != 0 && EltTy == 0) {
|
||||
const std::vector<std::string> &TArgs = ArgsRec->getTemplateArgs();
|
||||
const RecordVal *RV = ArgsRec->getValue(TArgs[ArgN]);
|
||||
if (!RV) {
|
||||
errs() << "Cannot find template arg " << ArgN << " (" << TArgs[ArgN]
|
||||
<< ")\n";
|
||||
}
|
||||
assert(RV && "Template argument record not found??");
|
||||
ItemType = RV->getType();
|
||||
++ArgN;
|
||||
|
|
Loading…
Reference in New Issue