[PATCH] D77252: [OpenMP] Try to find an existing base for `omp begin/end declare variant`

2020-04-04 Thread Mike Rice via Phabricator via cfe-commits
mikerice added inline comments. Comment at: clang/lib/Sema/SemaOpenMP.cpp:5512 + + if (!BaseFD) { +// TODO: Determine if we can reuse the declarator to create a declaration I think if you do the base lookup in ActOnStartOfFunctionDefinitionInOpenMPDeclareVa

[PATCH] D77252: [OpenMP] Try to find an existing base for `omp begin/end declare variant`

2020-04-04 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert marked 2 inline comments as done. jdoerfert added inline comments. Comment at: clang/lib/Sema/SemaOpenMP.cpp:5512 + + if (!BaseFD) { +// TODO: Determine if we can reuse the declarator to create a declaration mikerice wrote: > I think if you do the

[PATCH] D77252: [OpenMP] Try to find an existing base for `omp begin/end declare variant`

2020-04-04 Thread Mike Rice via Phabricator via cfe-commits
mikerice added a comment. I just moved your lookup code and tried to get the same info from the declarator. The function looks like this: FunctionDecl * Sema::ActOnStartOfFunctionDefinitionInOpenMPDeclareVariantScope(Scope *S,

[PATCH] D77252: [OpenMP] Try to find an existing base for `omp begin/end declare variant`

2020-04-04 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert added a comment. In D77252#1961913 , @mikerice wrote: > [...] > >[...] > TypeSourceInfo *TInfo = GetTypeForDeclarator(D, S); > QualType FType = TInfo->getType(); > [...] > I think this is a key part of what I was missing. I'll try

[PATCH] D77252: [OpenMP] Try to find an existing base for `omp begin/end declare variant`

2020-04-06 Thread Mike Rice via Phabricator via cfe-commits
mikerice accepted this revision. mikerice added a comment. This revision is now accepted and ready to land. LGTM. I did run the math_cpp11 tests. I don't have a cuda environment so it was probably of limited value. I didn't see any failures that seemed related to this during the compiles. R