mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-12 17:32:19 +00:00
Implement TODO: disallow 'def's with template arguments.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7409 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
fc06bf0eaa
commit
554af5cd62
@ -432,7 +432,12 @@ ClassInst : CLASS ObjectBody {
|
||||
};
|
||||
|
||||
DefInst : DEF ObjectBody {
|
||||
// TODO: If ObjectBody has template arguments, it's an error.
|
||||
if (!$2->getTemplateArgs().empty()) {
|
||||
err() << "Def '" << $2->getName()
|
||||
<< "' is not permitted to have template arguments!\n";
|
||||
abort();
|
||||
}
|
||||
// If ObjectBody has template arguments, it's an error.
|
||||
if (Records.getDef($2->getName())) {
|
||||
err() << "Def '" << $2->getName() << "' already defined!\n";
|
||||
abort();
|
||||
|
@ -432,7 +432,12 @@ ClassInst : CLASS ObjectBody {
|
||||
};
|
||||
|
||||
DefInst : DEF ObjectBody {
|
||||
// TODO: If ObjectBody has template arguments, it's an error.
|
||||
if (!$2->getTemplateArgs().empty()) {
|
||||
err() << "Def '" << $2->getName()
|
||||
<< "' is not permitted to have template arguments!\n";
|
||||
abort();
|
||||
}
|
||||
// If ObjectBody has template arguments, it's an error.
|
||||
if (Records.getDef($2->getName())) {
|
||||
err() << "Def '" << $2->getName() << "' already defined!\n";
|
||||
abort();
|
||||
|
Loading…
x
Reference in New Issue
Block a user