1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
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",
"TestSprintfLiteral.cpp",
"TestStackClass.cpp",
"TestStaticLocalClass.cpp",
"TestTemporaryClass.cpp",
"TestTemporaryLifetimeBound.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()
|