bcraig added a subscriber: bcraig. bcraig added a comment. I would love to see a test case with dynamic allocation. Something along the following...
struct Allocates { int *x; Allocates() : x(new int(0)) {} Allocates(const Allocates &other) : x(new int(*other.x)) {} }; ... and then the flip side of that ... struct OptionallyAllocates { int *x; OptionallyAllocates () : x(new int(0)) {} OptionallyAllocates (const Allocates &other) { // try / catch(...) would be fine here if std::nothrow is unappealing x = new(std::nothrow) int(*other.x)); } }; ================ Comment at: test/clang-tidy/cert-throw-exception-type.cpp:1 @@ +1,2 @@ +// RUN: %check_clang_tidy %s cert-err60-cpp %t -- -- -std=c++11 -fcxx-exceptions + ---------------- Doesn't this need an "| FileCheck %s" http://reviews.llvm.org/D14619 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits