Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge release/9.x branch into rustc/9.0-2019-07-12 #23

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
452 commits
Select commit Hold shift + click to select a range
4ac0b9b
[RISCV] Make RISCVELFObjectWriter::getRelocType check IsPCRel
asb Jul 16, 2019
a3c7b27
[RISCV][NFC] Fix HasStedExtA -> HasStdExtA typo in comment
asb Jul 16, 2019
ef8577e
[RISCV][NFC] Split PseudoCALL pattern out from instruction
asb Jul 16, 2019
e9ad0cf
[RISCV] Fix a potential issue in shouldInsertFixupForCodeAlign()
asb Jul 16, 2019
bb479ca
[RISCV] Avoid overflow when determining number of nops for code align
asb Jul 16, 2019
49a3ad2
Fix parameter name comments using clang-tidy. NFC.
rui314 Jul 16, 2019
1ffceaa
[RISCV] Match GNU tools canonical JALR and add aliases
asb Jul 16, 2019
47cfe8f
[ELF] Fix variable names in comments after VariableName -> variableNa…
MaskRay Jul 16, 2019
c0b2ed6
[X86] In combineStore, don't convert v2f32 load/store pairs to f64 lo…
topperc Jul 16, 2019
3e10905
[NFC][test] Fix for riscv tests.
plotfi Jul 16, 2019
e215996
Finish "Adapt -fsanitize=function to SANITIZER_NON_UNIQUE_TYPEINFO"
stbergmann Jul 16, 2019
d0ac188
[lldb] Handle EOF from `lldb-vscode`
jankratochvil Jul 16, 2019
860f7ec
[DWARF] Simplify DWARFAttribute. NFC.
igorkudrin Jul 16, 2019
74c350a
[DWARF] Fix an incorrect format specifier.
igorkudrin Jul 16, 2019
f48bc01
[DWARF] Fix the reserved values for unit length in DWARFDebugLine.
igorkudrin Jul 16, 2019
a54c466
[NFC][PowerPC] Add test case for D64195
wuzish Jul 16, 2019
33fdf82
[WebAssembly] Rename variale references in comments after VariableNam…
MaskRay Jul 16, 2019
2e2038b
[COFF] Rename variale references in comments after VariableName -> va…
MaskRay Jul 16, 2019
a307752
[clang-scan-view] Force utf-8 when handling report (python2 only)
Jul 16, 2019
a3e26d1
[NFC] Test commit: add full stop at end of comment
Jul 16, 2019
c5a2d74
[lldb] Rename Options.inc to CommandOptions.inc [NFC]
Teemperor Jul 16, 2019
eb72138
[AArch64] Implement __jcvt intrinsic from Armv8.3-A
Jul 16, 2019
1781c28
Remove username from git-llvm script, erroneously added in 366197
sam-mccall Jul 16, 2019
06377ae
[clangd] Don't rebuild background index until we indexed one TU per t…
sam-mccall Jul 16, 2019
0afffab
[SemaTemplate] Fix uncorrected typos after pack expansion
sam-mccall Jul 16, 2019
971ac4c
Reapply [llvm-ar][test] Add to MRI test coverage
Jul 16, 2019
a5dc9c9
[Driver] Don't pass --dynamic-linker to ld on Solaris
rorth Jul 16, 2019
a137087
[Object/llvm-readelf/llvm-readobj] - Improve error reporting when e_s…
Jul 16, 2019
eea8280
Document the LLVM_ENABLE_BINDINGS option
sylvestre Jul 16, 2019
116e58e
remove a duplicate declaration
sylvestre Jul 16, 2019
3a6aaa4
Reapply [llvm-ar][test] Increase llvm-ar test coverage
Jul 16, 2019
aae7553
[clangd] Added highlighting for the targets in typedefs and using.
jvikstrom Jul 16, 2019
58864fa
[pstl] Fix compilation with TBB backend
ldionne Jul 16, 2019
8e482eb
[llvm-ar][test] Add to llvm-ar test coverage
Jul 16, 2019
22c4a14
AMDGPU/GlobalISel: Fix test failures in release build
arsenm Jul 16, 2019
655cb4a
[OPENMP]Add support for analysis of if clauses.
alexey-bataev Jul 16, 2019
8ece3b6
[OpenCL] Fixing sampler initialisations for C++ mode.
Jul 16, 2019
d3941e6
[SWIG] Deprecate SWIG 1.x
JDevlieghere Jul 16, 2019
f34a69c
[DAGCombiner] fold (addcarry (xor a, -1), b, c) -> (subcarry b, a, !c…
deadalnix Jul 16, 2019
228a7b4
[ADCE] Fix non-deterministic behaviour due to iterating over a pointe…
aemerson Jul 16, 2019
cc90981
[Remarks][NFC] Combine ParserFormat and SerializerFormat
francisvm Jul 16, 2019
94bad22
[Remarks] Simplify and refactor the RemarkParser interface
francisvm Jul 16, 2019
88ed076
Add missing test for r366215
aemerson Jul 16, 2019
2eacf69
Revert [tools] [llvm-nm] Default to reading from stdin not a.out
abrachet Jul 16, 2019
4281610
[OPENMP]Fix threadid in __kmpc_omp_taskwait call for dependent target…
alexey-bataev Jul 16, 2019
63a0c2b
Revert "[swig] Add workaround for old swig"
JDevlieghere Jul 16, 2019
450c62e
[Strict FP] Allow more relaxed scheduling
uweigand Jul 16, 2019
b3f967d
[AMDGPU] Add the adjusted FP as a livein register.
darkbuck Jul 16, 2019
85b9651
[OPENMP][NVPTX]Fixed checks for cuda versions.
alexey-bataev Jul 16, 2019
e6e33cf
[TSan] Improve handling of stack pointer mangling in {set,long}jmp, p…
yln Jul 16, 2019
e8ced86
[CMake] Add Apple-lldb-Xcode.cmake cache that avoids install options
weliveindetail Jul 16, 2019
97b4d7a
Removed -mno-omit-leaf-frame-pointer from flags.
hctim Jul 16, 2019
1ff5535
[OpenMP] Move header inclusion out of 'extern "C"'
hahnjo Jul 16, 2019
c65a9db
AMDGPU: Fix missing immarg for mfma intrinsics
arsenm Jul 16, 2019
4754814
fix unnamed fiefield issue and add tests for __builtin_preserve_acces…
yonghong-song Jul 16, 2019
c26e27d
[NFC] Fix -Wreorder warning in TBB backend
ldionne Jul 16, 2019
3559fcd
[pstl] Use std::transform_reduce instead of hand-rolled implementation
ldionne Jul 16, 2019
c6fd5ab
AMDGPU: Redefine load PatFrags
arsenm Jul 16, 2019
17060f0
[AMDGPU] Optimize atomic max/min
jayfoad Jul 16, 2019
d100b5d
Teach `llvm-pdbutil pretty -native` about `-injected-sources`
nico Jul 16, 2019
35c9659
AMDGPU/GlobalISel: Select flat loads
arsenm Jul 16, 2019
fe44a53
[COFF] Implement /safeseh:no and check @feat.00 flags by default
rnk Jul 16, 2019
8f8d07e
AMDGPU: Replace store PatFrags
arsenm Jul 16, 2019
6e1c3bb
[IndVars] Speculative fix for an assertion failure seen in bots
preames Jul 16, 2019
7eb1902
AMDGPU: Add register classes to flat store patterns
arsenm Jul 16, 2019
5826ab6
[CMake] Fail when Python interpreter doesn't match Python libraries v…
JDevlieghere Jul 16, 2019
4b6f69f
Fix linkrepro.test after safeseh:no change
rnk Jul 16, 2019
11dc3d3
Mark new test as requiring an x86 backend for LTO native object gener…
rnk Jul 16, 2019
dad1f89
AMDGPU/GlobalISel: Select flat stores
arsenm Jul 16, 2019
1d58c1d
Fix LLDB Windows build Python version logic after r366243
rnk Jul 16, 2019
7161fb0
AMDGPU/GlobalISel: Select private loads
arsenm Jul 16, 2019
2d10407
AMDGPU/GlobalISel: Fix selection of private stores
arsenm Jul 16, 2019
afdf6b3
AMDGPU: Fix some missing GCCBuiltin declarations
arsenm Jul 16, 2019
ccf22ef
Fix -Wreturn-type warning. NFC.
darkbuck Jul 16, 2019
6e0fa29
[AMDGPU] Change register type for v32 vectors
rampitec Jul 16, 2019
b157dca
[GWP-ASan] Add thread ID to PRNG seed.
hctim Jul 16, 2019
1b69fd2
AMDGPU/GlobalISel: Select G_SHL
arsenm Jul 16, 2019
65e34a3
[PowerPC][HTM] Fix impossible reg-to-reg copy assert with ttest builtin
Jul 16, 2019
e5b28b9
AMDGPU/GlobalISel: Select G_LSHR
arsenm Jul 16, 2019
f8c8284
AMDGPU/GlobalISel: Select G_ASHR
arsenm Jul 16, 2019
d069a19
[TSan] Improve handling of stack pointer mangling in {set,long}jmp, pt.6
yln Jul 16, 2019
12154ee
[libc++] Add missing UNSUPPORTED for CTAD tests
ldionne Jul 16, 2019
ddbb837
[NFC][ScopBuilder] Move addRecordedAssumption to ScopBuilder
DominikAdamski Jul 16, 2019
0e534de
[Symbol] Remove unused fields from ClangASTContext
bulbazord Jul 16, 2019
588fc9e
[NFC][ScopBuilder] Move buildAliasChecks and its implementing methods…
DominikAdamski Jul 16, 2019
e559f62
[libcxx] Rejigger test for destroying delete feature-test macros
ldionne Jul 16, 2019
40580d3
DWARF: Skip zero column for inline call sites
dwblaikie Jul 16, 2019
ffca322
[clang-tidy] initial version of readability-convert-member-functions-…
mgehre Jul 16, 2019
fdc61bc
[NFC][ScopBuilder] Move addUserContext to ScopBuilder
DominikAdamski Jul 16, 2019
f4c2d57
[clang-format] Don't detect call to ObjC class method as C++11 attrib…
bhamiltoncx Jul 16, 2019
d746a21
[x86] use more phadd for reductions
rotateright Jul 16, 2019
607cd44
[ORC][docs] Trim ORCv1 to ORCv2 transition section, add a how-to sect…
lhames Jul 16, 2019
c23619b
[ORC][docs] Fix an RST error: the code-block directive needs a newlin…
lhames Jul 16, 2019
21f2858
AMDGPU: Partially revert r366250
arsenm Jul 16, 2019
42bba4b
[WebAssembly] Implement thread-local storage (local-exec model)
quantum5 Jul 16, 2019
fa57583
Add REQUIRES: x86 to safeseh-no.s test for x86
rnk Jul 16, 2019
fe66fdb
[TableGen] Add "getOperandType" to get operand types from opcode/opidx
bogner Jul 16, 2019
0a8d4df
[WebAssembly] Compile all TLS on Emscripten as local-exec
quantum5 Jul 16, 2019
fdeed83
Fix a typo in target features
gburgessiv Jul 16, 2019
418516c
[TableGen] Generate offsets into a flat array for getOperandType
bogner Jul 16, 2019
1c3f4ec
GlobalISel: Add overload of handleAssignments with CCState
arsenm Jul 16, 2019
1bd9c65
ARM: Fix missing immarg for space intrinsic
arsenm Jul 16, 2019
e716790
add a workaround in GetLine to account for ReadFile not reporintg error
lanza Jul 16, 2019
2ecca78
Fix darwin-ld.c if dsymutil.exe exists on PATH
rnk Jul 16, 2019
e5012ab
[AMDGPU] Autogenerate register asm names
rampitec Jul 16, 2019
9304e59
Fix OpenCLCXX test on 32-bit Windows where thiscall is present
rnk Jul 16, 2019
98a4879
Don't require python exe and lib versions to match while crosscompiling
lanza Jul 16, 2019
e56865d
AMDGPU: Add some missing builtins
arsenm Jul 17, 2019
420f3f6
gn build: Merge r366216
nico Jul 17, 2019
67cf3d6
gn build: Merge r366265
nico Jul 17, 2019
4c77a69
Update email address.
ecnelises Jul 17, 2019
e574f8b
[Target][NFCI] Rename variable
bulbazord Jul 17, 2019
06bf5d8
[NativePDB] Make GetTranslationUnitDecl return an lldb CompilerDeclCtx
lanza Jul 17, 2019
587d13d
[LoopInfo] Fix getUniqueNonLatchExitBlocks
Jul 17, 2019
fc1c8f5
[Target][NFCI] Remove commented out code
bulbazord Jul 17, 2019
7f308af
[mips] Support the "o" inline asm constraint
atanasyan Jul 17, 2019
a884afb
[mips] Implement .cplocal directive
atanasyan Jul 17, 2019
4c1e440
[mips] Use mult/mflo pattern on 64-bit targets prior to MIPS64
atanasyan Jul 17, 2019
6d4b1c0
[mips] Name inline asm constraint test cases in a uniform manner. NFC
atanasyan Jul 17, 2019
1292464
[mips] Remove redundant test case. NFC
atanasyan Jul 17, 2019
42cfbaf
Replace CRLF with LF.
rui314 Jul 17, 2019
9662721
[Driver] Enable __cxa_atexit on Solaris
rorth Jul 17, 2019
9eb9590
[OpenCL][Sema] Minor refactoring and constraint checking
mantognini Jul 17, 2019
2be0ebb
[ELF] Delete redundant pageAlign at PT_GNU_RELRO boundaries after D58892
MaskRay Jul 17, 2019
37e403d
[ARM GlobalISel] Cleanup CallLowering. NFC
rovka Jul 17, 2019
247add6
[llvm-ar][test] Add coverage for replace and update key letters
Jul 17, 2019
11b0624
[clangd] Fix error message in tweaktests to be useful. NFC
sam-mccall Jul 17, 2019
52c3939
[TableGen] Do not set ReadNone attribute on intrinsics with side effects
momchil-velikov Jul 17, 2019
a256b8b
AMDGPU: Improve alias analysis for GDS
nhaehnle Jul 17, 2019
8b7041a
AMDGPU/GFX10: Apply the VMEM-to-scalar-write hazard also to writes to…
nhaehnle Jul 17, 2019
e14cfe2
[AArch64] Consistent types and naming for AArch64 target features (NFC)
momchil-velikov Jul 17, 2019
60bd7a9
[lldb][NFC] Tablegenify watchpoint commands
Teemperor Jul 17, 2019
1e62635
[MIPS GlobalISel] ClampScalar and select pointer G_ICMP
Jul 17, 2019
5214956
PowerPC/SPE: Fix load/store handling for SPE
Jul 17, 2019
0257c6b
PowerPC: Fix register spilling for SPE registers
Jul 17, 2019
6011a28
[clangd] Handle windows line endings in QueryDriver
kadircet Jul 17, 2019
2889fe6
[clangd] Force the required interpretation of #import on windows tests.
sam-mccall Jul 17, 2019
4b8da3a
[AArch64] Add support for Transactional Memory Extension (TME)
momchil-velikov Jul 17, 2019
70235c6
[AMDGPU] Optimize atomic AND/OR/XOR
jayfoad Jul 17, 2019
62069ac
[llvm-ar][test] \r\n -> \n
MaskRay Jul 17, 2019
aefcf51
[ASTImporter] Fix LLDB lookup in transparent ctx and with ext src
Jul 17, 2019
aa55124
[RISCV][NFC] Add tests that capture current encodings for DWARF EH
asb Jul 17, 2019
b94c233
[RISCV] Set correct encodings for DWARF exception handling
asb Jul 17, 2019
6584c48
Mips: Remove immarg from copy and insert intrinsics
arsenm Jul 17, 2019
ab009a6
[AsmPrinter] Make the encoding of call sites in .gcc_except_table con…
asb Jul 17, 2019
c74fded
[RISCV][NFC] Remove outdated TODO from test/CodeGen/RISCV/dwarf-eh.ll
asb Jul 17, 2019
80de11e
[RISCV] Add RISCV to LLVM_ALL_TARGETS so it s built by default
asb Jul 17, 2019
ae512b8
[ASTImporter] Fix structural eq of lambdas
Jul 17, 2019
8788629
[lld] Add Visual Studio compatible diagnostics
Jul 17, 2019
629273e
[llvm-ar][test] Add tests failing on Darwin
Jul 17, 2019
11d3710
[Attributor] Deduce "willreturn" function attribute
uenoku Jul 17, 2019
552c2c0
[OPENMP]Fix crash in LoopCounterRefChecker when MemberExpr is not Var…
mikerice1969 Jul 17, 2019
f81ee43
[clang-tidy] Adjust location of namespace comment diagnostic
ilya-biryukov Jul 17, 2019
e61d025
[clangd] Type hierarchy: don't resolve parents if the client only ask…
HighCommander4 Jul 17, 2019
0730710
Fix MSVC 'implicitly capture' compile error. NFCI.
RKSimon Jul 17, 2019
06eed42
AMDGPU: Use getTargetConstant
arsenm Jul 17, 2019
aa5cdaf
Remove REQUIRES OMP spec version within lit tests
jpeyton52 Jul 17, 2019
9a050f9
[ASan] Support `{f}puts(NULL)` on Darwin
yln Jul 17, 2019
544315b
[RISCV] Revert r366331 as it exposed some sanitizer failures
asb Jul 17, 2019
1716454
[ORC] Add deprecation warnings to ORCv1 layers and utilities.
lhames Jul 17, 2019
3b96ebe
[NativePDB] Add a FromCompilerDecl for going from lldb -> clang
lanza Jul 17, 2019
7f24757
[CMake] Move standalone check so we don't have to reconfigure LLDB
JDevlieghere Jul 17, 2019
3fce6b5
[lldb] Make log for ClangModulesDeclVendor's compiler flag less verbose
Teemperor Jul 17, 2019
d912a9b
[AMDGPU] Tune inlining parameters for AMDGPU target
dfukalov Jul 17, 2019
5953248
[OPENMP] Resolve lost LoopTripCnt for subsequent loops in same thread.
ronlieb Jul 17, 2019
ee24b40
[CMake] Avoid liblldb genex when figuring out the copy destination fo…
weliveindetail Jul 17, 2019
79f4e47
[Docs][OpenCL] Documentation of C++ for OpenCL mode
Jul 17, 2019
dce1954
[Test] Add module cache for TestWeakSymbols
JDevlieghere Jul 17, 2019
b53e13c
[clang-tidy] Fix crash on end location inside macro
nhukc Jul 17, 2019
337aea4
[clang-tidy] Exclude forward decls from fuchsia-multiple-inheritance
Jul 17, 2019
0e2b74a
Revert [AArch64] Add support for Transactional Memory Extension (TME)
momchil-velikov Jul 17, 2019
f90d3df
[dotest] Disable color while testing.
JDevlieghere Jul 17, 2019
48f5a43
[OPENMP]Fix PR42632: crash on the analysis of the OpenMP constructs.
alexey-bataev Jul 17, 2019
accad76
[lld][WebAssembly] Fix handling of comdat functions in init array.
sbc100 Jul 17, 2019
66412df
[libc++] XFAIL a test that does not behave properly on older Clang
ldionne Jul 17, 2019
d752f5e
Basic codegen for MTE stack tagging.
eugenis Jul 17, 2019
851339f
Basic MTE stack tagging instrumentation.
eugenis Jul 17, 2019
ca12cb9
[CMake] Use LLVM_DIR and Clang_DIR for standalone builds.
JDevlieghere Jul 17, 2019
e37750b
[CMake] Remove duplicated logic to find Python when doing a standalon…
JDevlieghere Jul 17, 2019
c2cd84b
[docs] Adjust variable formatting table
JDevlieghere Jul 17, 2019
a0858e2
Fix CreateFunctionTemplateSpecialization to prevent dangling poiner t…
shafik Jul 17, 2019
914a59c
GlobalISel: Handle more cases for widenScalar of G_MERGE_VALUES
arsenm Jul 17, 2019
0966dd0
GlobalISel: Handle widenScalar of arbitrary G_MERGE_VALUES sources
arsenm Jul 17, 2019
85d667f
Renamed and changed the wording of warn_cconv_ignored
Jul 17, 2019
90ba54b
[CodeGen][NFC] Simplify checks for stack protector index checking
francisvm Jul 17, 2019
39fc284
[CodeGen] Add stack protector tests where the guard gets re-assigned
francisvm Jul 17, 2019
9f2b290
[PEI] Don't re-allocate a pre-allocated stack protector slot
francisvm Jul 17, 2019
6e40766
Adding inline comments to code view type record directives for better…
nilanjana87 Jul 17, 2019
4a09a73
[Attributor][NFC] Remove unnecessary debug output
uenoku Jul 17, 2019
eece5a9
[NFC][ScopBuilder]Move finalizeAccesses and its callees to ScopBuilder
DominikAdamski Jul 17, 2019
f45fd42
Speculative fix for stack-tagging.ll failure.
eugenis Jul 17, 2019
9c7f426
[AMDGPU] Stop special casing flat_scratch for register name
rampitec Jul 17, 2019
d0ac007
[NFC][ScopBuilder] Move buildSchedule and its callees to ScopBuilder …
DominikAdamski Jul 17, 2019
be4be61
Add support to ProcessMachCore::DoLoadCore to handle an EFI UUID str.
jasonmolenda Jul 17, 2019
3b82b92
hwasan: Initialize the pass only once.
pcc Jul 17, 2019
0dd40a7
gn build: Merge r366361.
pcc Jul 17, 2019
1375659
Ah, forgot a debug line I left in the dsym-for-uuid.sh script
jasonmolenda Jul 17, 2019
61fff7a
[X86] Make sure we mark 128/256 MLOAD as Legal with VLX when min-lega…
topperc Jul 17, 2019
3628a8f
[NFC] Clarify a Cmake status message regarding Python on LLDBConfig
amccarth-google Jul 17, 2019
ed9a91c
AMDGPU: Set inaccessiblememonly on sendmsg intrinsics
arsenm Jul 17, 2019
7872d76
[AMDGPU] Simplify AMDGPUInstPrinter::printRegOperand()
rampitec Jul 17, 2019
7bb5fc0
llvm-pdbdump: Fix several smaller issues with injected source compres…
nico Jul 17, 2019
3eab481
[llvm-bcanalyzer] Fixed error 'Expected<T> must be checked before acc…
DenisBakhvalov Jul 17, 2019
6abd78c
Make DT a transitive dependency of LI.
eugenis Jul 17, 2019
749f556
hwasan: Use C++ driver for cfi.cc test.
pcc Jul 17, 2019
4e22770
Changes to display code view debug info type records in hex format
nilanjana87 Jul 17, 2019
6898332
[analyzer] MallocChecker: Prevent Integer Set Library false positives
Jul 18, 2019
0c6ad3d
[cmake] Add NATIVE build for cross compiling standalone builds
lanza Jul 18, 2019
9cdd215
[Tests] Add a test showing how we handle overaligned allocas w/ no-re…
preames Jul 18, 2019
bd3e74c
Only build lldb-tblgen if it's not a current target
lanza Jul 18, 2019
f358cf8
[AArch64] Add dependency from AArch64CodeGen to TransformUtils to fix…
MaskRay Jul 18, 2019
ad73a43
[RISCV] Don't acccess an invalidated iterator in RISCVInstrInfo::remo…
asb Jul 18, 2019
8aba95d
[RISCV] Avoid signed integer overflow UB in RISCVMatInt::generateInstSeq
asb Jul 18, 2019
4e8d07f
[RISCV] Re-land r366331 d RISCV to LLVM_ALL_TARGETS
asb Jul 18, 2019
ceeda9f
[clangd] Fix Fix -Wunused-lambda-capture after r366339
MaskRay Jul 18, 2019
1d5cbb7
[ELF][test] Merge/rename some basic*.s tests
MaskRay Jul 18, 2019
44deaf7
[DWARF][RISCV] Add support for RISC-V relocations needed for debug info
asb Jul 18, 2019
4f93b8b
Fix typo in programmer's manual cantFile -> cantFail
lanza Jul 18, 2019
8da0402
[X86] Disable combineConcatVectors for vXi1 vectors.
topperc Jul 18, 2019
03aaef8
[PowerPC][Clang] Remove use of malloc in mm_malloc
ecnelises Jul 18, 2019
33a4336
[NFC][PowerPC] Add the test to test the pass block-placement
zhangkangcool Jul 18, 2019
5dd86ab
clang-tidy release notes: Split and order changes by type
zmodem Jul 18, 2019
36082e3
[CodeComplete] Fix ASTUnit cached completion of macros from preamble,…
sam-mccall Jul 18, 2019
dad1beb
[RISCV][DebugInfo] Fix dwarf-riscv-relocs.ll test on Windows
asb Jul 18, 2019
0ffa833
[LoopInfo] Use early return in branch weight update functions. NFC.
Jul 18, 2019
b8d352a
[RISCV] Reset NoPHIS MachineFunctionProperty in emitSelectPseudo
asb Jul 18, 2019
6371911
Fix asan infinite loop on undefined symbol
Jul 18, 2019
ce8df1f
[lldb] Don't double emit option groups
Teemperor Jul 18, 2019
beadf7d
[lldb][NFC] Tablegenify type commands
Teemperor Jul 18, 2019
f26706f
Fixup r366333 (require x86 in test)
rovka Jul 18, 2019
36d9e83
[OpenCL][PR42033] Fix addr space deduction with template parameters
Jul 18, 2019
0b03429
[lld] Fix vs-diagnostics-version-script test. NFC.
Jul 18, 2019
c38e3ef
[SCEV] add no wrap flag for SCEVAddExpr.
Jul 18, 2019
51cdd51
[clangd] Added highlightings for template parameters and specializati…
jvikstrom Jul 18, 2019
46b55fa
[OpenCL] Update comments/diagnostics to refer to C++ for OpenCL
Jul 18, 2019
83748cc
[OpenCL] Improve destructor support in C++ for OpenCL
mantognini Jul 18, 2019
11512e7
[ARM][DAGCOMBINE][FIX] PerformVMOVRRDCombine
Jul 18, 2019
7823902
[ELF][PPC] Refactor some ppc64 tests
MaskRay Jul 18, 2019
0cadf7b
[lldb] Tablegenify thread commands and fix completion bug for thread …
Teemperor Jul 18, 2019
c89a3d7
[lldb][NFC] Format 'type' commands in Options.td
Teemperor Jul 18, 2019
2cf681a
Creating release_90 branch off revision 366426
zmodem Jul 18, 2019
c02ac09
Drop svn version suffix.
zmodem Jul 19, 2019
135370e
Drop svn version suffix.
zmodem Jul 19, 2019
a4f7f72
Drop svn version suffix.
zmodem Jul 19, 2019
24c2e53
Drop svn version suffix.
zmodem Jul 19, 2019
eb482e5
Merging r366429:
zmodem Jul 19, 2019
7c86e5b
Merging r366433:
zmodem Jul 19, 2019
b51b64e
Merging r366480:
zmodem Jul 19, 2019
1931d3c
Merging r366511:
zmodem Jul 19, 2019
93abf26
Merge remote-tracking branch 'llvm/release/9.x' into rustc/9.0-2019-0…
alexcrichton Jul 19, 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
  •  
  •  
  •  
Original file line number Diff line number Diff line change
Expand Up @@ -108,8 +108,7 @@ void AssertSideEffectCheck::check(const MatchFinder::MatchResult &Result) {
StringRef MacroName = Lexer::getImmediateMacroName(Loc, SM, LangOpts);

// Check if this macro is an assert.
if (std::find(AssertMacros.begin(), AssertMacros.end(), MacroName) !=
AssertMacros.end()) {
if (llvm::is_contained(AssertMacros, MacroName)) {
AssertMacroName = MacroName;
break;
}
Expand Down
17 changes: 11 additions & 6 deletions clang-tools-extra/clang-tidy/bugprone/BranchCloneCheck.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -132,9 +132,12 @@ void BranchCloneCheck::check(const MatchFinder::MatchResult &Result) {
// We report the first occurence only when we find the second one.
diag(Branches[i]->getBeginLoc(),
"repeated branch in conditional chain");
diag(Lexer::getLocForEndOfToken(Branches[i]->getEndLoc(), 0,
*Result.SourceManager, getLangOpts()),
"end of the original", DiagnosticIDs::Note);
SourceLocation End =
Lexer::getLocForEndOfToken(Branches[i]->getEndLoc(), 0,
*Result.SourceManager, getLangOpts());
if (End.isValid()) {
diag(End, "end of the original", DiagnosticIDs::Note);
}
}

diag(Branches[j]->getBeginLoc(), "clone %0 starts here",
Expand Down Expand Up @@ -208,10 +211,12 @@ void BranchCloneCheck::check(const MatchFinder::MatchResult &Result) {

if (EndLoc.isMacroID())
EndLoc = Context.getSourceManager().getExpansionLoc(EndLoc);
EndLoc = Lexer::getLocForEndOfToken(EndLoc, 0, *Result.SourceManager,
getLangOpts());

diag(Lexer::getLocForEndOfToken(EndLoc, 0, *Result.SourceManager,
getLangOpts()),
"last of these clones ends here", DiagnosticIDs::Note);
if (EndLoc.isValid()) {
diag(EndLoc, "last of these clones ends here", DiagnosticIDs::Note);
}
}
BeginCurrent = EndCurrent;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ void ForwardingReferenceOverloadCheck::check(
// template as the function parameter of that type. (This implies that type
// deduction will happen on the type.)
const TemplateParameterList *Params = FuncTemplate->getTemplateParameters();
if (std::find(Params->begin(), Params->end(), TypeParmDecl) == Params->end())
if (!llvm::is_contained(*Params, TypeParmDecl))
return;

// Every parameter after the first must have a default value.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,8 @@ void MultipleInheritanceCheck::registerMatchers(MatchFinder *Finder) {
return;

// Match declarations which have bases.
Finder->addMatcher(cxxRecordDecl(hasBases()).bind("decl"), this);
Finder->addMatcher(
cxxRecordDecl(allOf(hasBases(), isDefinition())).bind("decl"), this);
}

void MultipleInheritanceCheck::check(const MatchFinder::MatchResult &Result) {
Expand Down
7 changes: 2 additions & 5 deletions clang-tools-extra/clang-tidy/modernize/UseNullptrCheck.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -242,10 +242,8 @@ class CastSequenceVisitor : public RecursiveASTVisitor<CastSequenceVisitor> {
getOutermostMacroName(StartLoc, SM, Context.getLangOpts());

// Check to see if the user wants to replace the macro being expanded.
if (std::find(NullMacros.begin(), NullMacros.end(), OutermostMacroName) ==
NullMacros.end()) {
if (!llvm::is_contained(NullMacros, OutermostMacroName))
return skipSubTree();
}

StartLoc = SM.getFileLoc(StartLoc);
EndLoc = SM.getFileLoc(EndLoc);
Expand Down Expand Up @@ -327,8 +325,7 @@ class CastSequenceVisitor : public RecursiveASTVisitor<CastSequenceVisitor> {

StringRef Name =
Lexer::getImmediateMacroName(OldArgLoc, SM, Context.getLangOpts());
return std::find(NullMacros.begin(), NullMacros.end(), Name) !=
NullMacros.end();
return llvm::is_contained(NullMacros, Name);
}

MacroLoc = SM.getExpansionRange(ArgLoc).getBegin();
Expand Down
1 change: 1 addition & 0 deletions clang-tools-extra/clang-tidy/readability/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ add_clang_library(clangTidyReadabilityModule
BracesAroundStatementsCheck.cpp
ConstReturnTypeCheck.cpp
ContainerSizeEmptyCheck.cpp
ConvertMemberFunctionsToStatic.cpp
DeleteNullPointerCheck.cpp
DeletedDefaultCheck.cpp
ElseAfterReturnCheck.cpp
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,172 @@
//===--- ConvertMemberFunctionsToStatic.cpp - clang-tidy ------------------===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//

#include "ConvertMemberFunctionsToStatic.h"
#include "clang/AST/ASTContext.h"
#include "clang/AST/DeclCXX.h"
#include "clang/AST/RecursiveASTVisitor.h"
#include "clang/ASTMatchers/ASTMatchFinder.h"
#include "clang/Basic/SourceLocation.h"

using namespace clang::ast_matchers;

namespace clang {
namespace tidy {
namespace readability {

AST_MATCHER(CXXMethodDecl, isStatic) { return Node.isStatic(); }

AST_MATCHER(CXXMethodDecl, hasTrivialBody) { return Node.hasTrivialBody(); }

AST_MATCHER(CXXMethodDecl, isOverloadedOperator) {
return Node.isOverloadedOperator();
}

AST_MATCHER(CXXRecordDecl, hasAnyDependentBases) {
return Node.hasAnyDependentBases();
}

AST_MATCHER(CXXMethodDecl, isTemplate) {
return Node.getTemplatedKind() != FunctionDecl::TK_NonTemplate;
}

AST_MATCHER(CXXMethodDecl, isDependentContext) {
return Node.isDependentContext();
}

AST_MATCHER(CXXMethodDecl, isInsideMacroDefinition) {
const ASTContext &Ctxt = Finder->getASTContext();
return clang::Lexer::makeFileCharRange(
clang::CharSourceRange::getCharRange(
Node.getTypeSourceInfo()->getTypeLoc().getSourceRange()),
Ctxt.getSourceManager(), Ctxt.getLangOpts())
.isInvalid();
}

AST_MATCHER_P(CXXMethodDecl, hasCanonicalDecl,
ast_matchers::internal::Matcher<CXXMethodDecl>, InnerMatcher) {
return InnerMatcher.matches(*Node.getCanonicalDecl(), Finder, Builder);
}

AST_MATCHER(CXXMethodDecl, usesThis) {
class FindUsageOfThis : public RecursiveASTVisitor<FindUsageOfThis> {
public:
bool Used = false;

bool VisitCXXThisExpr(const CXXThisExpr *E) {
Used = true;
return false; // Stop traversal.
}
} UsageOfThis;

// TraverseStmt does not modify its argument.
UsageOfThis.TraverseStmt(const_cast<Stmt *>(Node.getBody()));

return UsageOfThis.Used;
}

void ConvertMemberFunctionsToStatic::registerMatchers(MatchFinder *Finder) {
Finder->addMatcher(
cxxMethodDecl(
isDefinition(), isUserProvided(),
unless(anyOf(
isExpansionInSystemHeader(), isVirtual(), isStatic(),
hasTrivialBody(), isOverloadedOperator(), cxxConstructorDecl(),
cxxDestructorDecl(), cxxConversionDecl(), isTemplate(),
isDependentContext(),
ofClass(anyOf(
isLambda(),
hasAnyDependentBases()) // Method might become virtual
// depending on template base class.
),
isInsideMacroDefinition(),
hasCanonicalDecl(isInsideMacroDefinition()), usesThis())))
.bind("x"),
this);
}

/// \brief Obtain the original source code text from a SourceRange.
static StringRef getStringFromRange(SourceManager &SourceMgr,
const LangOptions &LangOpts,
SourceRange Range) {
if (SourceMgr.getFileID(Range.getBegin()) !=
SourceMgr.getFileID(Range.getEnd()))
return {};

return Lexer::getSourceText(CharSourceRange(Range, true), SourceMgr,
LangOpts);
}

static SourceRange getLocationOfConst(const TypeSourceInfo *TSI,
SourceManager &SourceMgr,
const LangOptions &LangOpts) {
assert(TSI);
const auto FTL = TSI->getTypeLoc().IgnoreParens().getAs<FunctionTypeLoc>();
assert(FTL);

SourceRange Range{FTL.getRParenLoc().getLocWithOffset(1),
FTL.getLocalRangeEnd()};
// Inside Range, there might be other keywords and trailing return types.
// Find the exact position of "const".
StringRef Text = getStringFromRange(SourceMgr, LangOpts, Range);
size_t Offset = Text.find("const");
if (Offset == StringRef::npos)
return {};

SourceLocation Start = Range.getBegin().getLocWithOffset(Offset);
return {Start, Start.getLocWithOffset(strlen("const") - 1)};
}

void ConvertMemberFunctionsToStatic::check(
const MatchFinder::MatchResult &Result) {
const auto *Definition = Result.Nodes.getNodeAs<CXXMethodDecl>("x");

// TODO: For out-of-line declarations, don't modify the source if the header
// is excluded by the -header-filter option.
DiagnosticBuilder Diag =
diag(Definition->getLocation(), "method %0 can be made static")
<< Definition;

// TODO: Would need to remove those in a fix-it.
if (Definition->getMethodQualifiers().hasVolatile() ||
Definition->getMethodQualifiers().hasRestrict() ||
Definition->getRefQualifier() != RQ_None)
return;

const CXXMethodDecl *Declaration = Definition->getCanonicalDecl();

if (Definition->isConst()) {
// Make sure that we either remove 'const' on both declaration and
// definition or emit no fix-it at all.
SourceRange DefConst = getLocationOfConst(Definition->getTypeSourceInfo(),
*Result.SourceManager,
Result.Context->getLangOpts());

if (DefConst.isInvalid())
return;

if (Declaration != Definition) {
SourceRange DeclConst = getLocationOfConst(
Declaration->getTypeSourceInfo(), *Result.SourceManager,
Result.Context->getLangOpts());

if (DeclConst.isInvalid())
return;
Diag << FixItHint::CreateRemoval(DeclConst);
}

// Remove existing 'const' from both declaration and definition.
Diag << FixItHint::CreateRemoval(DefConst);
}
Diag << FixItHint::CreateInsertion(Declaration->getBeginLoc(), "static ");
}

} // namespace readability
} // namespace tidy
} // namespace clang
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
//===--- ConvertMemberFunctionsToStatic.h - clang-tidy ----------*- C++ -*-===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//

#ifndef LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_READABILITY_CONVERTMEMFUNCTOSTATIC_H
#define LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_READABILITY_CONVERTMEMFUNCTOSTATIC_H

#include "../ClangTidy.h"

namespace clang {
namespace tidy {
namespace readability {

/// This check finds C++ class methods than can be made static
/// because they don't use the 'this' pointer.
///
/// For the user-facing documentation see:
/// http://clang.llvm.org/extra/clang-tidy/checks/
/// readability-convert-member-functions-to-static.html
class ConvertMemberFunctionsToStatic : public ClangTidyCheck {
public:
ConvertMemberFunctionsToStatic(StringRef Name, ClangTidyContext *Context)
: ClangTidyCheck(Name, Context) {}
void registerMatchers(ast_matchers::MatchFinder *Finder) override;
void check(const ast_matchers::MatchFinder::MatchResult &Result) override;
};

} // namespace readability
} // namespace tidy
} // namespace clang

#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_READABILITY_CONVERTMEMFUNCTOSTATIC_H
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
#include "NamespaceCommentCheck.h"
#include "clang/AST/ASTContext.h"
#include "clang/ASTMatchers/ASTMatchers.h"
#include "clang/Basic/SourceLocation.h"
#include "clang/Lex/Lexer.h"
#include "llvm/ADT/StringExtras.h"

Expand Down Expand Up @@ -181,7 +182,13 @@ void NamespaceCommentCheck::check(const MatchFinder::MatchResult &Result) {
? "anonymous namespace"
: ("namespace '" + NestedNamespaceName.str() + "'");

diag(AfterRBrace, Message)
// Place diagnostic at an old comment, or closing brace if we did not have it.
SourceLocation DiagLoc =
OldCommentRange.getBegin() != OldCommentRange.getEnd()
? OldCommentRange.getBegin()
: ND->getRBraceLoc();

diag(DiagLoc, Message)
<< NamespaceName
<< FixItHint::CreateReplacement(
CharSourceRange::getCharRange(OldCommentRange),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
#include "BracesAroundStatementsCheck.h"
#include "ConstReturnTypeCheck.h"
#include "ContainerSizeEmptyCheck.h"
#include "ConvertMemberFunctionsToStatic.h"
#include "DeleteNullPointerCheck.h"
#include "DeletedDefaultCheck.h"
#include "ElseAfterReturnCheck.h"
Expand Down Expand Up @@ -57,6 +58,8 @@ class ReadabilityModule : public ClangTidyModule {
"readability-const-return-type");
CheckFactories.registerCheck<ContainerSizeEmptyCheck>(
"readability-container-size-empty");
CheckFactories.registerCheck<ConvertMemberFunctionsToStatic>(
"readability-convert-member-functions-to-static");
CheckFactories.registerCheck<DeleteNullPointerCheck>(
"readability-delete-null-pointer");
CheckFactories.registerCheck<DeletedDefaultCheck>(
Expand Down
8 changes: 8 additions & 0 deletions clang-tools-extra/clangd/ClangdLSPServer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -926,6 +926,13 @@ void ClangdLSPServer::onTypeHierarchy(
Params.resolve, Params.direction, std::move(Reply));
}

void ClangdLSPServer::onResolveTypeHierarchy(
const ResolveTypeHierarchyItemParams &Params,
Callback<Optional<TypeHierarchyItem>> Reply) {
Server->resolveTypeHierarchy(Params.item, Params.resolve, Params.direction,
std::move(Reply));
}

void ClangdLSPServer::applyConfiguration(
const ConfigurationSettings &Settings) {
// Per-file update to the compilation database.
Expand Down Expand Up @@ -1021,6 +1028,7 @@ ClangdLSPServer::ClangdLSPServer(
MsgHandler->bind("workspace/didChangeConfiguration", &ClangdLSPServer::onChangeConfiguration);
MsgHandler->bind("textDocument/symbolInfo", &ClangdLSPServer::onSymbolInfo);
MsgHandler->bind("textDocument/typeHierarchy", &ClangdLSPServer::onTypeHierarchy);
MsgHandler->bind("typeHierarchy/resolve", &ClangdLSPServer::onResolveTypeHierarchy);
// clang-format on
}

Expand Down
2 changes: 2 additions & 0 deletions clang-tools-extra/clangd/ClangdLSPServer.h
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,8 @@ class ClangdLSPServer : private DiagnosticsConsumer {
Callback<llvm::Optional<Hover>>);
void onTypeHierarchy(const TypeHierarchyParams &,
Callback<llvm::Optional<TypeHierarchyItem>>);
void onResolveTypeHierarchy(const ResolveTypeHierarchyItemParams &,
Callback<llvm::Optional<TypeHierarchyItem>>);
void onChangeConfiguration(const DidChangeConfigurationParams &);
void onSymbolInfo(const TextDocumentPositionParams &,
Callback<std::vector<SymbolDetails>>);
Expand Down
7 changes: 7 additions & 0 deletions clang-tools-extra/clangd/ClangdServer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -528,6 +528,13 @@ void ClangdServer::typeHierarchy(PathRef File, Position Pos, int Resolve,
WorkScheduler.runWithAST("Type Hierarchy", File, Bind(Action, std::move(CB)));
}

void ClangdServer::resolveTypeHierarchy(
TypeHierarchyItem Item, int Resolve, TypeHierarchyDirection Direction,
Callback<llvm::Optional<TypeHierarchyItem>> CB) {
clangd::resolveTypeHierarchy(Item, Resolve, Direction, Index);
CB(Item);
}

void ClangdServer::onFileEvent(const DidChangeWatchedFilesParams &Params) {
// FIXME: Do nothing for now. This will be used for indexing and potentially
// invalidating other caches.
Expand Down
5 changes: 5 additions & 0 deletions clang-tools-extra/clangd/ClangdServer.h
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,11 @@ class ClangdServer {
TypeHierarchyDirection Direction,
Callback<llvm::Optional<TypeHierarchyItem>> CB);

/// Resolve type hierarchy item in the given direction.
void resolveTypeHierarchy(TypeHierarchyItem Item, int Resolve,
TypeHierarchyDirection Direction,
Callback<llvm::Optional<TypeHierarchyItem>> CB);

/// Retrieve the top symbols from the workspace matching a query.
void workspaceSymbols(StringRef Query, int Limit,
Callback<std::vector<SymbolInformation>> CB);
Expand Down
Loading