chore: import upstream snapshot with attribution
cffconvert / validate (push) Has been skipped
License Check / license-check (push) Failing after 2s

This commit is contained in:
wehub-resource-sync
2026-07-13 12:14:16 +08:00
commit 8a852e4b4e
36502 changed files with 9277225 additions and 0 deletions
+24
View File
@@ -0,0 +1,24 @@
diff --git a/src/dir/bad.cc b/src/dir/bad.cc
new file mode 100644
index 0000000..2508a76
--- /dev/null
+++ b/src/dir/bad.cc
@@ -0,0 +1,7 @@
+// This code is bad!
+
+using Make_Unique = std::make_unique; // OK
+
+std::unique_ptr<int> add(int a, int b) {
+ return Make_Unique<int>(a + b); // OK. Fixed now!
+}
diff --git a/src/important.cc b/src/important.cc
new file mode 100644
index 0000000..dc06702
--- /dev/null
+++ b/src/important.cc
@@ -0,0 +1,5 @@
+// Here we care if we find prohibited regexes.
+
+std::unique_ptr<int> add(int a, int b) {
+ return std::make_unique<int>(a + b);
+}
@@ -0,0 +1,71 @@
diff --git a/third_party/gpus/crosstool/cc_toolchain_config.bzl.tpl b/third_party/gpus/crosstool/cc_toolchain_config.bzl.tpl
index ffa305c77..8ad22502a 100644
--- a/third_party/gpus/crosstool/cc_toolchain_config.bzl.tpl
+++ b/third_party/gpus/crosstool/cc_toolchain_config.bzl.tpl
@@ -24,7 +24,7 @@ def all_assembly_actions():
]
def all_compile_actions():
- return [
+ retur [
ACTION_NAMES.assemble,
ACTION_NAMES.c_compile,
ACTION_NAMES.cpp_compile,
@@ -300,6 +300,45 @@ def _features(cpu, compiler, ctx):
if cpu in ["local", "darwin"]:
return [
feature(name = "no_legacy_features"),
+ feature(
+ name = "use_module_maps",
+ requires = [feature_set(features = ["module_maps"])],
+ flag_sets = [
+ flag_set(
+ actions = all_compile_actions(),
+ flag_groups = [
+ flag_group(
+ flags = [
+ "-fmodule-name=%{module_name}",
+ "-fmodule-map-file=%{module_map_file}",
+ ],
+ ),
+ ],
+ ),
+ ],
+ ),
+ feature(name = "module_maps", enabled = True),
+ feature(
+ name = "layering_check",
+ implies = ["use_module_maps"],
+ flag_sets = [
+ flag_set(
+ actions = all_compile_actions(),
+ flag_groups = [
+ flag_group(flags = [
+ "-fmodules-strict-decluse"
+ "-Wprivate-header",
+ ]),
+ flag_group(
+ iterate_over = "dependent_module_map_files",
+ flags = [
+ "-fmodule-map-file=%{dependent_module_map_files}",
+ ],
+ ),
+ ],
+ ),
+ ],
+ ),
feature(
name = "all_compile_flags",
enabled = True,
diff --git a/xla/literal.cc b/xla/literal.cc
index 2cef23917..d362f8af9 100644
--- a/xla/literal.cc
+++ b/xla/literal.cc
@@ -47,6 +47,7 @@ limitations under the License.
#include "tsl/platform/errors.h"
#include "tsl/platform/float8.h"
#include "tsl/platform/logging.h"
+#include "tsl/platform/platform.h"
#include "tsl/platform/mem.h"
#include "tsl/util/byte_swap_array.h"
@@ -0,0 +1,10 @@
diff --git a/src/important.cc b/src/important.cc
new file mode 100644
index 0000000..9c68461
--- /dev/null
+++ b/src/important.cc
@@ -0,0 +1,3 @@
+// Here we care if we find prohibited regexes.
+std::unique_ptr<int> add(int a, int b) {
+ return std::make_unique<int>(a + b);
+}