we generally do not want to catch or throw these. catching them to print and discard is fine, tests are largely exempt, and cases in which we can be certain where the exception came from are also fine to *catch*. we'll try to never *throw* (or rethrow) these if possible though because doing so will make it impossible to construct async traces for the exceptions. Change-Id: I3b71c32ecd16afc2246c946472f5629a1fa31f2c
22 lines
588 B
C++
22 lines
588 B
C++
#pragma once
|
|
///@file
|
|
|
|
#include <clang-tidy/ClangTidyCheck.h>
|
|
#include <clang/ASTMatchers/ASTMatchFinder.h>
|
|
#include <llvm/ADT/StringRef.h>
|
|
|
|
namespace nix::clang_tidy {
|
|
|
|
using namespace clang;
|
|
using namespace clang::tidy;
|
|
using namespace llvm;
|
|
|
|
class ForeignExceptions : public ClangTidyCheck {
|
|
public:
|
|
ForeignExceptions(StringRef Name, ClangTidyContext *Context)
|
|
: ClangTidyCheck(Name, Context) {}
|
|
void registerMatchers(ast_matchers::MatchFinder *Finder) override;
|
|
void check(const ast_matchers::MatchFinder::MatchResult &Result) override;
|
|
};
|
|
}; // namespace nix::clang_tidy
|