Skip to content

Add support for polymorphic bounds safe interface functions #546

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 18 commits into from
Aug 16, 2018
Merged
Changes from 1 commit
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
454c63e
Add support for polymorphic bounds safe interface functions.
Prabhuk Jul 28, 2018
eec9aaa
Add support for polymorphic bounds safe interface functions.
Prabhuk Jul 28, 2018
1fa153a
Add support for polymorphic bounds safe interface functions.
Prabhuk Aug 1, 2018
6d0ff23
Add support for polymorphic bounds safe interface functions.
Prabhuk Aug 7, 2018
4b53bd2
Add support for polymorphic bounds safe interface functions.
Prabhuk Aug 8, 2018
1802837
Regression: failures of of redeclartion tests fixed.
Prabhuk Aug 8, 2018
ba4cda0
Add support for polymorphic bounds safe interface functions.
Prabhuk Aug 9, 2018
d6e003f
Parsing multiple declarations with conflicting Checked C specifiers w…
Prabhuk Aug 10, 2018
2ab00ec
Parsing calls from unchecked scope, where type variables may not be s…
Prabhuk Aug 10, 2018
0132dee
Comments cleanup.
Prabhuk Aug 11, 2018
55aee0b
Comments cleanup.
Prabhuk Aug 11, 2018
13ec4dc
Adding support for polymorphic bounds safe interface functions.
Prabhuk Aug 13, 2018
dabd7ee
Adding support for polymorphic bounds safe interface functions.
Prabhuk Aug 13, 2018
6c5f1ed
Adding support for polymorphic bounds safe interface functions.
Prabhuk Aug 14, 2018
c8c0ddb
Adding support for polymorphic bounds safe interface functions.
Prabhuk Aug 14, 2018
b5221ed
Adding support for polymorphic bounds safe interface functions.
Prabhuk Aug 14, 2018
52c4581
Adding support for polymorphic bounds safe interface functions.
Prabhuk Aug 15, 2018
582e627
Adding support for polymorphic bounds safe interface functions.
Prabhuk Aug 16, 2018
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Parsing multiple declarations with conflicting Checked C specifiers w…
…ill throw an error now.

Task: Adding support for polymorphic bounds safe interface functions.
Pending:
1. Parse calls from unchecked scope where type variables may not be substituted with a call site provided type (Apply default type which is "void")
2. Add tests
3. Fix Checked C specifications to reflect the modified syntax for interface type generic functions
  • Loading branch information
Prabhuk committed Aug 10, 2018
commit d6e003fc67b17b37a3b4d0bc4b05a3b734ca851e
8 changes: 8 additions & 0 deletions lib/Sema/SemaDecl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3415,6 +3415,14 @@ bool Sema::MergeFunctionDecl(FunctionDecl *New, NamedDecl *&OldD,
New->setParams(Params);
}

if((New->isItypeGenericFunction() && Old->isGenericFunction())
|| (New->isGenericFunction() && Old->isItypeGenericFunction()))
{
Diag(New->getLocation(), diag::err_conflicting_function_specifiers)
<< New->getDeclName() << "_Itype_for_any" << "_For_any";
return true;
}

return MergeCompatibleFunctionDecls(New, Old, S, MergeTypeWithOld);
}

Expand Down