Exposes the interface being added in D59214 for ASTMatchers.
Details
Diff Detail
- Repository
- rC Clang
Event Timeline
include/clang/ASTMatchers/ASTMatchers.h | ||
---|---|---|
6429 | From https://reviews.llvm.org/D59214#change-5GOe7CiMwWxl const Stmt *OMPExecutableDirective::getStructuredBlock() const { assert(!isStandaloneDirective() && "Standalone Executable Directives don't have Structured Blocks."); It really doesn't make sense to return false/nullptr, |
include/clang/ASTMatchers/ASTMatchers.h | ||
---|---|---|
6429 | Hmm, actually, i guess it would be best to return false here instead then. Will change. |
include/clang/ASTMatchers/ASTMatchers.h | ||
---|---|---|
6397 | "Matches standalone OpenMP directives, i.e., directives that can't have a structured block." | |
6408 | Please follow the existing comment style. Either: Given \code <code snippet> \endcode <matcher expression> matches "<code snippet>". or Example: <matcher expression> matches "<code snippet>" in \code <code snippet> \endcode For example: Given \code #pragma omp parallel default(none) #pragma omp parallel default(shared) #pragma omp parallel \endcode ``ompDefaultClause()`` matches ``default(none)` and ``default(shared)``. Similarly for other comments in this patch. |
LGTM aside from a NFC change
include/clang/ASTMatchers/ASTMatchers.h | ||
---|---|---|
6444–6445 | Rather than call the matcher (which is a heavy-handed solution), I'd prefer to just check Node.isOMPStructuredBlock() directly. |
"Matches standalone OpenMP directives, i.e., directives that can't have a structured block."