andwar marked 2 inline comments as done.
andwar added inline comments.
Comment at: lib/Parse/ParseOpenMP.cpp:779-783
+ auto Identinfo = PP.getIdentifierInfo(VectorVariantId.Ident->getName());
+ LookupResult Lookup(Actions, Identinfo, VectorVariantId.Loc,
+
ABataev added inline comments.
Comment at: include/clang/Basic/Attr.td:3220
+private:
+ NamedDecl *VecVarNamedDecl;
+
andwar wrote:
> ABataev wrote:
> > This is definitely wrong, especially if we need to handle templates.
> What else would you use? Also,
jdoerfert added a comment.
I left some minor notes but overall I think we should put this in and improve
on it in-tree. @ABataev, would that be OK with you?
Comment at: lib/Parse/ParseOpenMP.cpp:748
}
+/// Parses clauses for 'declare variant' directive.
Rem
andwar added a comment.
I've addressed most of the comments except for those related to templates. I'd
like to clarify as what is the expected behaviour there before proceeding with
implementation.
Comment at: include/clang/Basic/Attr.td:3220
+private:
+ NamedDecl *V
andwar updated this revision to Diff 219673.
andwar marked 6 inline comments as done.
andwar added a comment.
- Removed `declare variant` from Attr.td
- Moved the 'vector-var-id' lookup from ParseOpenMP.cpp to SemaOpenMP.cpp
- Parsing 'vector-var-id' as an expression
- Removed the creation of the
ABataev added inline comments.
Comment at: include/clang/Basic/Attr.td:3202
+def OMPDeclareVariantDecl : Attr {
+ let Spellings = [Pragma<"omp", "declare variant">];
For the first patch we don't need the attribute, just parsing/sema analysis
andwar created this revision.
andwar added a reviewer: ABataev.
Herald added a reviewer: jdoerfert.
Herald added a project: clang.
Herald added a subscriber: cfe-commits.
This patch implements the basic parsing and semantic analysis of
`#pragma omp declare variant`:
* registers '#pragma om