summaryrefslogtreecommitdiffstats
path: root/build/clang-plugin/tests/moz.build
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 00:47:55 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 00:47:55 +0000
commit26a029d407be480d791972afb5975cf62c9360a6 (patch)
treef435a8308119effd964b339f76abb83a57c29483 /build/clang-plugin/tests/moz.build
parentInitial commit. (diff)
downloadfirefox-26a029d407be480d791972afb5975cf62c9360a6.tar.xz
firefox-26a029d407be480d791972afb5975cf62c9360a6.zip
Adding upstream version 124.0.1.upstream/124.0.1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'build/clang-plugin/tests/moz.build')
-rw-r--r--build/clang-plugin/tests/moz.build101
1 files changed, 101 insertions, 0 deletions
diff --git a/build/clang-plugin/tests/moz.build b/build/clang-plugin/tests/moz.build
new file mode 100644
index 0000000000..45f416be44
--- /dev/null
+++ b/build/clang-plugin/tests/moz.build
@@ -0,0 +1,101 @@
+# -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*-
+# vim: set filetype=python:
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+
+# dummy library name to avoid skipping building the sources here.
+Library("clang-plugin-tests")
+
+SOURCES += [
+ "TestAssertWithAssignment.cpp",
+ "TestBadImplicitConversionCtor.cpp",
+ "TestCanRunScript.cpp",
+ "TestCustomHeap.cpp",
+ "TestDanglingOnTemporary.cpp",
+ "TestExplicitOperatorBool.cpp",
+ "TestGlobalClass.cpp",
+ "TestHeapClass.cpp",
+ "TestInheritTypeAnnotationsFromTemplateArgs.cpp",
+ "TestJSHandleRootedTypedef.cpp",
+ "TestKnownLive.cpp",
+ "TestKungFuDeathGrip.cpp",
+ "TestMultipleAnnotations.cpp",
+ "TestMustOverride.cpp",
+ "TestMustReturnFromCaller.cpp",
+ "TestNANTestingExpr.cpp",
+ "TestNANTestingExprC.c",
+ "TestNeedsNoVTableType.cpp",
+ "TestNoAddRefReleaseOnReturn.cpp",
+ "TestNoArithmeticExprInArgument.cpp",
+ "TestNoAutoType.cpp",
+ "TestNoDuplicateRefCntMember.cpp",
+ "TestNoExplicitMoveConstructor.cpp",
+ "TestNoNewThreadsChecker.cpp",
+ "TestNonHeapClass.cpp",
+ "TestNonMemMovable.cpp",
+ "TestNonMemMovableStd.cpp",
+ "TestNonMemMovableStdAtomic.cpp",
+ "TestNonParameterChecker.cpp",
+ "TestNonTemporaryClass.cpp",
+ "TestNonTrivialTypeInFfi.cpp",
+ "TestNoPrincipalGetUri.cpp",
+ "TestNoRefcountedInsideLambdas.cpp",
+ "TestNoUsingNamespaceMozillaJava.cpp",
+ "TestOverrideBaseCall.cpp",
+ "TestOverrideBaseCallAnnotation.cpp",
+ "TestParamTraitsEnum.cpp",
+ "TestRefCountedCopyConstructor.cpp",
+ "TestRefCountedThisInsideConstructor.cpp",
+ "TestSprintfLiteral.cpp",
+ "TestStackClass.cpp",
+ "TestStaticLocalClass.cpp",
+ "TestTemporaryClass.cpp",
+ "TestTrivialCtorDtor.cpp",
+ "TestTrivialDtor.cpp",
+]
+
+if CONFIG["OS_ARCH"] == "WINNT":
+ SOURCES += [
+ "TestFopenUsage.cpp",
+ "TestLoadLibraryUsage.cpp",
+ ]
+
+include("../external/tests/sources.mozbuild")
+
+if CONFIG["ENABLE_CLANG_PLUGIN_ALPHA"]:
+ DEFINES["MOZ_CLANG_PLUGIN_ALPHA"] = "1"
+ include("../alpha/tests/sources.mozbuild")
+
+DisableStlWrapping()
+NoVisibilityFlags()
+
+# Build without any warning flags, and with clang verify flag for a
+# syntax-only build (no codegen), without a limit on the number of errors.
+COMPILE_FLAGS["OS_CXXFLAGS"] = [
+ f for f in COMPILE_FLAGS.get("OS_CXXFLAGS", []) if not f.startswith("-W")
+] + [
+ "-fsyntax-only",
+ "-Xclang",
+ "-verify",
+ "-ferror-limit=0",
+ "-Wno-invalid-noreturn",
+ # For SpiderMonkey headers in TestJSHandleRootedTypedef.cpp
+ "-Wno-attributes",
+ "-Wno-invalid-offsetof",
+]
+COMPILE_FLAGS["OS_CFLAGS"] = [
+ f for f in COMPILE_FLAGS.get("OS_CFLAGS", []) if not f.startswith("-W")
+] + [
+ "-fsyntax-only",
+ "-Xclang",
+ "-verify",
+ "-ferror-limit=0",
+ "-Xclang",
+ "-std=c11",
+ "-Wno-invalid-noreturn",
+]
+
+# Don't reflect WARNINGS_CFLAGS into CFLAGS, as the warnings flags should be
+# as specified in OS_CFLAGS above.
+DisableCompilerWarnings()