gecko-dev/build/clang-plugin
Kartikaya Gupta cc4b5edc35 Bug 1638664 - Improve the way MozsearchIndexer merges analysis data. r=asuth
Instead of doing this:
a) read existing file into memory
b) append new entries
c) sort all entries
d) write unique entries back to file

We now do this:
a) sort new entries
b) loop through existing file entries, one at a time, writing them to a tmp file
c) insert the new entries in between the existing file entries in lexicographic order,
   and deduplicating the new entries
d) write any remaining new entries (that are lexicographically after the last
   entry in the pre-existing file), again deduplicating the entries
e) move tmp file back to original file location

This avoids reading the entire file into memory which could be potentially
hundreds of MB large.

The changes in FileOperations.* are needed to support these changes, as we now
have two files that we're dealing with - reading from one and writing to the
other. We still use a Mutex (Windows) or exclusive-flock (POSIX) on the file
for the duration of the entire operation, so we should still be robust in the
face of multiple concurrently running clang processes.

Differential Revision: https://phabricator.services.mozilla.com/D76202
2020-05-25 18:53:36 +00:00
..
alpha Bug 1614371 - Move mozilla-performance-temp-refptr check to alpha checker repo. r=andi 2020-03-19 14:19:15 +00:00
external Bug 1617991 - Add folder structure to import external static checks; r=andi,static-analysis-reviewers,dmajor 2020-03-05 16:29:13 +00:00
mozsearch-plugin Bug 1638664 - Improve the way MozsearchIndexer merges analysis data. r=asuth 2020-05-25 18:53:36 +00:00
tests Bug 1638576 - Correct spelling of "deprecated" (follow-up to bug 1611160). r=sylvestre 2020-05-17 20:20:38 +00:00
.clang-format
ArithmeticArgChecker.cpp Bug 1501821 - Update clang-plugin in order to make it compatiable with clang 8.0.0 trunk. r=froydnj 2018-11-03 13:41:36 +00:00
ArithmeticArgChecker.h
AssertAssignmentChecker.cpp Bug 1501821 - Update clang-plugin in order to make it compatiable with clang 8.0.0 trunk. r=froydnj 2018-11-03 13:41:36 +00:00
AssertAssignmentChecker.h
BaseCheck.h Bug 1589096 - add registerPPCallbacks to our version of clang-tidy due to a limitation in mozilla-must-override. r=sylvestre 2019-10-31 12:16:35 +00:00
CanRunScriptChecker.cpp Bug 1535530. Fix can-run-script analysis to not mishandle on-stack refs to RefPtrs. r=andi,masayuki 2020-03-06 09:57:45 +00:00
CanRunScriptChecker.h
Checks.inc Bug 1614371 - Move mozilla-performance-temp-refptr check to alpha checker repo. r=andi 2020-03-19 14:19:15 +00:00
ChecksIncludes.inc Bug 1614371 - Move mozilla-performance-temp-refptr check to alpha checker repo. r=andi 2020-03-19 14:19:15 +00:00
CustomAttributes.cpp Bug 1615826 - Reformat `clang-plugin` to LLVM standard. r=froydnj 2020-02-17 18:30:50 +00:00
CustomAttributes.h Bug 1615826 - Reformat `clang-plugin` to LLVM standard. r=froydnj 2020-02-17 18:30:50 +00:00
CustomAttributes.inc Bug 1581315 part 1. Adjust MOZ_MUST_RETURN_FROM_CALLER to only apply to method calls on arguments. r=nika 2019-09-20 02:17:01 +00:00
CustomMatchers.h Bug 1611160 - Add Clang Plugin for nsIPrincipal r=ckerschb,andi 2020-03-03 14:30:36 +00:00
CustomTypeAnnotation.cpp Bug 1569681: Part 1 - Add support for moz_static_local_class and moz_trivial_dtor to clang-plugin; r=Ehsan 2019-07-30 18:50:52 +00:00
CustomTypeAnnotation.h Bug 1569681: Part 1 - Add support for moz_static_local_class and moz_trivial_dtor to clang-plugin; r=Ehsan 2019-07-30 18:50:52 +00:00
DanglingOnTemporaryChecker.cpp Bug 1615826 - Reformat `clang-plugin` to LLVM standard. r=froydnj 2020-02-17 18:30:50 +00:00
DanglingOnTemporaryChecker.h
DiagnosticsMatcher.cpp Bug 1619921 - enable clang-plugin with support for alpha checkers module. r=froydnj,sg 2020-03-17 07:01:09 +00:00
DiagnosticsMatcher.h Bug 1619921 - enable clang-plugin with support for alpha checkers module. r=froydnj,sg 2020-03-17 07:01:09 +00:00
ExplicitImplicitChecker.cpp Bug 1483953 - Add a FixIt hint for the ExplicitImplicitChecker analysis. r=Ehsan 2018-08-24 14:11:26 +00:00
ExplicitImplicitChecker.h
ExplicitOperatorBoolChecker.cpp Bug 1615826 - Reformat `clang-plugin` to LLVM standard. r=froydnj 2020-02-17 18:30:50 +00:00
ExplicitOperatorBoolChecker.h
FopenUsageChecker.cpp Bug 1615245 - checker `fopen-usage` should ignore some `gtest` include files. r=froydnj 2020-02-15 17:56:39 +00:00
FopenUsageChecker.h Bug 1615826 - Reformat `clang-plugin` to LLVM standard. r=froydnj 2020-02-17 18:30:50 +00:00
KungFuDeathGripChecker.cpp Bug 1605075 - Ignore kfdg variables initialized from xvalues in KungFuDeatGripChecker. r=andi 2020-04-09 09:48:13 +00:00
KungFuDeathGripChecker.h
LoadLibraryUsageChecker.cpp Bug 1511889 - Update clang-plugin LoadLibraryUsageChecker to use getBeginLoc. r=froydnj 2018-12-06 16:34:13 +00:00
LoadLibraryUsageChecker.h Bug 1440886 - Implement a static analysis checker to detect usage of PR_LoadLibrary and LoadLibraryA/LoadLibraryExA/LoadLibrary/LoadLibraryEx. r=Nika 2018-03-07 14:36:44 +02:00
Makefile.in Bug 1522771: Use -brepro to build clang-plugin.dll deterministically. r=mshal 2019-01-25 11:09:13 -05:00
MemMoveAnnotation.h Bug 1579351 - Add constant complexity for MemMoveAnnotation when looking for specific `std::atomic`. r=froydnj 2019-09-09 13:30:16 +00:00
MozCheckAction.cpp Bug 1591493 - Clang plugin should work with distributed builds. r=andi 2019-10-28 06:54:25 +00:00
MozillaTidyModule.cpp Bug 1619921 - enable clang-plugin with support for alpha checkers module. r=froydnj,sg 2020-03-17 07:01:09 +00:00
MustOverrideChecker.cpp Bug 1589096 - add registerPPCallbacks to our version of clang-tidy due to a limitation in mozilla-must-override. r=sylvestre 2019-10-31 12:16:35 +00:00
MustOverrideChecker.h Bug 1589096 - add registerPPCallbacks to our version of clang-tidy due to a limitation in mozilla-must-override. r=sylvestre 2019-10-31 12:16:35 +00:00
MustReturnFromCallerChecker.cpp Bug 1615826 - Reformat `clang-plugin` to LLVM standard. r=froydnj 2020-02-17 18:30:50 +00:00
MustReturnFromCallerChecker.h Bug 1580260 - rework the logic for `MustReturnFromCaller` checker. r=froydnj 2020-02-05 08:34:36 +00:00
MustUseChecker.cpp Bug 1501821 - Update clang-plugin in order to make it compatiable with clang 8.0.0 trunk. r=froydnj 2018-11-03 13:41:36 +00:00
MustUseChecker.h
NaNExprChecker.cpp Bug 1332689 - Remove clang 3.9 compat code for the clang-plugin. r=andi 2019-10-28 06:55:00 +00:00
NaNExprChecker.h
NeedsNoVTableTypeChecker.cpp Bug 1501821 - Update clang-plugin in order to make it compatiable with clang 8.0.0 trunk. r=froydnj 2018-11-03 13:41:36 +00:00
NeedsNoVTableTypeChecker.h
NoAddRefReleaseOnReturnChecker.cpp Bug 1501821 - Update clang-plugin in order to make it compatiable with clang 8.0.0 trunk. r=froydnj 2018-11-03 13:41:36 +00:00
NoAddRefReleaseOnReturnChecker.h
NoAutoTypeChecker.cpp
NoAutoTypeChecker.h
NoDuplicateRefCntMemberChecker.cpp Bug 1501821 - Update clang-plugin in order to make it compatiable with clang 8.0.0 trunk. r=froydnj 2018-11-03 13:41:36 +00:00
NoDuplicateRefCntMemberChecker.h
NoExplicitMoveConstructorChecker.cpp
NoExplicitMoveConstructorChecker.h
NoNewThreadsChecker.cpp Bug 1613440 - Add new clang plugin to deprecate NS_NewNamedThread r=andi 2020-02-27 12:53:54 +00:00
NoNewThreadsChecker.h Bug 1613440 - Add new clang plugin to deprecate NS_NewNamedThread r=andi 2020-02-27 12:53:54 +00:00
NoPrincipalGetURI.cpp Bug 1638576 - Correct spelling of "deprecated" (follow-up to bug 1611160). r=sylvestre 2020-05-17 20:20:38 +00:00
NoPrincipalGetURI.h Bug 1611160 - Add Clang Plugin for nsIPrincipal r=ckerschb,andi 2020-03-03 14:30:36 +00:00
NoUsingNamespaceMozillaJavaChecker.cpp Bug 1615826 - Reformat `clang-plugin` to LLVM standard. r=froydnj 2020-02-17 18:30:50 +00:00
NoUsingNamespaceMozillaJavaChecker.h Bug 1615826 - Reformat `clang-plugin` to LLVM standard. r=froydnj 2020-02-17 18:30:50 +00:00
NonMemMovableMemberChecker.cpp
NonMemMovableMemberChecker.h
NonMemMovableTemplateArgChecker.cpp
NonMemMovableTemplateArgChecker.h
NonParamInsideFunctionDeclChecker.cpp Bug 1487622 - Refactor the clang plugin wrt attributes r=andi 2018-09-18 13:03:33 +00:00
NonParamInsideFunctionDeclChecker.h
NonTrivialTypeInFfiChecker.cpp Bug 1613176 - Introduce NonTrivialTypeInFfiChecker. r=andi 2020-02-11 13:11:29 +00:00
NonTrivialTypeInFfiChecker.h Bug 1613176 - Introduce NonTrivialTypeInFfiChecker. r=andi 2020-02-11 13:11:29 +00:00
OverrideBaseCallChecker.cpp Bug 1487622 - Refactor the clang plugin wrt attributes r=andi 2018-09-18 13:03:33 +00:00
OverrideBaseCallChecker.h
OverrideBaseCallUsageChecker.cpp
OverrideBaseCallUsageChecker.h
ParamTraitsEnumChecker.cpp Bug 1615826 - Reformat `clang-plugin` to LLVM standard. r=froydnj 2020-02-17 18:30:50 +00:00
ParamTraitsEnumChecker.h Bug 1615826 - Reformat `clang-plugin` to LLVM standard. r=froydnj 2020-02-17 18:30:50 +00:00
RecurseGuard.h
RefCountedCopyConstructorChecker.cpp
RefCountedCopyConstructorChecker.h
RefCountedInsideLambdaChecker.cpp Bug 1501821 - Update clang-plugin in order to make it compatiable with clang 8.0.0 trunk. r=froydnj 2018-11-03 13:41:36 +00:00
RefCountedInsideLambdaChecker.h
ScopeChecker.cpp Bug 1615826 - Reformat `clang-plugin` to LLVM standard. r=froydnj 2020-02-17 18:30:50 +00:00
ScopeChecker.h
SprintfLiteralChecker.cpp Bug 1332689 - Remove clang 3.9 compat code for the clang-plugin. r=andi 2019-10-28 06:55:00 +00:00
SprintfLiteralChecker.h
StmtToBlockMap.h
ThirdPartyPaths.h Bug 1562642 - Part 2 - Add missing MPL2 headers r=Gijs 2019-07-08 09:27:47 +00:00
ThirdPartyPaths.py Bug 1617131 - Sort the list of third party paths. r=sylvestre 2020-02-21 11:04:12 +00:00
ThreadAllows.py Bug 1618720 - Generate the ThreadAllow list deterministically. r=erahm,dmajor 2020-02-28 00:41:47 +00:00
ThreadAllows.txt Bug 1634253 - P6. Remove MessageLoop use from gfx. r=kats,mattwoodrow 2020-05-08 20:20:44 +00:00
ThreadFileAllows.txt Bug 1613440 - Add new clang plugin to deprecate NS_NewNamedThread r=andi 2020-02-27 12:53:54 +00:00
TrivialCtorDtorChecker.cpp Bug 1501821 - Update clang-plugin in order to make it compatiable with clang 8.0.0 trunk. r=froydnj 2018-11-03 13:41:36 +00:00
TrivialCtorDtorChecker.h
TrivialDtorChecker.cpp Bug 1615826 - Reformat `clang-plugin` to LLVM standard. r=froydnj 2020-02-17 18:30:50 +00:00
TrivialDtorChecker.h Bug 1569681: Part 1 - Add support for moz_static_local_class and moz_trivial_dtor to clang-plugin; r=Ehsan 2019-07-30 18:50:52 +00:00
Utils.h Bug 1630383: Add irregexp to ignore list for implicit constructor static analysis r=sfink 2020-04-17 17:18:57 +00:00
VariableUsageHelpers.cpp Bug 1562642 - Part 2 - Add missing MPL2 headers r=Gijs 2019-07-08 09:27:47 +00:00
VariableUsageHelpers.h
import_mozilla_checks.py Bug 1625884 - move `clang-tidy` and `clang-format` to `clang-10`. r=nalexander 2020-04-09 14:16:44 +00:00
moz.build Bug 1614371 - Move mozilla-performance-temp-refptr check to alpha checker repo. r=andi 2020-03-19 14:19:15 +00:00
plugin.h Bug 1589096 - add registerPPCallbacks to our version of clang-tidy due to a limitation in mozilla-must-override. r=sylvestre 2019-10-31 12:16:35 +00:00