================
@@ -9527,7 +9527,9 @@ class OMPClauseVisitorBase {
#define GEN_CLANG_CLAUSE_CLASS
#define CLAUSE_CLASS(Enum, Str, Class)
\
- RetTy Visit##Class(PTR(Class) S) { DISPATCH(Class); }
+ RetTy Visit##Class(PTR(Class) S) {
\
+ return static_cast<ImplClass *>(this)->VisitOMPClause(S);
\
----------------
erichkeane wrote:
Please note the consequences of this change. This means you'll NOT be able to
call `OMPClauseVisitorBase::VisitOMPIfClause` (for example) directly.
However, this change DOES allow us to only partially implement a visitor (and
have a 'fallback' option). Else if you didn't implement a 'visit' clause, it
ended up being an infinite loop, and `VisitOMPClause` was dead code.
This change doesn't seem to have broken anything, so I suspected that the
'feature' we're 'losing' was never intended, and that this was the intended
behavior.
https://github.com/llvm/llvm-project/pull/172308
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits