2016-07-14 19:16:42 +03:00
|
|
|
# -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*-
|
2014-09-04 12:44:01 +04:00
|
|
|
# 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/.
|
|
|
|
|
2016-03-11 05:01:55 +03:00
|
|
|
# dummy library name to avoid skipping building the sources here.
|
2020-10-24 03:36:18 +03:00
|
|
|
Library('clang-plugin-tests')
|
2016-03-11 05:01:55 +03:00
|
|
|
|
2014-09-04 12:44:01 +04:00
|
|
|
SOURCES += [
|
2020-10-24 03:36:18 +03:00
|
|
|
'TestAssertWithAssignment.cpp',
|
|
|
|
'TestBadImplicitConversionCtor.cpp',
|
|
|
|
'TestCanRunScript.cpp',
|
|
|
|
'TestCustomHeap.cpp',
|
|
|
|
'TestDanglingOnTemporary.cpp',
|
|
|
|
'TestExplicitOperatorBool.cpp',
|
|
|
|
'TestGlobalClass.cpp',
|
|
|
|
'TestHeapClass.cpp',
|
|
|
|
'TestInheritTypeAnnotationsFromTemplateArgs.cpp',
|
|
|
|
'TestKungFuDeathGrip.cpp',
|
|
|
|
'TestMultipleAnnotations.cpp',
|
|
|
|
'TestMustOverride.cpp',
|
|
|
|
'TestMustReturnFromCaller.cpp',
|
|
|
|
'TestMustUse.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',
|
2014-09-04 12:44:01 +04:00
|
|
|
]
|
|
|
|
|
2020-10-24 03:36:18 +03:00
|
|
|
if CONFIG['OS_ARCH'] == 'WINNT':
|
2018-03-07 15:36:44 +03:00
|
|
|
SOURCES += [
|
2020-10-24 03:36:18 +03:00
|
|
|
'TestFopenUsage.cpp',
|
|
|
|
'TestLoadLibraryUsage.cpp',
|
2018-03-07 15:36:44 +03:00
|
|
|
]
|
|
|
|
|
2020-10-24 03:36:18 +03:00
|
|
|
include('../external/tests/sources.mozbuild')
|
2020-03-05 19:29:13 +03:00
|
|
|
|
2020-10-24 03:36:18 +03:00
|
|
|
if CONFIG['ENABLE_CLANG_PLUGIN_ALPHA']:
|
2020-03-17 10:01:09 +03:00
|
|
|
DEFINES["MOZ_CLANG_PLUGIN_ALPHA"] = "1"
|
2020-10-24 03:36:18 +03:00
|
|
|
include('../alpha/tests/sources.mozbuild')
|
2020-03-17 10:01:09 +03:00
|
|
|
|
2017-09-11 21:33:26 +03:00
|
|
|
DisableStlWrapping()
|
2017-05-02 04:12:35 +03:00
|
|
|
NoVisibilityFlags()
|
2017-10-26 01:12:10 +03:00
|
|
|
|
|
|
|
# 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.
|
2020-10-24 03:36:18 +03:00
|
|
|
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']
|
|
|
|
)
|
|
|
|
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']
|
|
|
|
)
|
2018-07-31 16:10:07 +03:00
|
|
|
|
2018-08-30 20:29:54 +03:00
|
|
|
# Don't reflect WARNINGS_CFLAGS into CFLAGS, as the warnings flags should be
|
|
|
|
# as specified in OS_CFLAGS above.
|
|
|
|
DisableCompilerWarnings()
|