cpp_rates's profile picture. ★★★★ 👌 Beautiful Code ★☆☆☆☆  Send us suggestions by DM.

WeRateC++™

@cpp_rates

★★★★ 👌 Beautiful Code ★☆☆☆☆ Send us suggestions by DM.

/* Set LEN bytes of S to 0. The compiler will not delete a call to this function, even if S is dead after the call. */ void explicit_bzero (void *s, size_t len) { memset (s, '\0', len); /* Compiler barrier. */ asm volatile ("" ::: "memory"); }


/// Enumeration describing how the emission of a diagnostic should /// be treated when it occurs during C++ template argument deduction. enum SFINAEResponse { SFINAE_SubstitutionFailure, SFINAE_Suppress, SFINAE_Report, SFINAE_AccessControl };


unsigned int byte;


// FIXME: This extensively assumes that 'char' is 8-bits. assert(PP.getTargetInfo().getCharWidth() == 8); assert(PP.getTargetInfo().getIntWidth() <= 64 && (PP.getTargetInfo().getIntWidth() & 7) == 0); assert(PP.getTargetInfo().getWCharWidth() <= 64);


// Some algorithms defined in this clause make use of the exposition-only function voidify: template<class T> void* voidify(T& obj) noexcept { return const_cast<void*>(static_cast<const volatile void*>(addressof(obj))); }


// Note that we hit something that was technically undefined behavior, but // that we can evaluate past it (such as signed overflow or floating-point // division by zero.) bool noteUndefinedBehavior() { HasUndefinedBehavior = true; return keepEvaluatingAfterUndefinedBehavior();


#define PATH_MAX 260 #define CHAR_BIT 8 #define SCHAR_MIN (-128) #define SCHAR_MAX 127


if (const Arg *A = Args.getLastArg(options::OPT_ccc_gcc_name)) CCCGenericGCCName = A->getValue(); GenReproducer = Args.hasFlag(options::OPT_gen_reproducer, options::OPT_fno_crash_diagnostics, !!::getenv("FORCE_CLANG_DIAGNOSTICS_CRASH")); // FIXME:


struct isa_impl_wrap<To, FromTy, FromTy> { // When From == SimpleType, we are as simple as we are going to get. static bool doit(const FromTy &Val) { return isa_impl_cl<To,FromTy>::doit(Val); } };


typedef float __v2sf __attribute__((__vector_size__(8))); /* Define the default attributes for the functions in this file. */ #define __DEFAULT_FN_ATTRS __attribute__((__always_inline__, __nodebug__, __target__("3dnow"), __min_vector_width__(64)))


// Specialized numeric_limits for uint128. namespace std { template <> class numeric_limits<absl::uint128> {


std::atomic<std::shared_ptr<T>>::is_always_lock_free = false;


int main(int, char**) { std::signal(SIGABRT, [](int){ std::_Exit(EXIT_SUCCESS); });


static bool isSignedCharDefault(const Triple &T) { switch (T.getArch()) { default: return true; case aarch64: case aarch64_be: case arm: case armeb: case thumb: case thumbeb: if (Triple.isOSDarwin() || Triple.isOSWindows()) return true; return false;


/* Taxonomy of floating point data types */ #define FP_NAN 1 #define FP_INFINITE 2 #define FP_ZERO 3 #define FP_NORMAL 4 #define FP_SUBNORMAL 5 #define FP_SUPERNORMAL 6 /* meaningful only on PowerPC */


// If we have a binary expr, dispatch to the subcode of the binop. A smart // optimizer (e.g. LLVM) will fold this comparison into the switch. if (auto *bo = dyn_cast<BinOp>(S)) { switch (bo->getOpcode()) { #define OP(N) case BO_##N: DISP(Bin##NAME, BinaryOperator, S); BINOPS()


# define LINEAR_FIB_D(d, n) \ BOOST_PP_TUPLE_ELEM(3, 0, BOOST_PP_WHILE_ ## d(LINEAR_FIB_C, LINEAR_FIB_F, (0, 1, n))) # /* ^^^^ ^^^^^ ^^ ^^ ^^^^^^^ # * #1 #2 #3


/* We need this to insert the `byuid' entry. */ int key_offset; n = snprintf(buf, buf_len, "%d%c%n%s", pwd->pw_uid, '\0', &key_offset, (char *)key) + 1; written = total = (offsetof(struct dataset, strdata) + pw_name_len + pw_passwd_len + pw_gecos_len + pw_dir_len + pw_shell_len);


Loading...

Something went wrong.


Something went wrong.