[PATCH] D67294: Register and parse a simplified version of '#pragma omp declare variant'

2019-09-11 Thread Andrzej Warzynski via Phabricator via cfe-commits
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, +

[PATCH] D67294: Register and parse a simplified version of '#pragma omp declare variant'

2019-09-11 Thread Alexey Bataev via Phabricator via cfe-commits
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,

[PATCH] D67294: Register and parse a simplified version of '#pragma omp declare variant'

2019-09-11 Thread Johannes Doerfert via Phabricator via cfe-commits
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

[PATCH] D67294: Register and parse a simplified version of '#pragma omp declare variant'

2019-09-11 Thread Andrzej Warzynski via Phabricator via cfe-commits
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

[PATCH] D67294: Register and parse a simplified version of '#pragma omp declare variant'

2019-09-11 Thread Andrzej Warzynski via Phabricator via cfe-commits
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

[PATCH] D67294: Register and parse a simplified version of '#pragma omp declare variant'

2019-09-06 Thread Alexey Bataev via Phabricator via cfe-commits
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

[PATCH] D67294: Register and parse a simplified version of '#pragma omp declare variant'

2019-09-06 Thread Andrzej Warzynski via Phabricator via cfe-commits
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