22 RawIgnoredExceptions(Options.get(
"IgnoredExceptions",
"")) {
23 llvm::SmallVector<StringRef, 8> IgnoredExceptionsVec;
25 llvm::StringSet<> IgnoredExceptions;
26 StringRef(RawIgnoredExceptions).split(IgnoredExceptionsVec,
",", -1,
false);
27 llvm::transform(IgnoredExceptionsVec, IgnoredExceptionsVec.begin(),
28 [](StringRef S) { return S.trim(); });
29 IgnoredExceptions.insert_range(IgnoredExceptionsVec);
30 Tracer.ignoreExceptions(std::move(IgnoredExceptions));
31 Tracer.ignoreBadAlloc(
true);
35 Options.store(Opts,
"IgnoredExceptions", RawIgnoredExceptions);
39 Finder->addMatcher(ompExecutableDirective(
40 unless(isStandaloneDirective()),
41 hasStructuredBlock(stmt().bind(
"structured-block")))
47 const auto *Directive =
48 Result.Nodes.getNodeAs<OMPExecutableDirective>(
"directive");
49 assert(Directive &&
"Expected to match some OpenMP Executable directive.");
50 const auto *StructuredBlock =
51 Result.Nodes.getNodeAs<Stmt>(
"structured-block");
52 assert(StructuredBlock &&
"Expected to get some OpenMP Structured Block.");
61 diag(StructuredBlock->getBeginLoc(),
62 "an exception thrown inside of the OpenMP '%0' region is not caught in "
64 << getOpenMPDirectiveName(Directive->getDirectiveKind());
Every ClangTidyCheck reports errors through a DiagnosticsEngine provided by this context.