Source code

Revision control

Copy as Markdown

Other Tools

# -*- 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()