Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
1181 commits
Select commit Hold shift + click to select a range
985f2f4
[WebAssembly] Remove fptosi(undef) and fptoui(undef) from reduced tes…
RKSimon Jun 3, 2019
9ed1673
[LoopPred] Convert a second member function to a static helper [NFC]
preames Jun 3, 2019
8e317e2
Include what you use in LanaiRegisterInfo.cpp
gribozavr Jun 3, 2019
2fcd2bd
[Tests] Add LFTR tests for multiple exit loops
preames Jun 3, 2019
b46934e
Revert "[Tests] Add LFTR tests for multiple exit loops"
gribozavr Jun 3, 2019
179154f
Include what you use in LanaiFrameLowering.{cpp,h}
gribozavr Jun 3, 2019
f4d22bd
Include what you use in LanaiISelDAGToDAG.cpp
gribozavr Jun 3, 2019
dc13684
Include what you use in LanaiMemAluCombiner.cpp
gribozavr Jun 3, 2019
b8aeaf8
Include what you use in LanaiAsmPrinter.cpp
gribozavr Jun 3, 2019
26c43d0
Include what you use in Lanai.h
gribozavr Jun 3, 2019
aad5d51
builtins: correct function name for AEABI
compnerd Jun 3, 2019
197a7c0
tools: add `llvm-nm` and `llvm-objcopy` to tools
compnerd Jun 3, 2019
83645d2
[Tests] Add LFTR tests for multiple exit loops (try 2)
preames Jun 3, 2019
4172dba
Fix a crash when the default of a switch is removed
Jun 3, 2019
8646314
gn build: Merge r362352
nico Jun 3, 2019
221e604
[PDB] Copy inlinee lines records into the PDB
rnk Jun 3, 2019
c061b99
[ConstantRange] Add sdiv() support
nikic Jun 3, 2019
479568e
Add cdb test for inline line tables
rnk Jun 3, 2019
786a85d
Add ScalarEvolutionsTest::SCEVExpandInsertCanonicalIV tests
arpilipe Jun 3, 2019
6f83c75
gn build: Merge r362371
nico Jun 3, 2019
81ef625
Permit Exception Spec mismatch with NoThrow on inherited Virtual
Jun 3, 2019
bf37536
Make NoThrow FunctionLike, make FunctionLike include references, fix
Jun 3, 2019
8dbeb92
TTI: Improve default costs for addrspacecast
arsenm Jun 3, 2019
18ca8a2
Silence 'warning C4305: 'initializing': truncation from 'double' to '…
aganea Jun 3, 2019
bad43d8
[PowerPC] Look through copies for compare elimination
nemanjai Jun 3, 2019
0b7f98d
Propagate fmf for setcc/select folds
Jun 3, 2019
dcf865f
[X86] Fix the pattern for merge masked vcvtps2pd.
topperc Jun 3, 2019
7a4eabe
[CFLGraph] Add FAdd to visitConstantExpr.
topperc Jun 3, 2019
c24a2f4
CFLAA: reflow comments; NFC
gburgessiv Jun 3, 2019
dd0adae
Fix test failure from r362435
Jun 3, 2019
06f3b09
ELF: Introduce a separate bit for tracking whether an output section …
pcc Jun 3, 2019
bddab42
gn build: Merge r361896.
pcc Jun 3, 2019
7500c97
[AArch64][GlobalISel] Optimize G_FCMP + G_SELECT pairs when G_SELECT …
Jun 3, 2019
0ceda9f
AMDGPU: Disable stack realignment for kernels
arsenm Jun 3, 2019
6ff978e
Propagate fmf for setcc in SDAG for select folds
Jun 3, 2019
89f9af5
[SCCP] Add UnaryOperator visitor to SCCP for unary FNeg
mcinally Jun 3, 2019
357e8a3
[ORC] Use uint8_t for bitfields in SymbolTableEntry.
lhames Jun 3, 2019
27a5466
foo
topperc Jun 3, 2019
17728e7
[X86] Add test cases for 32 and 64 bit versions of PR42118. NFC
topperc Jun 3, 2019
099f4a9
Revert r362451 "foo" and r362452 "[X86] Add test cases for 32 and 64 …
topperc Jun 3, 2019
552fda8
Fix DWARF DebugInfo unit test errors when cross-compiling
jasonliudev Jun 3, 2019
6dc8ce3
[NFC][Codegen] Add tests for hoisting and-by-const from "logical shif…
LebedevRI Jun 3, 2019
c3ea7c6
Add support for mid-function epilogues on x86 that end in a non-local…
jasonmolenda Jun 3, 2019
ac062bb
[X86] Add test cases for 32 and 64 bit versions of PR42118. NFC
topperc Jun 3, 2019
1f80306
[Target] Move ObjCLanguageRuntime::LookupRuntimeSymbol into LanguageR…
bulbazord Jun 3, 2019
6e2d36b
Add clang source minimizer that reduces source to directives
hyp Jun 3, 2019
b365086
[NFC][X86] Fixup FileCheck prefixes - drop duplicates
LebedevRI Jun 3, 2019
b978f72
[Target] Generalize some behavior in Target::SymbolsDidLoad
bulbazord Jun 3, 2019
6d04fd1
Remove test/CodeGen/builtin-stackaddress.c as it duplicates
echristo Jun 3, 2019
bb39f78
Fix windows build for commit r362459
hyp Jun 3, 2019
5983912
Add a release note entry for the change made in r362034.
ahatanaka Jun 3, 2019
f67524d
We had a _LIBCPP_ASSERT commented out because gcc 4.9 didn't like it.…
mclow Jun 4, 2019
d2d6c17
[builtins] Use libtool for builtins when building for Apple platform
petrhosek Jun 4, 2019
73e6f47
[clangd] SymbolCollector support for relations
HighCommander4 Jun 4, 2019
a050b25
[PowerPC] add testcases for reordering LSR and PPCCTRLoops - NFC
Jun 4, 2019
65de43b
[clangd] Fix a crash when clang-tidy is disabled
ilya-biryukov Jun 4, 2019
ac02445
[ARM] Turn some undefined encoding bits into 0s.
statham-arm Jun 4, 2019
72667b4
[NFC] Update the test to check the endianness after the CodeGenPrepar…
Jun 4, 2019
11de0e7
[DAGCombine] Match a pattern where a wide type scalar value is stored…
Jun 4, 2019
4f9e681
Make SwitchInstProfUpdateWrapper safer
Jun 4, 2019
3e39961
[HWASAN][CMake] Allow instrumenting LLVM/clang
eleviant Jun 4, 2019
9d1c5ea
Include what you use in PPCRegisterInfo.h
gribozavr Jun 4, 2019
067a17b
Include what you use in PPCMachineScheduler.cpp
gribozavr Jun 4, 2019
73a15d4
Include what you use in PPC.h
gribozavr Jun 4, 2019
c3c686f
[HWASAN] Make new/delete weak
eleviant Jun 4, 2019
30977fc
[CodeComplete] Include more text into typed chunks of pattern complet…
ilya-biryukov Jun 4, 2019
6384603
Silenced a warning "implicit conversion turns string literal into boo…
gribozavr Jun 4, 2019
4ef0f82
[clangd] Support offsets for parameters in signatureHelp
ilya-biryukov Jun 4, 2019
08da01b
[ARM] Add FP16 vector insert/extract patterns
miyuki Jun 4, 2019
3018d50
[SelectionDAG] Add fpto[us]i(undef) --> undef constant fold
RKSimon Jun 4, 2019
5d5078e
[llvm-ar] Reapply Fix relative thin archive path handling
Jun 4, 2019
3178546
[SelectionDAG] ComputeNumSignBits - clang-format + improve *EXTLOAD c…
RKSimon Jun 4, 2019
ad298f8
[SelectionDAG] ComputeNumSignBits - support constant pool values from…
RKSimon Jun 4, 2019
be6ce7b
[DAGCombine][X86][AArch64][ARM] (C - x) + y -> (y - x) + C fold
LebedevRI Jun 4, 2019
3dce032
[DAGCombine][X86][AArch64][MIPS][LANAI] (C - x) - y -> C - (x + y) …
LebedevRI Jun 4, 2019
5f7c20e
Fix Wshadow warning
RKSimon Jun 4, 2019
580c6d3
[AARCH64][ELF][llvm-readobj] Support for AArch64 .note.gnu.property
smithp35 Jun 4, 2019
5b41fe5
Fix -Wparentheses warning. NFCI.
RKSimon Jun 4, 2019
c73c10a
Unbreak my hasty "unbreak" cmake fix
davezarzycki Jun 4, 2019
49d7221
[AArch64][ELF][llvm-readobj] Add support for BTI and PAC dynamic tags
smithp35 Jun 4, 2019
2e49e81
[NFC][Codegen] D62818 - also add tests with X being constant
LebedevRI Jun 4, 2019
454fc77
Include what you use in PPCRegisterInfo.cpp
gribozavr Jun 4, 2019
a7f9f42
[clangd] Also apply adjustArguments when returning fallback commands
kadircet Jun 4, 2019
dcba482
[ELF] Suppress "STT_SECTION symbol should be defined" on .eh_frame, .…
MaskRay Jun 4, 2019
92f95d2
gn build: Merge r362459
nico Jun 4, 2019
7f22fec
[SimplifyCFG] NFC; remove bogus test case
shawnl Jun 4, 2019
e4ad1b7
[CMake] Move and add settings to Apple-lldb-base cache script
weliveindetail Jun 4, 2019
2ee9a82
[SimplifyCFG] fix last commit
shawnl Jun 4, 2019
d6de942
[x86] add test for store merging/splitting; NFC
rotateright Jun 4, 2019
669775f
[Support] make countLeadingZeros() countTrailingZeros() countLeadingO…
shawnl Jun 4, 2019
a6e289e
[X86][SSE] Pulled out (sub (xor X, M), M) 'ConditionalNegate' out pat…
RKSimon Jun 4, 2019
c5fe030
[OpenMP][libomptarget] Enable usage of unified memory for declare tar…
doru1004 Jun 4, 2019
880d21d
llvm-undname: Several behavior-preserving changes to increase coverage
nico Jun 4, 2019
1e63dd0
[SelectionDAG][x86] limit post-legalization store merging by type
rotateright Jun 4, 2019
605d62e
No longer reject inputs when using a locale that has grouping informa…
mclow Jun 4, 2019
3144d7a
[PowerPC] P9 Scheduling Model: dispatching rule fixes
Jun 4, 2019
dbb4322
[lldb] Fix out-of-bounds read after c3ea7c66fec021867e005ad1b02f3c7e8…
jyknight Jun 4, 2019
7f31350
[llvm-symbolizer] Flush output on bad input
jh7370 Jun 4, 2019
c1a0e6f
llvm-undname: More no-op changes to increase test coverage
nico Jun 4, 2019
dc2a8c7
llvm-undname: Add coverage for startsWithLocalScopePattern()
nico Jun 4, 2019
78e71c4
[Tests] Autogen tests so that diffs for a future change are understan…
preames Jun 4, 2019
2df387b
[clangd] Minor cleanup. NFC
ilya-biryukov Jun 4, 2019
af11a43
[Tests] Update a test to consistently use new pass manager and FileCh…
preames Jun 4, 2019
df621bd
[LVI][CVP] Add support for urem, srem and sdiv
nikic Jun 4, 2019
d98a0a3
llvm-undname: Yet more coverage for error paths
nico Jun 4, 2019
48566aa
[CodeGen][ObjC] Convert '[self alloc]' in a class method to a call to
ahatanaka Jun 4, 2019
8e8ddaa
[WebAssembly] Add comment as follow-up to rL362276. NFC.
sbc100 Jun 4, 2019
f15e3d8
[AArch64][ELF] Add support for PLT decoding with BTI instructions pre…
smithp35 Jun 4, 2019
606eb23
[x86] split 256-bit store of concatenated vectors
rotateright Jun 4, 2019
c3c23b2
[libcxx] Add test to check min/max requirement to regular expression
ldionne Jun 4, 2019
c339448
[MACHO] Replaced calls to getStruct with getStructOrErr in functions …
abrachet Jun 4, 2019
2133daf
[GWP-ASan] Configuration options [3].
hctim Jun 4, 2019
78ec94e
[NFC][Codegen][AMDGPU] Autogenerate commute-shifts.ll test
LebedevRI Jun 4, 2019
925553e
[NFC][Codegen][PowerPC] Autogenerate shift-cmp.ll test
LebedevRI Jun 4, 2019
f4302ad
[Syntax] Do not depend on llvm targets for Syntax tests. NFC
ilya-biryukov Jun 4, 2019
7bf8f6f
PR42104: Support instantiations of lambdas that implicitly capture
zygoloid Jun 4, 2019
0cdaf3a
[Tests] Autogen a test so future changes are visible
preames Jun 4, 2019
09a4415
[DAGCombiner][X86] Fold (not (neg X)) -> (add X, -1)
topperc Jun 4, 2019
03ff1b3
[X86] Fold single-use variable into assert. NFC.
d0k Jun 4, 2019
137de38
[X86] Mutate fceil/ffloor/ftrunc/fnearbyint/frint into X86ISD::RNDSCA…
topperc Jun 4, 2019
878df1c
llvm-undname: Add test coverage for demangleInitFiniStub()
nico Jun 4, 2019
7dcd733
Factor out repeated code to build a DeclRefExpr and mark it referenced.
zygoloid Jun 4, 2019
bfceed4
[Utils] Clean another duplicated util method.
alinas Jun 4, 2019
aed7227
Revert r362472 as it is breaking PPC build bots
nemanjai Jun 4, 2019
4638548
llvm-undname: More coverage-related cleanups
nico Jun 4, 2019
1dce826
llvm-undname: Correctly demangle vararg parameters
nico Jun 4, 2019
2e207d4
Fixed GWP-ASan build breakage. When adding the optional flag parser, …
hctim Jun 4, 2019
a03e2b2
[ABI] Fix SystemV ABI to handle nested aggregate type returned in reg…
bulbazord Jun 4, 2019
29975a2
[Target] Remove Process::GetCPPLanguageRuntime
bulbazord Jun 4, 2019
40107ce
Introduce Value::stripPointerCastsSameRepresentation
Jun 4, 2019
6b432dc
[SelectionDAG][FIX] Allow "returned" arguments to be bit-casted
Jun 4, 2019
3d9ca00
[WebAssembly] Fix ISel crash on sext_inreg/extract type mismatch
tlively Jun 4, 2019
b98025a
[WebAssembly] make wasm-ld --verbose show data section startVA and name
tlively Jun 4, 2019
2fb7306
[X86] Add 512-bit test cases to machine-combiner-int-vec.ll. NFC
topperc Jun 4, 2019
8362518
[X86] Add vector min/max reassociation tests to machine-combiner-int-…
topperc Jun 4, 2019
c32ef4b
Convert MemberExpr creation and serialization to work the same way as
zygoloid Jun 4, 2019
1648cb1
[X86] Add avx512bw to the avx512 machine-combiner-int-vec.ll to ensur…
topperc Jun 4, 2019
2d37cb8
[AArch64][GlobalISel] Make extloads to i64 legal.
aemerson Jun 4, 2019
06c801e
[ScopBuilder] Move canonicalizeDynamicsBasePtrs from ScopInfo. NFC.
Meinersbur Jun 4, 2019
a33eaad
[Analysis] Only build Analysis plugins when CLANG_ENABLE_STATIC_ANALY…
donhinton Jun 4, 2019
375d5fb
[test][llvm-objcopy] Test llvm-objcopy with standard streams
abrachet Jun 4, 2019
c93b995
Call abs to avoid signed/unsigned comparison warning.
jasonmolenda Jun 4, 2019
5c7245b
[Scalarizer] Add UnaryOperator visitor to scalarization pass
mcinally Jun 4, 2019
5e312be
[AArch64] FastISel: fix test to specify -fast-isel when -fast-isel-ab…
aemerson Jun 4, 2019
4870776
msabi: Fix exponential mangling time for even more contrived inputs
nico Jun 4, 2019
577d59b
svn propset svn:executable on utils/prepare-code-coverage-artifact.py
nico Jun 4, 2019
453b7ca
PR42111: Use guarded initialization for thread-local variables with
zygoloid Jun 5, 2019
8ca5455
Factor out duplicated code building a MemberExpr and marking it
zygoloid Jun 5, 2019
78fdce2
[X86] Cleanup convertIntLogicToFPLogic a little. NFCI
topperc Jun 5, 2019
c012188
Changed force build of GWP-ASan options parser to be statically
hctim Jun 5, 2019
2e05045
[TargetTransformInfo] assert on nullptr
nickdesaulniers Jun 5, 2019
fe97754
Initial support for IBM MASS vector library
nemanjai Jun 5, 2019
f090e6f
[llvm-objdump/llvm-readobj/obj2yaml/yaml2obj] Support DT_PPC_GOT and …
MaskRay Jun 5, 2019
ff918fb
Fix -Wsign-compare by explicit cast after r362557
MaskRay Jun 5, 2019
6321c68
Initial support for vectorization using MASSV (IBM MASS vector library)
nemanjai Jun 5, 2019
4b7bdcd
[LLD][COFF] Don't take into account the 'age' when looking for PDB ty…
aganea Jun 5, 2019
cfb6c82
[PowerPC][NFC] Add codegen test for consecutive stores of vector elem…
nemanjai Jun 5, 2019
1611cc1
[analyzer] exploded-graph-rewriter: Pick up python from cmake in tests.
haoNoQ Jun 5, 2019
44fb55b
[analyzer] exploded-graph-rewriter: Add the missing license header!
haoNoQ Jun 5, 2019
7c842fa
[PowerPC] Collapse RLDICL/RLDICR into RLDIC when possible
nemanjai Jun 5, 2019
76467c4
[NFC][FnAttrs] Stress tests for attribute deduction
Jun 5, 2019
aade782
[Attributor] Pass infrastructure and fixpoint framework
Jun 5, 2019
2057f83
Read .note.gnu.property sections and emit a merged .note.gnu.property…
rui314 Jun 5, 2019
516e6cc
[Clang] Disable new PM for tests that use optimization level -O1, -O2…
petrhosek Jun 5, 2019
c0eb8a9
Add __FILE_NAME__ to ReleaseNotes. NFC
christinaa Jun 5, 2019
fa449a9
Suppress false-positive GCC -Wreturn-type warning.
darkbuck Jun 5, 2019
a3e1671
Resubmit "[CorrelatedValuePropagation] Fix prof branch_weights metada…
Jun 5, 2019
4cd07db
Reduce memory consumption of coverage dumps
Jun 5, 2019
9d8d0f6
[CMake][Fuchsia] Use libc++ ABIv2 for the first stage build
petrhosek Jun 5, 2019
da7f033
Ignore DIEs in the skeleton unit in a DWO scenario
labath Jun 5, 2019
2ae86d2
[clang] [test] Add a (xfailing) test for PR41027
mgorny Jun 5, 2019
3c850ca
[CMake] Export CMAKE_CONFIGURATION_TYPES for the LLVM build-tree
weliveindetail Jun 5, 2019
c769462
[CMake] Add configuration dirs as potential locations for llvm-lit an…
weliveindetail Jun 5, 2019
6fc4c1c
Include what you use in PPCFrameLowering.h
gribozavr Jun 5, 2019
e12334a
[ELF] Allow reading of more than one FEATURE_1_AND in same object.
smithp35 Jun 5, 2019
db134aa
[IPO] Disabled 'default only' switch statements to fix MSVC warnings.
RKSimon Jun 5, 2019
daeeb33
Sanitize llvm-size help
Jun 5, 2019
ddfbfd6
[X86][SSE] Add some nt-store test cases inspired by PR42123
RKSimon Jun 5, 2019
5a81af5
[TargetLowering] SimplifyDemandedBits - pull out shift value type. NFCI.
RKSimon Jun 5, 2019
b421966
[llvm-objdump] - Disassemble non-executable sections if specifically …
Jun 5, 2019
9b2b8ad
Revert "Factor out duplicated code building a MemberExpr and marking …
d0k Jun 5, 2019
2121a4f
gn build: Merge r362578
nico Jun 5, 2019
886a55e
[X86][AVX] combineX86ShuffleChain - combine shuffle(extractsubvector(…
RKSimon Jun 5, 2019
a1bb4fb
[ARM] Allow "-march=foo+fp" to vary with foo
Jun 5, 2019
f95e6c0
[ARM] Allow "-march=foo+fp" to vary with foo
Jun 5, 2019
66296dc
[yaml2obj] - Change how we handle implicit sections.
Jun 5, 2019
22e99c4
[MIPS GlobalISel] Select fcmp
Jun 5, 2019
5145b1e
[Sema] Prevent binding incompatible addr space ref to temporaries
Jun 5, 2019
54bd6c8
UpdateTestChecks: hexagon support
LebedevRI Jun 5, 2019
2530862
[NFC][Codegen][X86] Add AVX2 runline for '(X & (C l>> Y)) ==/!= 0' tests
LebedevRI Jun 5, 2019
da59652
Avoid using NoThrow Exception Specifier in non-C++ Modes.
Jun 5, 2019
d34797d
Title: [LOOPINFO] Extend Loop object to add utilities to get the loop
whitneywhtsang Jun 5, 2019
b90b354
[LoopInfo] Fix unused variable warning. NFC.
d0k Jun 5, 2019
7ca9b97
[OpenCL][PR42031] Prevent deducing addr space in type alias.
Jun 5, 2019
ad62a3a
[LoopUtils][SLPVectorizer] clean up management of fast-math-flags
rotateright Jun 5, 2019
15c657d
[SLP] Fix regression in broadcasts caused by operand reordering patch…
dtemirbulatov Jun 5, 2019
5da7023
[llvm-readobj] - Remove TODOs from gnu-hash-symbols.test and demangle…
Jun 5, 2019
590b1ae
Revert "Title: [LOOPINFO] Extend Loop object to add utilities to get …
whitneywhtsang Jun 5, 2019
a0e350e
[X86][SSE] Add additional nt-load test cases as discussed on D62910
RKSimon Jun 5, 2019
de586bd
[X86][AVX] Generalize split256BitStore to splitVectorStore. NFCI.
RKSimon Jun 5, 2019
d47f548
Added propagation of not big initial stack size of master thread to w…
AndreyChurbanov Jun 5, 2019
5659b36
[DynamicLoader] Make sure we always set the rendezvous breakpoint
aadsm Jun 5, 2019
2bf8287
[x86] split more 256-bit stores of concatenated vectors
rotateright Jun 5, 2019
3027a29
[dsymutil] Support more than 4 architectures
JDevlieghere Jun 5, 2019
77d6adc
Fix shadow local variable warning. NFCI.
RKSimon Jun 5, 2019
d97ea1b
[Clang] Fix pretty printing of CUDA address spaces
Jun 5, 2019
b67cb3c
Use LTO capable linker
llvm-beanz Jun 5, 2019
579c8df
[lld] Explicitly ignore comdat groups when parsing LTO object(s)
sbc100 Jun 5, 2019
a282a61
[WebAssembly] Handle object parsing more like the ELF backend
sbc100 Jun 5, 2019
0a31726
[NFC][Reassociate] Regenerate CHECKs for fast-basictest.ll
mcinally Jun 5, 2019
13dd125
[Tests] Add poison inference tests for indvars showing both existing …
preames Jun 5, 2019
d0fff89
[X86] Add the vector integer min/max instructions to isAssociativeAnd…
topperc Jun 5, 2019
5162266
[NFC][Reassociate] Add unary fneg tests to fast-basictest.ll
mcinally Jun 5, 2019
8b83a9c
[NFC][Reassociate] Fix mistake in 468b2ad
mcinally Jun 5, 2019
84cfca0
[analyzer] PathDiagnosticPopUpPiece: working with CharSourceRange
Jun 5, 2019
036fa53
[X86][SSE] Add vector tests to cover more isNegatibleForFree/GetNegat…
RKSimon Jun 5, 2019
a95edb9
[GWP-ASan] Core Guarded Pool Allocator [4].
hctim Jun 5, 2019
e34d1a4
[cmake] Remove duplicate TestingSupport library for linking
pzhengqc Jun 5, 2019
53572d0
[WebAssembly] Limit PIC support to the Emscripten target
Jun 5, 2019
ecf3ae4
[NativeProcessDarwin] Remove dead code. NFCI.
dcci Jun 5, 2019
0f8a764
AMDGPU: Fix using 2 different enums for same operand flags
arsenm Jun 5, 2019
4fb580c
AMDGPU: Remove amdgpu-max-work-group-size attribute
arsenm Jun 5, 2019
607c8a9
IR: make getParamByValType Just Work. NFC.
TNorthover Jun 5, 2019
8d7f118
InstCombine: correctly change byval type attribute alongside call args.
TNorthover Jun 5, 2019
2d0896c
[LOOPINFO] Extend Loop object to add utilities to get the loop bounds,
whitneywhtsang Jun 5, 2019
ba86f2a
[WebAssembly] Use Emscripten triples in PIC tests.
Jun 5, 2019
a3701ca
[clang-format][NFC] Fix BS_Allman style example in the header docs ar…
jkorous-apple Jun 5, 2019
3975b15
[X86] Fix mistake that marked VADDSSrrb_Int/VADDSDrrb_Int/VMULSSrrb_I…
topperc Jun 5, 2019
7ce7110
Speedup to_string and to_wstring for integers using stack buffer and …
mclow Jun 5, 2019
7c663cd
[WebAssembly] Improve lto/comdat.ll test. NFC.
sbc100 Jun 5, 2019
9423f5e
Fix FileCheck prefixes in test case.
ahatanaka Jun 5, 2019
c46827c
LLVM IR: Generate new-style byval-with-Type from Clang
TNorthover Jun 5, 2019
663d762
NewGVN: Handle addrspacecast
arsenm Jun 5, 2019
ac111e5
[InstCombine] simplify code for bitcast of insertelement; NFC
rotateright Jun 5, 2019
e3eeacd
[CallSite removal] Refactoring llvm::InlineFunction APIs
mtrofin Jun 5, 2019
acb5609
[EarlyCSE] Add tests for negated min/max/abs [NFC]
JosephTremoulet Jun 5, 2019
5347024
Update issue statuses. Reviewed as https://reviews.llvm.org/D62932
mclow Jun 5, 2019
8f500a6
[libcxx][test] Include test_workarounds.h where needed
ldionne Jun 5, 2019
b812b7a
AMDGPU: Invert frame index offset interpretation
arsenm Jun 5, 2019
2f94203
Revert "[AArch64][GlobalISel] Optimize G_FCMP + G_SELECT pairs when G…
petrhosek Jun 5, 2019
2114046
Merge commit '2f94203e23dee0e1a2ffb18030ea32cd44e3b25f' into private/…
offsake Jun 17, 2019
0da4853
Additional changes after merge to fix merge conflicts.
offsake Jun 18, 2019
1674e9e
Fix to CodeGenSYCL/basic-kernel-wrapper.cpp to match the current dump.
offsake Jun 25, 2019
5d7c376
Merge remote-tracking branch 'origin/sycl' into private/sync_to_llvm_…
offsake Jul 4, 2019
e65f9d1
Merge remote-tracking branch 'origin/sycl' into private/sync_to_llvm_…
offsake Jul 11, 2019
2906ec3
[SYCL] update to sycl-offload.c to match the new options ordering.
offsake Jul 11, 2019
a2a0b9f
Merge remote-tracking branch 'origin/sycl' into private/sync_to_llvm_…
offsake Jul 15, 2019
04dc5fb
XFAILing llvm-spirv/test/DebugInfo/UnknownBaseType.ll
offsake Jul 15, 2019
98b829e
Further update for clang/test/Driver/sycl-offload.c.
offsake Jul 16, 2019
a8ac649
Merge remote-tracking branch 'origin/sycl' into private/sync_to_llvm_…
offsake Jul 17, 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.
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ add_clang_library(clangApplyReplacements
clangBasic
clangRewrite
clangToolingCore
clangToolingRefactor
clangToolingRefactoring
)

include_directories(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ target_link_libraries(clang-apply-replacements
clangFormat
clangRewrite
clangToolingCore
clangToolingRefactor
clangToolingRefactoring
)

install(TARGETS clang-apply-replacements
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,18 @@ namespace clang {
namespace tidy {
namespace bugprone {

UnhandledSelfAssignmentCheck::UnhandledSelfAssignmentCheck(
StringRef Name, ClangTidyContext *Context)
: ClangTidyCheck(Name, Context),
WarnOnlyIfThisHasSuspiciousField(
Options.get("WarnOnlyIfThisHasSuspiciousField", true)) {}

void UnhandledSelfAssignmentCheck::storeOptions(
ClangTidyOptions::OptionMap &Opts) {
Options.store(Opts, "WarnOnlyIfThisHasSuspiciousField",
WarnOnlyIfThisHasSuspiciousField);
}

void UnhandledSelfAssignmentCheck::registerMatchers(MatchFinder *Finder) {
if (!getLangOpts().CPlusPlus)
return;
Expand Down Expand Up @@ -61,29 +73,32 @@ void UnhandledSelfAssignmentCheck::registerMatchers(MatchFinder *Finder) {
cxxMethodDecl(unless(hasDescendant(cxxMemberCallExpr(callee(cxxMethodDecl(
hasName("operator="), ofClass(equalsBoundNode("class"))))))));

// Matcher for standard smart pointers.
const auto SmartPointerType = qualType(hasUnqualifiedDesugaredType(
recordType(hasDeclaration(classTemplateSpecializationDecl(
hasAnyName("::std::shared_ptr", "::std::unique_ptr",
"::std::weak_ptr", "::std::auto_ptr"),
templateArgumentCountIs(1))))));

// We will warn only if the class has a pointer or a C array field which
// probably causes a problem during self-assignment (e.g. first resetting the
// pointer member, then trying to access the object pointed by the pointer, or
// memcpy overlapping arrays).
const auto ThisHasSuspiciousField = cxxMethodDecl(ofClass(cxxRecordDecl(
has(fieldDecl(anyOf(hasType(pointerType()), hasType(SmartPointerType),
hasType(arrayType())))))));

Finder->addMatcher(
cxxMethodDecl(ofClass(cxxRecordDecl().bind("class")),
isCopyAssignmentOperator(), IsUserDefined,
HasReferenceParam, HasNoSelfCheck,
unless(HasNonTemplateSelfCopy), unless(HasTemplateSelfCopy),
HasNoNestedSelfAssign, ThisHasSuspiciousField)
.bind("copyAssignmentOperator"),
this);
DeclarationMatcher AdditionalMatcher = cxxMethodDecl();
if (WarnOnlyIfThisHasSuspiciousField) {
// Matcher for standard smart pointers.
const auto SmartPointerType = qualType(hasUnqualifiedDesugaredType(
recordType(hasDeclaration(classTemplateSpecializationDecl(
hasAnyName("::std::shared_ptr", "::std::unique_ptr",
"::std::weak_ptr", "::std::auto_ptr"),
templateArgumentCountIs(1))))));

// We will warn only if the class has a pointer or a C array field which
// probably causes a problem during self-assignment (e.g. first resetting
// the pointer member, then trying to access the object pointed by the
// pointer, or memcpy overlapping arrays).
AdditionalMatcher = cxxMethodDecl(ofClass(cxxRecordDecl(
has(fieldDecl(anyOf(hasType(pointerType()), hasType(SmartPointerType),
hasType(arrayType())))))));
}

Finder->addMatcher(cxxMethodDecl(ofClass(cxxRecordDecl().bind("class")),
isCopyAssignmentOperator(), IsUserDefined,
HasReferenceParam, HasNoSelfCheck,
unless(HasNonTemplateSelfCopy),
unless(HasTemplateSelfCopy),
HasNoNestedSelfAssign, AdditionalMatcher)
.bind("copyAssignmentOperator"),
this);
}

void UnhandledSelfAssignmentCheck::check(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,14 @@ namespace bugprone {
/// http://clang.llvm.org/extra/clang-tidy/checks/bugprone-unhandled-self-assignment.html
class UnhandledSelfAssignmentCheck : public ClangTidyCheck {
public:
UnhandledSelfAssignmentCheck(StringRef Name, ClangTidyContext *Context)
: ClangTidyCheck(Name, Context) {}
UnhandledSelfAssignmentCheck(StringRef Name, ClangTidyContext *Context);

void storeOptions(ClangTidyOptions::OptionMap &Opts) override;
void registerMatchers(ast_matchers::MatchFinder *Finder) override;
void check(const ast_matchers::MatchFinder::MatchResult &Result) override;

private:
const bool WarnOnlyIfThisHasSuspiciousField;
};

} // namespace bugprone
Expand Down
4 changes: 4 additions & 0 deletions clang-tools-extra/clang-tidy/cert/CERTTidyModule.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
#include "../ClangTidy.h"
#include "../ClangTidyModule.h"
#include "../ClangTidyModuleRegistry.h"
#include "../bugprone/UnhandledSelfAssignmentCheck.h"
#include "../google/UnnamedNamespaceInHeaderCheck.h"
#include "../misc/NewDeleteOverloadsCheck.h"
#include "../misc/NonCopyableObjects.h"
Expand Down Expand Up @@ -49,6 +50,8 @@ class CERTModule : public ClangTidyModule {
// OOP
CheckFactories.registerCheck<performance::MoveConstructorInitCheck>(
"cert-oop11-cpp");
CheckFactories.registerCheck<bugprone::UnhandledSelfAssignmentCheck>(
"cert-oop54-cpp");
// ERR
CheckFactories.registerCheck<misc::ThrowByValueCatchByReferenceCheck>(
"cert-err09-cpp");
Expand Down Expand Up @@ -85,6 +88,7 @@ class CERTModule : public ClangTidyModule {
ClangTidyOptions Options;
ClangTidyOptions::OptionMap &Opts = Options.CheckOptions;
Opts["cert-dcl16-c.NewSuffixes"] = "L;LL;LU;LLU";
Opts["cert-oop54-cpp.WarnOnlyIfThisHasSuspiciousField"] = "0";
return Options;
}
};
Expand Down
1 change: 1 addition & 0 deletions clang-tools-extra/clang-tidy/cert/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ add_clang_library(clangTidyCERTModule
clangBasic
clangLex
clangTidy
clangTidyBugproneModule
clangTidyGoogleModule
clangTidyMiscModule
clangTidyPerformanceModule
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,8 @@ void fixInitializerList(const ASTContext &Context, DiagnosticBuilder &Diag,
ProTypeMemberInitCheck::ProTypeMemberInitCheck(StringRef Name,
ClangTidyContext *Context)
: ClangTidyCheck(Name, Context),
IgnoreArrays(Options.get("IgnoreArrays", false)) {}
IgnoreArrays(Options.get("IgnoreArrays", false)),
UseAssignment(Options.getLocalOrGlobal("UseAssignment", false)) {}

void ProTypeMemberInitCheck::registerMatchers(MatchFinder *Finder) {
if (!getLangOpts().CPlusPlus)
Expand Down Expand Up @@ -314,6 +315,7 @@ void ProTypeMemberInitCheck::check(const MatchFinder::MatchResult &Result) {

void ProTypeMemberInitCheck::storeOptions(ClangTidyOptions::OptionMap &Opts) {
Options.store(Opts, "IgnoreArrays", IgnoreArrays);
Options.store(Opts, "UseAssignment", UseAssignment);
}

// FIXME: Copied from clang/lib/Sema/SemaDeclCXX.cpp.
Expand All @@ -338,6 +340,56 @@ static bool isEmpty(ASTContext &Context, const QualType &Type) {
return isIncompleteOrZeroLengthArrayType(Context, Type);
}

static const char *getInitializer(QualType QT, bool UseAssignment) {
const char *DefaultInitializer = "{}";
if (!UseAssignment)
return DefaultInitializer;

if (QT->isPointerType())
return " = nullptr";

const BuiltinType *BT =
dyn_cast<BuiltinType>(QT.getCanonicalType().getTypePtr());
if (!BT)
return DefaultInitializer;

switch (BT->getKind()) {
case BuiltinType::Bool:
return " = false";
case BuiltinType::Float:
return " = 0.0F";
case BuiltinType::Double:
return " = 0.0";
case BuiltinType::LongDouble:
return " = 0.0L";
case BuiltinType::SChar:
case BuiltinType::Char_S:
case BuiltinType::WChar_S:
case BuiltinType::Char16:
case BuiltinType::Char32:
case BuiltinType::Short:
case BuiltinType::Int:
return " = 0";
case BuiltinType::UChar:
case BuiltinType::Char_U:
case BuiltinType::WChar_U:
case BuiltinType::UShort:
case BuiltinType::UInt:
return " = 0U";
case BuiltinType::Long:
return " = 0L";
case BuiltinType::ULong:
return " = 0UL";
case BuiltinType::LongLong:
return " = 0LL";
case BuiltinType::ULongLong:
return " = 0ULL";

default:
return DefaultInitializer;
}
}

void ProTypeMemberInitCheck::checkMissingMemberInitializer(
ASTContext &Context, const CXXRecordDecl &ClassDecl,
const CXXConstructorDecl *Ctor) {
Expand Down Expand Up @@ -420,7 +472,7 @@ void ProTypeMemberInitCheck::checkMissingMemberInitializer(
for (const FieldDecl *Field : FieldsToFix) {
Diag << FixItHint::CreateInsertion(
getLocationForEndOfToken(Context, Field->getSourceRange().getEnd()),
"{}");
getInitializer(Field->getType(), UseAssignment));
}
} else if (Ctor) {
// Otherwise, rewrite the constructor's initializer list.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,11 @@ class ProTypeMemberInitCheck : public ClangTidyCheck {

// Whether arrays need to be initialized or not. Default is false.
bool IgnoreArrays;

// Whether fix-its for initialization of fundamental type use assignment
// instead of brace initalization. Only effective in C++11 mode. Default is
// false.
bool UseAssignment;
};

} // namespace cppcoreguidelines
Expand Down
130 changes: 130 additions & 0 deletions clang-tools-extra/clang-tidy/google/AvoidNSObjectNewCheck.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,130 @@
//===--- AvoidNSObjectNewCheck.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 "AvoidNSObjectNewCheck.h"
#include "clang/AST/ASTContext.h"
#include "clang/ASTMatchers/ASTMatchFinder.h"
#include "clang/Basic/LangOptions.h"
#include "clang/Basic/SourceLocation.h"
#include "clang/Basic/SourceManager.h"
#include "llvm/Support/FormatVariadic.h"
#include <map>
#include <string>

using namespace clang::ast_matchers;

namespace clang {
namespace tidy {
namespace google {
namespace objc {

static bool isMessageExpressionInsideMacro(const ObjCMessageExpr *Expr) {
SourceLocation ReceiverLocation = Expr->getReceiverRange().getBegin();
if (ReceiverLocation.isMacroID())
return true;

SourceLocation SelectorLocation = Expr->getSelectorStartLoc();
if (SelectorLocation.isMacroID())
return true;

return false;
}

// Walk up the class hierarchy looking for an -init method, returning true
// if one is found and has not been marked unavailable.
static bool isInitMethodAvailable(const ObjCInterfaceDecl *ClassDecl) {
while (ClassDecl != nullptr) {
for (const auto *MethodDecl : ClassDecl->instance_methods()) {
if (MethodDecl->getSelector().getAsString() == "init")
return !MethodDecl->isUnavailable();
}
ClassDecl = ClassDecl->getSuperClass();
}

// No -init method found in the class hierarchy. This should occur only rarely
// in Objective-C code, and only really applies to classes not derived from
// NSObject.
return false;
}

// Returns the string for the Objective-C message receiver. Keeps any generics
// included in the receiver class type, which are stripped if the class type is
// used. While the generics arguments will not make any difference to the
// returned code at this time, the style guide allows them and they should be
// left in any fix-it hint.
static StringRef getReceiverString(SourceRange ReceiverRange,
const SourceManager &SM,
const LangOptions &LangOpts) {
CharSourceRange CharRange = Lexer::makeFileCharRange(
CharSourceRange::getTokenRange(ReceiverRange), SM, LangOpts);
return Lexer::getSourceText(CharRange, SM, LangOpts);
}

static FixItHint getCallFixItHint(const ObjCMessageExpr *Expr,
const SourceManager &SM,
const LangOptions &LangOpts) {
// Check whether the messaged class has a known factory method to use instead
// of -init.
StringRef Receiver =
getReceiverString(Expr->getReceiverRange(), SM, LangOpts);
// Some classes should use standard factory methods instead of alloc/init.
std::map<StringRef, StringRef> ClassToFactoryMethodMap = {{"NSDate", "date"},
{"NSNull", "null"}};
auto FoundClassFactory = ClassToFactoryMethodMap.find(Receiver);
if (FoundClassFactory != ClassToFactoryMethodMap.end()) {
StringRef ClassName = FoundClassFactory->first;
StringRef FactorySelector = FoundClassFactory->second;
std::string NewCall =
llvm::formatv("[{0} {1}]", ClassName, FactorySelector);
return FixItHint::CreateReplacement(Expr->getSourceRange(), NewCall);
}

if (isInitMethodAvailable(Expr->getReceiverInterface())) {
std::string NewCall = llvm::formatv("[[{0} alloc] init]", Receiver);
return FixItHint::CreateReplacement(Expr->getSourceRange(), NewCall);
}

return {}; // No known replacement available.
}

void AvoidNSObjectNewCheck::registerMatchers(MatchFinder *Finder) {
if (!getLangOpts().ObjC)
return;

// Add two matchers, to catch calls to +new and implementations of +new.
Finder->addMatcher(
objcMessageExpr(isClassMessage(), hasSelector("new")).bind("new_call"),
this);
Finder->addMatcher(
objcMethodDecl(isClassMethod(), isDefinition(), hasName("new"))
.bind("new_override"),
this);
}

void AvoidNSObjectNewCheck::check(const MatchFinder::MatchResult &Result) {
if (const auto *CallExpr =
Result.Nodes.getNodeAs<ObjCMessageExpr>("new_call")) {
// Don't warn if the call expression originates from a macro expansion.
if (isMessageExpressionInsideMacro(CallExpr))
return;

diag(CallExpr->getExprLoc(), "do not create objects with +new")
<< getCallFixItHint(CallExpr, *Result.SourceManager,
Result.Context->getLangOpts());
}

if (const auto *DeclExpr =
Result.Nodes.getNodeAs<ObjCMethodDecl>("new_override")) {
diag(DeclExpr->getBeginLoc(), "classes should not override +new");
}
}

} // namespace objc
} // namespace google
} // namespace tidy
} // namespace clang
Loading