Exposes the interface being added in D59214 for ASTMatchers.
Details
Details
Diff Detail
Diff Detail
- Repository
- rL LLVM
Event Timeline
include/clang/ASTMatchers/ASTMatchers.h | ||
---|---|---|
6421 ↗ | (On Diff #190982) | 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 | ||
---|---|---|
6421 ↗ | (On Diff #190982) | Hmm, actually, i guess it would be best to return false here instead then. Will change. |
include/clang/ASTMatchers/ASTMatchers.h | ||
---|---|---|
6389 ↗ | (On Diff #190982) | "Matches standalone OpenMP directives, i.e., directives that can't have a structured block." |
6400 ↗ | (On Diff #190982) | 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. |
Comment Actions
LGTM aside from a NFC change
include/clang/ASTMatchers/ASTMatchers.h | ||
---|---|---|
6444–6445 ↗ | (On Diff #191676) | Rather than call the matcher (which is a heavy-handed solution), I'd prefer to just check Node.isOMPStructuredBlock() directly. |