Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
1564 commits
Select commit Hold shift + click to select a range
d1337ec
[clang-tidy] Fix module registry name and description for Darwin clan…
gribozavr Oct 1, 2019
a160a0b
[clangd] Handle OverloadExpr in targetDecl
ilya-biryukov Oct 1, 2019
7009204
Decrease the verbosity of the -ftime-trace option
sylvestre Oct 1, 2019
95aee9d
[NFC][HardwareLoops] Update some iterators
sparker-arm Oct 1, 2019
827a7fa
Revert "GlobalISel: Handle llvm.read_register"
gribozavr Oct 1, 2019
f58d019
Revert "[OCaml] Handle nullptr in Llvm.global_initializer"
gribozavr Oct 1, 2019
cf62871
[clang][lldb][NFC] Encapsulate ExternalASTMerger::ImporterSource
Teemperor Oct 1, 2019
8109901
[llvm-exegesis][NFC] Refactor X86 tests fixtures into a base class.
legrosbuffle Oct 1, 2019
c2c377e
Fixup r373278: Move test to X86 directory
rovka Oct 1, 2019
e5163eb
[yaml2obj/obj2yaml] - Add support for SHT_HASH sections.
Oct 1, 2019
0210a1a
[yaml2obj] - Allow specifying custom Link values for SHT_HASH section.
Oct 1, 2019
6d7f7e6
Reland "[utils] Implement the llvm-locstats tool"
djtodoro Oct 1, 2019
1d32da8
[clangd] Handle template arguments in findExplicitReferences
ilya-biryukov Oct 1, 2019
c764c36
[obj2yaml] - Fix BB after r373315.
Oct 1, 2019
d6d5edd
[clangd] Use the index-based API to do the header-source switch.
hokein Oct 1, 2019
d71315f
ConstantFold - ConstantFoldSelectInstruction - assume constant vector…
RKSimon Oct 1, 2019
339b1b5
InstrProf - avoid static analyzer dyn_cast<ConstantInt> null derefere…
RKSimon Oct 1, 2019
9f2bf66
[clangd] Implement getBeginning for overloaded operators.
hokein Oct 1, 2019
bc9a1b3
ObjectFile makeTriple - silence static analyzer dyn_cast<COFFObjectFi…
RKSimon Oct 1, 2019
7ce3123
VirtualFileSystem - replace dyn_cast<>+assert with cast<> calls. NFCI.
RKSimon Oct 1, 2019
30f76ca
DIExpression::createFragmentExpression - silence static analyzer DIEx…
RKSimon Oct 1, 2019
ed5a897
[clang] Ignore builtin namespaces in test/Import/cxx-anon-namespace
Teemperor Oct 1, 2019
371ea70
[libc++] Harden usage of static_assert against C++03
ldionne Oct 1, 2019
d01b4a7
[lldb][NFC] Modernize ClangASTContext constructor
Teemperor Oct 1, 2019
c73bfc9
[lldb][NFC] Disallow changing the ASTContext of an ClangASTContext af…
Teemperor Oct 1, 2019
ef7990a
[NFC][ARM][MVE] More tests
sparker-arm Oct 1, 2019
f488cbd
[llvm-exegesis/lib] Fix missing linkage to MCParser
mgorny Oct 1, 2019
8fc6a1b
[InstCombine] sprintf(dest, "%s", str) -> memccpy(dest, str, 0, MAX)
davidbolvansky Oct 1, 2019
1ce7504
[lldb][NFC] Remove unused ClangASTContext functions for checking/remo…
Teemperor Oct 1, 2019
4037582
Revert [InstCombine] sprintf(dest, "%s", str) -> memccpy(dest, str, 0…
davidbolvansky Oct 1, 2019
372048e
Revert "Reland "[utils] Implement the llvm-locstats tool""
djtodoro Oct 1, 2019
e4e305e
[lldb][NFC] Remove unused ClangASTContext::GetHasExternalStorage
Teemperor Oct 1, 2019
9eb2bd6
Revert rL349624 : Let TableGen write output only if it changed, inste…
RKSimon Oct 1, 2019
b67c3b6
[lldb][NFC] Mark ClangASTContext constructor as explicit
Teemperor Oct 1, 2019
fd019ed
[clang] Make handling of unnamed template params similar to function …
kadircet Oct 1, 2019
56b52a2
[Dominators][CodeGen] Add MachinePostDominatorTree verification
kuhar Oct 1, 2019
796cd31
Update SymbolFilePDB for FindTypes API change.
adrian-prantl Oct 1, 2019
3c912c4
[DAG][X86] Convert isNegatibleForFree/GetNegatedExpression to a targe…
RKSimon Oct 1, 2019
bf9d84c
Remove size_t return parameter from FindTypes
adrian-prantl Oct 1, 2019
362055d
[Diagnostics] Move warning into the subgroup (-Wenum-compare-conditio…
davidbolvansky Oct 1, 2019
e536800
[AMDGPU] Add VerifyScheduling support.
jayfoad Oct 1, 2019
0bb825d
ELF: Add .interp synthetic sections first in createSyntheticSections().
pcc Oct 1, 2019
658ad4d
[OPENMP]Fix PR43516: Compiler crash with collapse(2) on non-rectangular
alexey-bataev Oct 1, 2019
105e82e
[X86] Add a VBROADCAST_LOAD ISD opcode representing a scalar load bro…
topperc Oct 1, 2019
9dba603
AMDGPU/GlobalISel: Increase max legal size to 1024
arsenm Oct 1, 2019
0200626
[IndVars] An implementation of loop predication without a need for sp…
preames Oct 1, 2019
771d464
Simplify condition (NFC)
adrian-prantl Oct 1, 2019
c7f19ca
Typo (NFC)
adrian-prantl Oct 1, 2019
ad08a5f
Fix a condition-flip regression introduced in r373344.
adrian-prantl Oct 1, 2019
dffe5df
Fix a syntax error.
adrian-prantl Oct 1, 2019
a1e7efa
[ReleaseProcess] Document requirement to set MACOSX_DEPLOYMENT_TARGET
vedantk Oct 1, 2019
42ec0b7
Add missing REQUIRES: arm.
pcc Oct 1, 2019
9292983
[llvm-mca] Add a -mattr flag
davemgreen Oct 1, 2019
2783d81
[JSON] Use LLVM's library for encoding JSON in StructuredData
JDevlieghere Oct 1, 2019
57b4688
[JSON] Use LLVM's library for decoding JSON in StructuredData
JDevlieghere Oct 1, 2019
e09adb4
[JSON] Use LLVM's library for argdumper
JDevlieghere Oct 1, 2019
f273fc7
[NFC][InstCombine] (Better) tests for sign-bit-smearing pattern
LebedevRI Oct 1, 2019
6514414
[InstCombine] Preserve 'exact' in -(X >>u 31) -> (X >>s 31) fold
LebedevRI Oct 1, 2019
053014f
[InstCombine] Deal with -(trunc(X >>u 63)) -> trunc(X >>s 63)
LebedevRI Oct 1, 2019
4ff35a8
[libc++abi] Remove redundant #include of <string.h>
ldionne Oct 1, 2019
004c791
AMDGPU/SILoadStoreOptimizer: Add helper functions for working with Co…
tstellar Oct 1, 2019
3ee619c
Revert "compiler-rt: use __GLIBC_PREREQ for SANITIZER_INTERCEPT_GETRA…
vitalybuka Oct 1, 2019
a3ebcfe
[ARM] Some MVE shuffle plus extend tests. NFC
davemgreen Oct 1, 2019
e0fa268
[PGO] Fix typos from r359612. NFC.
xur-llvm Oct 1, 2019
dca5b94
[ThinLTO] Enable index-only WPD from clang
teresajohnson Oct 1, 2019
00d632e
[Diagnostics] Make -Wenum-compare-conditional off by default
davidbolvansky Oct 1, 2019
a288695
[libc++] Update link to Itanium C++ ABI documentation
ldionne Oct 1, 2019
f3d2158
Make another attempt at fixing SymbolFilePDBTests.
adrian-prantl Oct 1, 2019
b9b8ca2
[OPENMP]Fix PR43330: OpenMP target: Mapping of partial arrays fails.
alexey-bataev Oct 1, 2019
1f345cb
[NFC] Updated tests after rL373371
davidbolvansky Oct 1, 2019
925c285
Reapply [Dominators][CodeGen] Clean up MachineDominators
kuhar Oct 1, 2019
5be08ee
[Dominators][CodeGen] Fix MachineDominatorTree preservation in PHIEli…
kuhar Oct 1, 2019
856c1cd
[Dominators][CodeGen] Don't mark MachineDominatorTree as preserved in…
kuhar Oct 1, 2019
2cee0e2
[NFC][libc++abi] Remove trailing whitespace from sources
ldionne Oct 1, 2019
ae40dfc
[MemorySSA] Update last_access_in_block check.
alinas Oct 1, 2019
04501a2
[libc++abi] Remove uses of C++ headers when possible
ldionne Oct 1, 2019
7ed4fb3
Add a missing pass in ARM O3 pipeline
kuhar Oct 1, 2019
890090f
[MemorySSA] Check for unreachable blocks when getting last definition.
alinas Oct 1, 2019
32f869e
[libc++] Remove workaround for D63883
ldionne Oct 1, 2019
bcab951
[libc++] Re-apply workaround for D63883
ldionne Oct 1, 2019
91b62d5
[DDG] Data Dependence Graph - Root Node
bmahjour Oct 1, 2019
2df5f12
[OPENMP50]Initial codegen for declare variant implementation vendor.
alexey-bataev Oct 1, 2019
6036502
[clang-format] [PR43372] - clang-format shows replacements in DOS fil…
mydeveloperday Oct 1, 2019
6366361
[ASan] Make GlobalsMD member a const reference.
PiJoules Oct 1, 2019
85ee0c2
[NFC] Fix typos in libc++ documentation
ldionne Oct 1, 2019
8830975
[ASan][NFC] Address remaining comments for https://reviews.llvm.org/D…
PiJoules Oct 1, 2019
e4acb97
[clang-tidy] Rename objc-avoid-spinlock check to darwin-avoid-spinlock
stephanemoore Oct 1, 2019
081e9df
gn build: Merge r373392
llvmgnsyncbot Oct 1, 2019
9738fd6
[BypassSlowDivision][CodeGenPrepare] avoid crashing on unused code (P…
rotateright Oct 1, 2019
ed11786
[FileCheck] Move private interface to its own header
Oct 1, 2019
f7133b7
CGExprAgg - remove duplicate code. NFCI.
RKSimon Oct 1, 2019
9128705
[X86] convertToThreeAddress, make sure second operand of SUB32ri is r…
topperc Oct 1, 2019
5e0a0b7
CGVTables - silence static analyzer getAs<FunctionProtoType> null der…
RKSimon Oct 1, 2019
a77c3ef
[lldb] Fix unused variable warning
rupprecht Oct 1, 2019
5269091
[clang][OpenMP][NFC] #include GlobalDecl.h to avoid incomplete class …
rupprecht Oct 1, 2019
0da163a
Revert r373172 "[X86] Add custom isel logic to match VPTERNLOG from 2…
topperc Oct 1, 2019
9b36c1c
Determine endianness at a time when it doesn't inadvertantly clear gd…
Sterling-Augustine Oct 1, 2019
1c8e051
[libFuzzer] Remove lazy counters.
morehouse Oct 1, 2019
e4ee28d
AMDGPU: Fix an out of date assert in addressing FrameIndex
Oct 1, 2019
bbde056
[CMake] Fix the value of `config.target_cflags` for non-macOS Apple p…
delcypher Oct 1, 2019
c45f8d4
Use scope qualifiers in Clang's tblgen backends to get useful
rjmccall Oct 1, 2019
a82d2fe
Emit TypeNodes.def with tblgen.
rjmccall Oct 1, 2019
8c19925
[X86] Add a DAG combine to shrink vXi64 gather/scatter indices that a…
topperc Oct 1, 2019
e2385e0
Make yet another attempt in restoring SymbolFilePDBTests
adrian-prantl Oct 2, 2019
d838cf7
Fix unused variable warning. NFCI.
darkbuck Oct 2, 2019
075bc48
[AMDGPU] separate accounting for agprs
rampitec Oct 2, 2019
3a657af
AMDGPU/GlobalISel: Fix RegBankSelect for 1024-bit values
arsenm Oct 2, 2019
05aa8a7
AMDGPU/GlobalISel: Legalize 1024-bit G_BUILD_VECTOR
arsenm Oct 2, 2019
bfce0c2
AMDGPU/GlobalISel: Private loads always use VGPRs
arsenm Oct 2, 2019
cdfe5ef
AMDGPU/GlobalISel: Assume VGPR for G_FRAME_INDEX
arsenm Oct 2, 2019
c60a824
Remove TypeNodes.def from the modulemap.
rjmccall Oct 2, 2019
86f864d
AMDGPU/GlobalISel: Use getIntrinsicID helper
arsenm Oct 2, 2019
5e18f4d
Fix crash on constant-evaluation of pseudo-destruction of a pointer.
zygoloid Oct 2, 2019
9e763e1
gn build: (manually) merge r373407
nico Oct 2, 2019
bfc6888
DebugInfo: Update support for detecting C++ language variants in debu…
dwblaikie Oct 2, 2019
e388725
Revert r368237 - Update fix-it hints for std::move warnings.
Weverything Oct 2, 2019
c3aab6e
Fix GCC -Wreturn-type warnings. NFC.
darkbuck Oct 2, 2019
8d6a863
[X86] Add broadcast load folding patterns to the NoVLX compare patterns.
topperc Oct 2, 2019
64a362e
[llvm-lib] Correctly handle .lib input files
rui314 Oct 2, 2019
36b12a8
Rename TypeNodes.def to TypeNodes.inc for consistency across all
rjmccall Oct 2, 2019
60e9df3
[llvm-lib] Detect duplicate input files
rui314 Oct 2, 2019
2ef18fb
Reland "[utils] Implement the llvm-locstats tool"
djtodoro Oct 2, 2019
1c57143
[clang-tidy] Fix for commits rL372706 and rL372711
Oct 2, 2019
167b052
[Local] Simplify function removeUnreachableBlocks() to avoid (re-)com…
fhahn Oct 2, 2019
70f7003
[GlobalOpt] Pass DTU to removeUnreachableBlocks instead of recomputing.
fhahn Oct 2, 2019
cbefc36
Switch lowering: omit range check for bit tests when default is unrea…
zmodem Oct 2, 2019
47dbcbd
Revert [GlobalOpt] Pass DTU to removeUnreachableBlocks instead of rec…
fhahn Oct 2, 2019
dafda61
[AMDGPU] Make printf lowering faster when there are no printfs
jayfoad Oct 2, 2019
c38188c
Remove an unnecessary cast. NFC.
jayfoad Oct 2, 2019
e95e516
[clangd] Always send file URIs to editors
kadircet Oct 2, 2019
442be72
[clang-tidy] Fix typo in r373428
sam-mccall Oct 2, 2019
76365b3
[IntrinsicEmitter] Add overloaded type VecOfBitcastsToInt for SVE int…
kmclaughlin-arm Oct 2, 2019
b54302e
gn build: (manually) merge r373425
nico Oct 2, 2019
e503256
[ClangFormat] Future-proof Standard option, allow floating or pinning…
sam-mccall Oct 2, 2019
fbd134f
[clang-rename] Better renaming the typedef decl.
hokein Oct 2, 2019
08bfd9e
[ClangFormat] relnotes for r373439
sam-mccall Oct 2, 2019
20c5fbb
[clangd] SelectionTree should mark a node as fully-selected if the on…
sam-mccall Oct 2, 2019
d44fc23
[clangd] Bail out early if we are sure that the symbol is used outsid…
hokein Oct 2, 2019
353ac42
[Support, ARM64] Define getHostCPUFeatures for Windows on ARM64 platform
mstorsjo Oct 2, 2019
c9b5ab8
[ARM] Identity shuffles are legal
davemgreen Oct 2, 2019
eed4b12
ASTContext - silence static analyzer getAs<> null dereference warning…
RKSimon Oct 2, 2019
2bb217b
MetadataLoader upgradeCUVariables() - silence static analyzer dyn_cas…
RKSimon Oct 2, 2019
c9129ce
WinException::emitExceptHandlerTable - silence static analyzer dyn_ca…
RKSimon Oct 2, 2019
d2a3e89
Fix uninitialized variable warning. NFCI.
RKSimon Oct 2, 2019
d06ee79
Log2_32 returns an unsigned. NFCI.
RKSimon Oct 2, 2019
619bceb
Fix libc++ pretty printer test for Python 3 after D67238
MaskRay Oct 2, 2019
da4cbae
LICM - remove unused variable and reduce scope of another variable. N…
RKSimon Oct 2, 2019
372aece
Revert r373431 "Switch lowering: omit range check for bit tests when …
zmodem Oct 2, 2019
be21ceb
[InstSimplify] fold fma/fmuladd with a NaN or undef operand
rotateright Oct 2, 2019
b1fe6c9
NFC: directly return when CommonExitBlock != Succ
hiraditya Oct 2, 2019
2eb963a
[lldb][NFC] Create the ASTContext in ClangASTContext exactly once.
Teemperor Oct 2, 2019
f2ffa7a
[InstCombine] Precommit tests for D68265
fhahn Oct 2, 2019
067ed96
[InstCombine] Simplify fma multiplication to nan for undef or nan ope…
fhahn Oct 2, 2019
ecbfb85
[lldb][NFC] Remove ClangASTContext::Clear
Teemperor Oct 2, 2019
671fb34
[llvm-objcopy] Add --set-section-alignment
MaskRay Oct 2, 2019
9026518
[ModuloSchedule] Peel out prologs and epilogs, generate actual code
Oct 2, 2019
5591722
gn build: Merge r373462
llvmgnsyncbot Oct 2, 2019
369d16a
AsmPrinter - emitGlobalConstantFP - silence static analyzer null dere…
RKSimon Oct 2, 2019
e2ded3d
LoopAccessAnalysis isConsecutiveAccess() - silence static analyzer dy…
RKSimon Oct 2, 2019
65e1150
MemorySSA tryOptimizePhi - assert that we've found a DefChainEnd. NFCI.
RKSimon Oct 2, 2019
b635964
MemorySSAUpdater::applyInsertUpdates - silence static analyzer dyn_ca…
RKSimon Oct 2, 2019
822b298
[AArch64][SVE] Implement int_aarch64_sve_cnt intrinsic
kmclaughlin-arm Oct 2, 2019
4529764
[llvm-dwarfdump] Fix dumping of wrong locstats map
djtodoro Oct 2, 2019
5c375ed
[lldb] Fix evaluation of nested classes with parent from other CU
Teemperor Oct 2, 2019
f175807
[Clangd] Ensure children are always RootStmt in ExtractFunction (Fixe…
sureyeaah Oct 2, 2019
a24762e
[Clangd] ExtractFunction: Don't extract body of enclosing function.
sureyeaah Oct 2, 2019
6fa696f
[yaml2obj] - Alow Size tag for describing SHT_HASH sections.
Oct 2, 2019
920ff02
SemaInit - silence static analyzer getAs<> null dereference warnings.…
RKSimon Oct 2, 2019
ed3b68e
SemaOverload - silence static analyzer getAs<> null dereference warni…
RKSimon Oct 2, 2019
4496f07
[llvm-readelf] - Report a warning when .hash section contains a chain…
Oct 2, 2019
9330005
Reapply r373431 "Switch lowering: omit range check for bit tests when…
zmodem Oct 2, 2019
e071201
Silence static analyzer getAs<VectorType> null dereference warnings. …
RKSimon Oct 2, 2019
c4a7b91
[CodeExtractor] NFC: Refactor sanity checks into isEligible
hiraditya Oct 2, 2019
96ab296
Type - silence static analyzer getAs<> null dereference warnings. NFCI.
RKSimon Oct 2, 2019
91b4085
LowerExpectIntrinsic handlePhiDef - silence static analyzer dyn_cast<…
RKSimon Oct 2, 2019
c2c419c
[llvm] [cmake] Add install targets for missing distribution components
mgorny Oct 2, 2019
3f4726b
[SLP] add test for vectorization of different widths (PR28457); NFC
rotateright Oct 2, 2019
49c2390
[CodeGen] Remove unused MachineMemOperand::print wrappers (PR41772)
RKSimon Oct 2, 2019
077cc3f
[ThinLTO/WPD] Ensure devirtualized targets use promoted symbol when n…
teresajohnson Oct 2, 2019
ef315b5
[libc++] Use PRIVATE instead of PUBLIC when linking against system libs
ldionne Oct 2, 2019
eb6700b
[Local] Remove unused LazyValueInfo pointer from removeUnreachableBlock.
fhahn Oct 2, 2019
b879fd0
Add the misc-init-local-variables check.
AaronBallman Oct 2, 2019
265e94e
[AMDGPU] Extend buffer intrinsics with swizzling
piotrAMD Oct 2, 2019
9ba60b3
gn build: Merge r373489
llvmgnsyncbot Oct 2, 2019
5b74c39
[WebAssembly] Error when using wasm64 for ISel
tlively Oct 2, 2019
0cacf13
Fix: Actually erase remove the elements from AssumeHandles
hiraditya Oct 2, 2019
74c7d6b
[X86] Rewrite to the vXi1 subvector insertion code to not rely on the…
topperc Oct 2, 2019
9beb456
[JSON] Use LLVM's library for encoding JSON in GDBRemoteCommunication…
JDevlieghere Oct 2, 2019
2a5a906
[JSON] Use LLVM's library for encoding JSON in GDBRemoteCommunication…
JDevlieghere Oct 2, 2019
7cb720d
[JSON] Use LLVM's library for encoding JSON in GDBRemoteCommunication…
JDevlieghere Oct 2, 2019
4f8151e
[JSON] Use LLVM's library for encoding JSON in GDBRemoteCommunication…
JDevlieghere Oct 2, 2019
2a0c8b1
[JSON] Remove Utility/JSON.{h|cpp}
JDevlieghere Oct 2, 2019
a15a141
[OPENMP50]Add parsing/sema analysis for declare variant score.
alexey-bataev Oct 2, 2019
12e915b
[ARM] Make helpers static. NFC.
d0k Oct 2, 2019
340406a
[Stencil] Hide implementaion detai. NFC.
d0k Oct 2, 2019
24ae5ce
[MemorySSA] Update Phi creation when inserting a Def.
alinas Oct 2, 2019
9cc90ec
[libc++] Revert to using PUBLIC instead of PRIVATE when linking syste…
ldionne Oct 2, 2019
6fdeb03
[ObjectFileMachO] Catch up with FileDesc changes.
dcci Oct 2, 2019
ef46be6
[ObjectFileMachO] FileSpec::SetFile() now takes the style as arg.
dcci Oct 2, 2019
293ec1e
[RegisterContextDarwin_arm64] Include the headers for getsysctlbyname.
dcci Oct 2, 2019
3c10843
[ARM64] XPC services are unsupported on device.
dcci Oct 2, 2019
c78c0e0
[libc++] Use a function to set warning flags per target
ldionne Oct 2, 2019
a80b6c1
[Local] Handle terminators with users in removeUnreachableBlocks.
fhahn Oct 2, 2019
e139a73
[TableGen] Improve error reporting of overlapping definitions (NFC)
Oct 2, 2019
464df87
Handle llvm.launder.invariant.group in msan.
eugenis Oct 2, 2019
9ac0cda
Fix inconsistent indentation in TableGen.cpp
dsandersllvm Oct 2, 2019
925d9d2
[libc++] Use functions instead of global variables to set libc++ buil…
ldionne Oct 2, 2019
e55c442
[sanitizer_common] Rename OnPrint to __sanitizer_on_print.
morehouse Oct 2, 2019
c7be067
[PowerPC] Fix SH field overflow issue
Oct 2, 2019
5a8b229
CGObjCMac - silence static analyzer dyn_cast<>/getAs<> null dereferen…
RKSimon Oct 2, 2019
a03d7b0
Recommit "[GlobalOpt] Pass DTU to removeUnreachableBlocks instead of …
fhahn Oct 2, 2019
5ac9d18
[Clang][Driver][NFC] Corrected DeviceActionBuilder methods' comments.
sndmitriev Oct 2, 2019
c5d2746
[NFC][libc++abi] Convert stray tabs to spaces
ldionne Oct 2, 2019
f280547
ItaniumCXXABI - silence static analyzer getAs<RecordType> null derefe…
RKSimon Oct 2, 2019
426078a
Fix uninitialized variable warning in CodeGenPGO constructor. NFCI.
RKSimon Oct 2, 2019
505d7f3
[gicombiner] Add the boring boilerplate for the declarative combiner
dsandersllvm Oct 2, 2019
59bf75c
NFC: add namespace {}
vitalybuka Oct 2, 2019
d39e7e2
[compiler-rt] Use GetNextInstructionPc in signal handlers
vitalybuka Oct 2, 2019
62f190c
[sanitizer_common] Add __sanitizer_on_print to interface list.
morehouse Oct 2, 2019
38ac6bd
[sanitizer_common] Disable onprint.cpp on Android.
morehouse Oct 2, 2019
4d39410
[sanitizer_common] Declare __sanitizer_on_print in Windows interception.
morehouse Oct 2, 2019
8205e86
Merge from 'master' to 'sycl-web' (#6)
sndmitriev Oct 2, 2019
b677cb8
DebugInfo: Simplify RangeSpan to be a plain struct
dwblaikie Oct 2, 2019
641ecbd
gn build: (manually) merge r373527
nico Oct 2, 2019
2772b97
[LegalizeTypes] Check for already split condition before calilng Spli…
topperc Oct 2, 2019
f5bda7f
[X86] Add test cases for suboptimal vselect+setcc splitting.
topperc Oct 2, 2019
6b45029
[InstCombine] Transform bcopy to memmove
davidbolvansky Oct 2, 2019
406de17
[clang][ifs] Clang Interface Stubs ToolChain plumbing.
plotfi Oct 2, 2019
629cad1
Move SanitizerInitializeUnwinder outside anonymous namespace.
morehouse Oct 2, 2019
11e0bcf
DebugInfo: Rename DebugLocStream::Entry::Begin/EndSym to just Begin/End
dwblaikie Oct 2, 2019
2933914
[NFC][InstCombine] Add tests for 'variable sext of variable high bit …
LebedevRI Oct 2, 2019
ae3315a
[InstCombine] Bypass high bit extract before variable sign-extension …
LebedevRI Oct 2, 2019
2a964ea
[gicombiner] Fix a nullptr dereference when -combiners is given a nam…
dsandersllvm Oct 2, 2019
1384c3a
[AMDGPU] Fix illegal agpr use by VALU
rampitec Oct 2, 2019
0d8ce24
Merge from 'master' to 'sycl-web' (#6)
sndmitriev Oct 2, 2019
603e989
[gicombiner] Fix windows issue where single quotes in the command are…
dsandersllvm Oct 2, 2019
19ad523
For P0784R7: allow direct calls to operator new / operator delete from
zygoloid Oct 3, 2019
b542602
For P0784R7: support placement new-expressions in constant evaluation.
zygoloid Oct 3, 2019
69e9d84
Mark P0784R7 as complete and start defining its feature-test macro.
zygoloid Oct 3, 2019
8581f86
Fixing broken builds due to r373538 due to test that should have been…
plotfi Oct 3, 2019
81f2da4
gn build: Merge r373538
llvmgnsyncbot Oct 3, 2019
eb27b5d
[gicombiner] Add a CodeExpander to handle C++ fragments with variable…
dsandersllvm Oct 3, 2019
30c8df0
Fixing broken builds due to r373538, issues with filepath and hexagon…
plotfi Oct 3, 2019
5258202
PR43519: don't inject a diagnostic when constant-evaulation of a
zygoloid Oct 3, 2019
f79f689
gn build: (manually) merge r373551
nico Oct 3, 2019
45f682f
[gicombiner] Make rL373551 compatible with older cmakes
dsandersllvm Oct 3, 2019
6713f82
Revert 373538 and follow-ups 373549 and 373552.
nico Oct 3, 2019
70c8dc4
Merge from 'master' to 'sycl-web' (#1)
bader Oct 3, 2019
7a78f8c
Merge remote-tracking branch 'origin/sycl' into private/aabader/pulld…
bader Oct 3, 2019
9f2ca62
[SYCL] Disabled test not supported on windows
vladimirlaz Oct 4, 2019
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
The diff you're trying to view is too large. We only load the first 3000 changed files.
36 changes: 34 additions & 2 deletions clang-tools-extra/clang-tidy/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,15 @@ if(CLANG_ENABLE_STATIC_ANALYZER)
)
endif()

# Checks.
# If you add a check, also add it to ClangTidyForceLinker.h in this directory.
add_subdirectory(android)
add_subdirectory(abseil)
add_subdirectory(boost)
add_subdirectory(bugprone)
add_subdirectory(cert)
add_subdirectory(cppcoreguidelines)
add_subdirectory(darwin)
add_subdirectory(fuchsia)
add_subdirectory(google)
add_subdirectory(hicpp)
Expand All @@ -56,9 +59,38 @@ endif()
add_subdirectory(objc)
add_subdirectory(openmp)
add_subdirectory(performance)
add_subdirectory(plugin)
add_subdirectory(portability)
add_subdirectory(readability)
add_subdirectory(zircon)
set(ALL_CLANG_TIDY_CHECKS
clangTidyAndroidModule
clangTidyAbseilModule
clangTidyBoostModule
clangTidyBugproneModule
clangTidyCERTModule
clangTidyCppCoreGuidelinesModule
clangTidyDarwinModule
clangTidyFuchsiaModule
clangTidyGoogleModule
clangTidyHICPPModule
clangTidyLinuxKernelModule
clangTidyLLVMModule
clangTidyMiscModule
clangTidyModernizeModule
clangTidyObjCModule
clangTidyOpenMPModule
clangTidyPerformanceModule
clangTidyPortabilityModule
clangTidyReadabilityModule
clangTidyZirconModule
)
if(CLANG_ENABLE_STATIC_ANALYZER)
list(APPEND ALL_CLANG_TIDY_CHECKS clangTidyMPIModule)
endif()
set(ALL_CLANG_TIDY_CHECKS ${ALL_CLANG_TIDY_CHECKS} PARENT_SCOPE)

# Other subtargets. These may reference ALL_CLANG_TIDY_CHECKS
# and must be below its definition.
add_subdirectory(plugin)
add_subdirectory(tool)
add_subdirectory(utils)
add_subdirectory(zircon)
8 changes: 4 additions & 4 deletions clang-tools-extra/clang-tidy/ClangTidy.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -384,8 +384,8 @@ ClangTidyASTConsumerFactory::CreateASTConsumer(
if (WorkingDir)
Context.setCurrentBuildDirectory(WorkingDir.get());

std::vector<std::unique_ptr<ClangTidyCheck>> Checks;
CheckFactories->createChecks(&Context, Checks);
std::vector<std::unique_ptr<ClangTidyCheck>> Checks =
CheckFactories->createChecks(&Context);

ast_matchers::MatchFinder::MatchFinderOptions FinderOptions;

Expand Down Expand Up @@ -459,8 +459,8 @@ std::vector<std::string> ClangTidyASTConsumerFactory::getCheckNames() {

ClangTidyOptions::OptionMap ClangTidyASTConsumerFactory::getCheckOptions() {
ClangTidyOptions::OptionMap Options;
std::vector<std::unique_ptr<ClangTidyCheck>> Checks;
CheckFactories->createChecks(&Context, Checks);
std::vector<std::unique_ptr<ClangTidyCheck>> Checks =
CheckFactories->createChecks(&Context);
for (const auto &Check : Checks)
Check->storeOptions(Options);
return Options;
Expand Down
8 changes: 7 additions & 1 deletion clang-tools-extra/clang-tidy/ClangTidyForceLinker.h
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,11 @@ extern volatile int CppCoreGuidelinesModuleAnchorSource;
static int LLVM_ATTRIBUTE_UNUSED CppCoreGuidelinesModuleAnchorDestination =
CppCoreGuidelinesModuleAnchorSource;

// This anchor is used to force the linker to link the DarwinModule.
extern volatile int DarwinModuleAnchorSource;
static int LLVM_ATTRIBUTE_UNUSED DarwinModuleAnchorDestination =
DarwinModuleAnchorSource;

// This anchor is used to force the linker to link the FuchsiaModule.
extern volatile int FuchsiaModuleAnchorSource;
static int LLVM_ATTRIBUTE_UNUSED FuchsiaModuleAnchorDestination =
Expand All @@ -75,7 +80,8 @@ extern volatile int ModernizeModuleAnchorSource;
static int LLVM_ATTRIBUTE_UNUSED ModernizeModuleAnchorDestination =
ModernizeModuleAnchorSource;

#if CLANG_ENABLE_STATIC_ANALYZER
#if CLANG_ENABLE_STATIC_ANALYZER && \
!defined(CLANG_TIDY_DISABLE_STATIC_ANALYZER_CHECKS)
// This anchor is used to force the linker to link the MPIModule.
extern volatile int MPIModuleAnchorSource;
static int LLVM_ATTRIBUTE_UNUSED MPIModuleAnchorDestination =
Expand Down
7 changes: 4 additions & 3 deletions clang-tools-extra/clang-tidy/ClangTidyModule.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,14 @@ void ClangTidyCheckFactories::registerCheckFactory(StringRef Name,
Factories[Name] = std::move(Factory);
}

void ClangTidyCheckFactories::createChecks(
ClangTidyContext *Context,
std::vector<std::unique_ptr<ClangTidyCheck>> &Checks) {
std::vector<std::unique_ptr<ClangTidyCheck>>
ClangTidyCheckFactories::createChecks(ClangTidyContext *Context) {
std::vector<std::unique_ptr<ClangTidyCheck>> Checks;
for (const auto &Factory : Factories) {
if (Context->isCheckEnabled(Factory.first))
Checks.emplace_back(Factory.second(Factory.first, Context));
}
return Checks;
}

ClangTidyOptions ClangTidyModule::getModuleOptions() {
Expand Down
17 changes: 7 additions & 10 deletions clang-tools-extra/clang-tidy/ClangTidyModule.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
#include "llvm/ADT/StringRef.h"
#include <functional>
#include <map>
#include <memory>
#include <string>
#include <utility>

Expand All @@ -25,9 +26,8 @@ namespace tidy {
/// this object.
class ClangTidyCheckFactories {
public:
typedef std::function<ClangTidyCheck *(StringRef Name,
ClangTidyContext *Context)>
CheckFactory;
using CheckFactory = std::function<std::unique_ptr<ClangTidyCheck>(
StringRef Name, ClangTidyContext *Context)>;

/// Registers check \p Factory with name \p Name.
///
Expand Down Expand Up @@ -58,16 +58,13 @@ class ClangTidyCheckFactories {
template <typename CheckType> void registerCheck(StringRef CheckName) {
registerCheckFactory(CheckName,
[](StringRef Name, ClangTidyContext *Context) {
return new CheckType(Name, Context);
return std::make_unique<CheckType>(Name, Context);
});
}

/// Create instances of all checks matching \p CheckRegexString and
/// store them in \p Checks.
///
/// The caller takes ownership of the return \c ClangTidyChecks.
void createChecks(ClangTidyContext *Context,
std::vector<std::unique_ptr<ClangTidyCheck>> &Checks);
/// Create instances of checks that are enabled.
std::vector<std::unique_ptr<ClangTidyCheck>>
createChecks(ClangTidyContext *Context);

typedef std::map<std::string, CheckFactory> FactoryMap;
FactoryMap::const_iterator begin() const { return Factories.begin(); }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -324,7 +324,7 @@ void ArgumentCommentCheck::checkCallArgs(ASTContext *Ctx,
<< FixItHint::CreateInsertion(Args[I]->getBeginLoc(), ArgComment);
}
}
} // namespace bugprone
}

void ArgumentCommentCheck::check(const MatchFinder::MatchResult &Result) {
const auto *E = Result.Nodes.getNodeAs<Expr>("expr");
Expand All @@ -337,7 +337,7 @@ void ArgumentCommentCheck::check(const MatchFinder::MatchResult &Result) {
llvm::makeArrayRef(Call->getArgs(), Call->getNumArgs()));
} else {
const auto *Construct = cast<CXXConstructExpr>(E);
if (Construct->getNumArgs() == 1 &&
if (Construct->getNumArgs() > 0 &&
Construct->getArg(0)->getSourceRange() == Construct->getSourceRange()) {
// Ignore implicit construction.
return;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
#include "ForwardingReferenceOverloadCheck.h"
#include "InaccurateEraseCheck.h"
#include "IncorrectRoundingsCheck.h"
#include "InfiniteLoopCheck.h"
#include "IntegerDivisionCheck.h"
#include "LambdaFunctionNameCheck.h"
#include "MacroParenthesesCheck.h"
Expand Down Expand Up @@ -88,6 +89,8 @@ class BugproneModule : public ClangTidyModule {
"bugprone-inaccurate-erase");
CheckFactories.registerCheck<IncorrectRoundingsCheck>(
"bugprone-incorrect-roundings");
CheckFactories.registerCheck<InfiniteLoopCheck>(
"bugprone-infinite-loop");
CheckFactories.registerCheck<IntegerDivisionCheck>(
"bugprone-integer-division");
CheckFactories.registerCheck<LambdaFunctionNameCheck>(
Expand Down
1 change: 1 addition & 0 deletions clang-tools-extra/clang-tidy/bugprone/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ add_clang_library(clangTidyBugproneModule
ForwardingReferenceOverloadCheck.cpp
InaccurateEraseCheck.cpp
IncorrectRoundingsCheck.cpp
InfiniteLoopCheck.cpp
IntegerDivisionCheck.cpp
LambdaFunctionNameCheck.cpp
MacroParenthesesCheck.cpp
Expand Down
188 changes: 188 additions & 0 deletions clang-tools-extra/clang-tidy/bugprone/InfiniteLoopCheck.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,188 @@
//===--- InfiniteLoopCheck.cpp - clang-tidy -------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#include "InfiniteLoopCheck.h"
#include "clang/AST/ASTContext.h"
#include "clang/ASTMatchers/ASTMatchFinder.h"
#include "clang/Analysis/Analyses/ExprMutationAnalyzer.h"

using namespace clang::ast_matchers;

namespace clang {
namespace tidy {
namespace bugprone {

static internal::Matcher<Stmt>
loopEndingStmt(internal::Matcher<Stmt> Internal) {
return stmt(anyOf(breakStmt(Internal), returnStmt(Internal),
gotoStmt(Internal), cxxThrowExpr(Internal),
callExpr(Internal, callee(functionDecl(isNoReturn())))));
}

/// Return whether `S` is a reference to the declaration of `Var`.
static bool isAccessForVar(const Stmt *S, const VarDecl *Var) {
if (const auto *DRE = dyn_cast<DeclRefExpr>(S))
return DRE->getDecl() == Var;

return false;
}

/// Return whether `Var` has a pointer or reference in `S`.
static bool isPtrOrReferenceForVar(const Stmt *S, const VarDecl *Var) {
if (const auto *DS = dyn_cast<DeclStmt>(S)) {
for (const Decl *D : DS->getDeclGroup()) {
if (const auto *LeftVar = dyn_cast<VarDecl>(D)) {
if (LeftVar->hasInit() && LeftVar->getType()->isReferenceType()) {
return isAccessForVar(LeftVar->getInit(), Var);
}
}
}
} else if (const auto *UnOp = dyn_cast<UnaryOperator>(S)) {
if (UnOp->getOpcode() == UO_AddrOf)
return isAccessForVar(UnOp->getSubExpr(), Var);
}

return false;
}

/// Return whether `Var` has a pointer or reference in `S`.
static bool hasPtrOrReferenceInStmt(const Stmt *S, const VarDecl *Var) {
if (isPtrOrReferenceForVar(S, Var))
return true;

for (const Stmt *Child : S->children()) {
if (!Child)
continue;

if (hasPtrOrReferenceInStmt(Child, Var))
return true;
}

return false;
}

/// Return whether `Var` has a pointer or reference in `Func`.
static bool hasPtrOrReferenceInFunc(const FunctionDecl *Func,
const VarDecl *Var) {
return hasPtrOrReferenceInStmt(Func->getBody(), Var);
}

/// Return whether `Var` was changed in `LoopStmt`.
static bool isChanged(const Stmt *LoopStmt, const VarDecl *Var,
ASTContext *Context) {
if (const auto *ForLoop = dyn_cast<ForStmt>(LoopStmt))
return (ForLoop->getInc() &&
ExprMutationAnalyzer(*ForLoop->getInc(), *Context)
.isMutated(Var)) ||
(ForLoop->getBody() &&
ExprMutationAnalyzer(*ForLoop->getBody(), *Context)
.isMutated(Var)) ||
(ForLoop->getCond() &&
ExprMutationAnalyzer(*ForLoop->getCond(), *Context).isMutated(Var));

return ExprMutationAnalyzer(*LoopStmt, *Context).isMutated(Var);
}

/// Return whether `Cond` is a variable that is possibly changed in `LoopStmt`.
static bool isVarThatIsPossiblyChanged(const FunctionDecl *Func,
const Stmt *LoopStmt, const Stmt *Cond,
ASTContext *Context) {
if (const auto *DRE = dyn_cast<DeclRefExpr>(Cond)) {
if (const auto *Var = dyn_cast<VarDecl>(DRE->getDecl())) {
if (!Var->isLocalVarDeclOrParm())
return true;

if (Var->getType().isVolatileQualified())
return true;

if (!Var->getType().getTypePtr()->isIntegerType())
return true;

return hasPtrOrReferenceInFunc(Func, Var) ||
isChanged(LoopStmt, Var, Context);
// FIXME: Track references.
}
} else if (isa<MemberExpr>(Cond) || isa<CallExpr>(Cond)) {
// FIXME: Handle MemberExpr.
return true;
}

return false;
}

/// Return whether at least one variable of `Cond` changed in `LoopStmt`.
static bool isAtLeastOneCondVarChanged(const FunctionDecl *Func,
const Stmt *LoopStmt, const Stmt *Cond,
ASTContext *Context) {
if (isVarThatIsPossiblyChanged(Func, LoopStmt, Cond, Context))
return true;

for (const Stmt *Child : Cond->children()) {
if (!Child)
continue;

if (isAtLeastOneCondVarChanged(Func, LoopStmt, Child, Context))
return true;
}
return false;
}

/// Return the variable names in `Cond`.
static std::string getCondVarNames(const Stmt *Cond) {
if (const auto *DRE = dyn_cast<DeclRefExpr>(Cond)) {
if (const auto *Var = dyn_cast<VarDecl>(DRE->getDecl()))
return Var->getName();
}

std::string Result;
for (const Stmt *Child : Cond->children()) {
if (!Child)
continue;

std::string NewNames = getCondVarNames(Child);
if (!Result.empty() && !NewNames.empty())
Result += ", ";
Result += NewNames;
}
return Result;
}

void InfiniteLoopCheck::registerMatchers(MatchFinder *Finder) {
const auto LoopCondition = allOf(
hasCondition(
expr(forFunction(functionDecl().bind("func"))).bind("condition")),
unless(hasBody(hasDescendant(
loopEndingStmt(forFunction(equalsBoundNode("func")))))));

Finder->addMatcher(stmt(anyOf(whileStmt(LoopCondition), doStmt(LoopCondition),
forStmt(LoopCondition)))
.bind("loop-stmt"),
this);
}

void InfiniteLoopCheck::check(const MatchFinder::MatchResult &Result) {
const auto *Cond = Result.Nodes.getNodeAs<Expr>("condition");
const auto *LoopStmt = Result.Nodes.getNodeAs<Stmt>("loop-stmt");
const auto *Func = Result.Nodes.getNodeAs<FunctionDecl>("func");

if (isAtLeastOneCondVarChanged(Func, LoopStmt, Cond, Result.Context))
return;

std::string CondVarNames = getCondVarNames(Cond);
if (CondVarNames.empty())
return;

diag(LoopStmt->getBeginLoc(),
"this loop is infinite; none of its condition variables (%0)"
" are updated in the loop body")
<< CondVarNames;
}

} // namespace bugprone
} // namespace tidy
} // namespace clang
Loading