Skip to content

Instantly share code, notes, and snippets.

@LegalizeAdulthood
LegalizeAdulthood / ClangContributions.md
Last active May 22, 2024 18:08
My Clang Contributions

My Clang Contributions

  • clang tooling library:
    • AST matchers:
      • extend hasType to work with TypedefDecl nodes
      • add functionProtoType matcher for matching FunctionProtoType nodes
      • extend parameterCountIs matcher to FunctionProtoType nodes
  • clang-tidy checks:
  • modernize-raw-string-literal converts string literals with escaped characters to raw string literals
@LegalizeAdulthood
LegalizeAdulthood / type_traits.cpp
Created November 5, 2015 15:42
C++ <type_traits> koans
#include "type_traits.h"
#include <type_traits>
// In each test, replace XXX with syntax that passes the test.
BOOST_AUTO_TEST_CASE(is_void)
{
BOOST_REQUIRE_EQUAL(true, std::is_void<XXX>::value);
std::is_void<XXX> val;
BOOST_REQUIRE_EQUAL(true, static_cast<bool>(val));