Skip to content

Instantly share code, notes, and snippets.

View Endilll's full-sized avatar

Vlad Serebrennikov Endilll

View GitHub Profile
85 results - 21 files
clang/include/clang/Analysis/Analyses/ThreadSafetyTIL.h:
153: enum BaseType : unsigned char {
163: enum SizeType : unsigned char {
clang/include/clang/Analysis/FlowSensitive/Formula.h:
51: enum Kind : unsigned {
clang/include/clang/AST/ASTContext.h:
@Endilll
Endilll / crash.cpp
Created September 7, 2023 18:49
LLVM GH45566 initial reduction
typedef long unsigned int size_t;
namespace std {
inline namespace __1 {
template <int __v> struct __attribute__(()) integral_constant {
static constexpr const int value = __v;
};
template <bool __b> using bool_constant = integral_constant<__b>;
typedef bool_constant<true> true_type;
typedef bool_constant<0> false_type;
template <bool> struct _MetaBase;
@Endilll
Endilll / clang-2.6-enable-clang-for-cxx.patch
Last active July 9, 2023 14:23
Table of old Clang builds with assertions
diff --git a/clang/lib/Driver/Driver.cpp b/clang/lib/Driver/Driver.cpp
index 8845b9b..e27e52e 100644
--- a/clang/lib/Driver/Driver.cpp
+++ b/clang/lib/Driver/Driver.cpp
@@ -38,7 +38,7 @@ using namespace clang::driver;
using namespace clang;
// Used to set values for "production" clang, for releases.
-#define USE_PRODUCTION_CLANG
+// #define USE_PRODUCTION_CLANG
@Endilll
Endilll / dr6xx.cpp
Created June 30, 2023 06:30
%for-each-file test
// RUN: rm -rf %t
// RUN: split-file --leading-lines %s %t
// RUN: %clang_cc1 -std=c++98 -include %S/helper.h -verify -fexceptions -fcxx-exceptions -pedantic-errors %{for-each-file %t}
// RUN: %clang_cc1 -std=c++11 -include %S/helper.h -verify -fexceptions -fcxx-exceptions -pedantic-errors %{for-each-file %t}
// RUN: %clang_cc1 -std=c++14 -include %S/helper.h -verify -fexceptions -fcxx-exceptions -pedantic-errors %{for-each-file %t}
// RUN: %clang_cc1 -std=c++17 -include %S/helper.h -verify -fexceptions -fcxx-exceptions -pedantic-errors %{for-each-file %t}
// RUN: %clang_cc1 -std=c++20 -include %S/helper.h -verify -fexceptions -fcxx-exceptions -pedantic-errors %{for-each-file %t}
// RUN: %clang_cc1 -std=c++23 -include %S/helper.h -verify -fexceptions -fcxx-exceptions -pedantic-errors %{for-each-file %t}
//--- dr600.cpp
@Endilll
Endilll / dr6xx.cpp
Created June 22, 2023 17:26
for-each-file %python real example
// RUN: rm -rf %t
// RUN: split-file --leading-lines %s %t
// RUN: %python %t/run_dr6xx.py "%clang_cc1" %t %S
//--- run_dr6xx.py
from pathlib import Path
import subprocess
import sys
@Endilll
Endilll / minesweepermodel-f4bd90.cpp
Created June 17, 2023 15:35
Attachement from LLVM issue #26227
This file has been truncated, but you can view the full file.
# 1 "<built-in>"
# 1 "minesweepermodel.cpp"
#if 0 /* expanded by -frewrite-includes */
#include "minesweepermodel.h"
#endif /* expanded by -frewrite-includes */
# 1 "minesweepermodel.cpp"
# 1 "./minesweepermodel.h" 1
#ifndef MINESWEEPERMODEL_H
#define MINESWEEPERMODEL_H
@Endilll
Endilll / dr5xx.cpp
Last active June 16, 2023 15:17
dr5xx.cpp demo
// RUN: split-file %s %t
// DEFINE: %{file} =
// DEFINE: %{run98} = \
// DEFINE: %clang_cc1 -std=c++98 %t/%{file} -verify -fexceptions -fcxx-exceptions -pedantic-errors
// DEFINE: %{run11} = \
// DEFINE: %clang_cc1 -std=c++11 %t/%{file} -verify -fexceptions -fcxx-exceptions -pedantic-errors
// DEFINE: %{run14} = \
// DEFINE: %clang_cc1 -std=c++14 %t/%{file} -verify -fexceptions -fcxx-exceptions -pedantic-errors
// DEFINE: %{run17} = \
// DEFINE: %clang_cc1 -std=c++17 %t/%{file} -verify -fexceptions -fcxx-exceptions -pedantic-errors
@Endilll
Endilll / clang+gcc+xcode.txt
Last active July 25, 2023 13:22
C++ compiler version history
Clang GCC Xcode
2023.03.17 16.0.0
2022.09.06 15.0.0
2022.03.25 14.0.0
2021.10.04 13.0.0
2021.06.01 9.4
2021.04.14 12.0.0
2020.10.12 11.0.0
2020.03.24 10.0.0
2020.03.04 8.4
@Endilll
Endilll / preprocessed_source.cpp
Created June 5, 2023 12:38
LLVM Project GitHub Issue 36712
This file has been truncated, but you can view the full file.
# 1 "<built-in>"
# 1 "/home/tom/src/tcm-swarm/cbits/test/rbm_spin.cpp"
// Copyright Tom Westerhout (c) 2018
//
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are met:
//
// * Redistributions of source code must retain the above copyright
; ModuleID = 's_p.ll'
source_filename = "s_p.i"
target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"
define dso_local void @setup_per_cpu_areas(i8* %arg) {
entry:
%s3 = bitcast i8* %arg to [65536 x i8]*
store [65536 x i8] zeroinitializer, [65536 x i8]* %s3
ret void