diff options
author | erichkeane <ekeane@nvidia.com> | 2025-01-22 06:47:14 -0800 |
---|---|---|
committer | erichkeane <ekeane@nvidia.com> | 2025-03-06 06:42:17 -0800 |
commit | df1e102e2a6b0e0f1ecf28c58a4a51dbcbe74360 (patch) | |
tree | dd051896f103fc9c9567dbd680ffff507b8fac54 /clang/lib/Sema/SemaTemplateInstantiate.cpp | |
parent | 4703f8b6610a13b549c1b8aefe90d0f8975fea1e (diff) | |
download | llvm-df1e102e2a6b0e0f1ecf28c58a4a51dbcbe74360.zip llvm-df1e102e2a6b0e0f1ecf28c58a4a51dbcbe74360.tar.gz llvm-df1e102e2a6b0e0f1ecf28c58a4a51dbcbe74360.tar.bz2 |
[OpenACC] implement AST/Sema for 'routine' construct with argument
The 'routine' construct has two forms, one which takes the name of a
function that it applies to, and another where it implicitly figures it
out based on the next declaration. This patch implements the former with
the required restrictions on the name and the function-static-variables
as specified.
What has not been implemented is any clauses for this, any of the A.3.4
warnings, or the other form.
Diffstat (limited to 'clang/lib/Sema/SemaTemplateInstantiate.cpp')
-rw-r--r-- | clang/lib/Sema/SemaTemplateInstantiate.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/clang/lib/Sema/SemaTemplateInstantiate.cpp b/clang/lib/Sema/SemaTemplateInstantiate.cpp index fcb7671..19c27a7 100644 --- a/clang/lib/Sema/SemaTemplateInstantiate.cpp +++ b/clang/lib/Sema/SemaTemplateInstantiate.cpp @@ -4499,6 +4499,17 @@ Sema::SubstExpr(Expr *E, const MultiLevelTemplateArgumentList &TemplateArgs) { } ExprResult +Sema::SubstCXXIdExpr(Expr *E, + const MultiLevelTemplateArgumentList &TemplateArgs) { + if (!E) + return E; + + TemplateInstantiator Instantiator(*this, TemplateArgs, SourceLocation(), + DeclarationName()); + return Instantiator.TransformAddressOfOperand(E); +} + +ExprResult Sema::SubstConstraintExpr(Expr *E, const MultiLevelTemplateArgumentList &TemplateArgs) { // FIXME: should call SubstExpr directly if this function is equivalent or |