Skip to content

LLVM and SPIRV translator pulldown #862

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

Merged
merged 566 commits into from
Nov 22, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
566 commits
Select commit Hold shift + click to select a range
e782192
[clang][IFS][test][NFC] Tightening up clang-ifs tests to use -cc1 mor…
plotfi Nov 14, 2019
c72aef9
[clang][IFS][test] Removing -shared, fixing triple: driver-test.c/win…
plotfi Nov 14, 2019
4873319
[clang][IFS][test] Reverting driver-test.c to what it was prior to e7…
plotfi Nov 14, 2019
f9f30f2
[LLDB] Fix whitespace/tabs mismatch in lldbsuite Makefile.rules
omjavaid Nov 14, 2019
ea2ba51
[lldb][NFC] Simplify IOHandler constructor/destructor setup
Teemperor Nov 14, 2019
eafe0cf
DWARFDebugLoclists: stricter base address handling
labath Nov 12, 2019
a2292cc
[ThinLTO] Add correctness check for RO/WO variable import
eleviant Nov 14, 2019
e780839
[NFC] Fix typo in ARMBaseRegisterInfo
Nov 14, 2019
2eb0862
[AArch64][DebugInfo] Fix incorrect call site param value produced by …
djtodoro Nov 14, 2019
a2f6ae9
[InstCombine] Fold PHIs with equal incoming pointers
DaniilSuchkov Nov 14, 2019
8715ffd
[lldb] Fix that trailing backslashes in source lines break the Clang …
Teemperor Nov 14, 2019
4c9d0da
Revert "[InstCombine] Fold PHIs with equal incoming pointers"
DaniilSuchkov Nov 14, 2019
e73177e
Fix use of add_llvm_tool in projects that build no targets
kpet Nov 13, 2019
bcb6829
[NFC] Add one test for PowerPC to verify the sext_inreg for vector type.
Nov 14, 2019
e03a06b
Fix typos in docs. NFC
rovka Nov 14, 2019
f7848fd
[AArch64][SVE] Implement additional floating-point arithmetic intrinsics
kmclaughlin-arm Nov 14, 2019
cd83d9f
[AArch64][SVE] Implement remaining floating-point arithmetic intrinsics
kmclaughlin-arm Nov 14, 2019
4787c6e
[mips][NFC] Remove old FIXME comment
Nov 14, 2019
32dfbd1
[libomptarget][nfc] Use cuda variable wrappers from support.h
JonChesterfield Nov 14, 2019
7e6294c
Modernize llvm::Error handling in ExternalASTMerger
Teemperor Nov 14, 2019
9b89bda
[DAGCombiner] Use TLI field already available. NFC
chfast Nov 14, 2019
1c247dd
[DAGCombiner] Drop redundant DAG method param. NFC
chfast Nov 14, 2019
cb47b87
[LV] PreferPredicateOverEpilog respecting predicate loop hint
Nov 14, 2019
5a9547b
[clangd] Simplify the code in Index::refs
ilya-biryukov Nov 14, 2019
f9dd03b
[AArch64][SVE] Implement floating-point comparison & reduction intrin…
kmclaughlin-arm Nov 14, 2019
8b77a3a
[libc++] [P1612] Add missing feature-test macro __cpp_lib_endian.
ldionne Nov 14, 2019
1466335
[libc++][P1872] span should have size_type, not index_type.
ldionne Nov 14, 2019
9242b99
MSP430 - fix uninitialized variable warnings. NFCI.
RKSimon Nov 14, 2019
6039e54
Hexagon - fix uninitialized variable warnings. NFCI.
RKSimon Nov 14, 2019
b5f94ad
Fix uninitialized variable warnings. NFCI.
RKSimon Nov 14, 2019
ba22911
SROA - fix uninitialized variable warnings. NFCI.
RKSimon Nov 14, 2019
8c09e47
Fix uninitialized variable warning. NFCI.
RKSimon Nov 14, 2019
f784ad8
Fix uninitialized variable warning. NFCI.
RKSimon Nov 14, 2019
39c0829
WholeProgramDevirt - fix uninitialized variable warnings. NFCI.
RKSimon Nov 14, 2019
edfc94e
GCOVProfiling - fix uninitialized variable warnings + make getFuncChe…
RKSimon Nov 14, 2019
232cdb3
ARM: allow rewriting frame indexes for all prefetch variants.
TNorthover Nov 14, 2019
a0a38b8
On FreeBSD use AT_EXECPATH from ELF auxiliary vectors for getExecutab…
emaste Nov 13, 2019
360f661
Revert "[ThinLTO] Add correctness check for RO/WO variable import"
d0k Nov 14, 2019
ce371ec
[InstCombine] regenerate test CHECKs; NFC
rotateright Nov 14, 2019
6e3ecd1
[lldb] Fix dwo variant of TestLibCxxFunction
labath Nov 14, 2019
23022b9
[Analyzer][NFC] Separate white-box tests for iterator modelling from …
Nov 8, 2019
058bc4c
[ADT] Move drop_begin from iterator_range.h into STLExtras.
lhames Nov 13, 2019
37abeed
[clangd] Expose value of enumerators to Hover API. (not UI yet)
sam-mccall Nov 13, 2019
bbcbb10
[clangd] Ignore more implicit nodes in computing selection.
sam-mccall Nov 13, 2019
1275ab1
Improve VFS compatibility on Windows
amccarth-google Nov 7, 2019
c9de002
[AMDGPU][HIP] Change default DWARF version to 4
slinder1 Nov 13, 2019
0e45e60
Use ForEachExternalModule in ParseTypeFromClangModule (NFC)
adrian-prantl Nov 14, 2019
4229f70
[LLDB] Make a clear distinction between usage & development docs
JDevlieghere Nov 14, 2019
83f5287
Rename DWO -> Clang module to avoid confusion. (NFC)
adrian-prantl Nov 14, 2019
0352007
Convert UpdateExternalModuleListIfNeeded to use early exits.
adrian-prantl Nov 14, 2019
268e11f
Convert condition to early exit (NFC)
adrian-prantl Nov 14, 2019
dcb5bd9
Fix incorrect comment.
adrian-prantl Nov 14, 2019
399e29d
[OPENMP]Add assignment operator in UDR test, NFC.
alexey-bataev Nov 14, 2019
e2369fd
[clang-include-fixer] Skip .rc files when finding symbols
rnk Nov 13, 2019
56ae3e2
Make the language more consistent since I'm about to commit a content
kpneal Oct 10, 2019
385572c
[InstCombine] remove duplicate code for simplifying a shuffle; NFCI
rotateright Nov 14, 2019
d2b6cc7
Document more specifically the rounding for "llvm.round".
kpneal Nov 14, 2019
cfca818
[cmake] Emit an error for -DBUILD_SHARED_LIBS=ON on Windows
tstellar Nov 14, 2019
5fe3f00
Replace wrongly deleted header banner, fix formatting
rnk Nov 14, 2019
4ee70e0
[clang-format] Fixed edge-case with SpacesInSquareBrackets with trail…
Nov 14, 2019
17bb2d7
[ExpandReductions] Don't push all intrinsics to the worklist. Just pu…
topperc Nov 14, 2019
c6b09bf
[RISCV] Fix wrong CFI directives
luismarques Nov 14, 2019
caa9493
[llvm-objcopy][COFF] Add support for extended relocation tables
sndmitriev Nov 14, 2019
141bb5f
Add support for multi-module bitcode files to llvm-dis
ormris Nov 13, 2019
32d840d
[RISCV] Use addi rather than add x0
lenary Nov 14, 2019
e85a96d
Update lit infra to detect "MemoryWithOrigins' sanitizer build.
Nov 14, 2019
9fcf4f3
[Hexagon] Fix clang driver to parse -mcpu/-mvXX and -march properly.
Nov 14, 2019
fdf1ae3
[Hexagon] Validate the iterators before converting them to mux.
Nov 14, 2019
7c7e368
[Pipeliner] Fix an assertion caused by iterator invalidation.
Nov 14, 2019
baacd18
Fix up lit's tests to run in a multi-config build environment.
pogo59 Nov 14, 2019
f2e6544
[lldb][Editline] Support ctrl+left/right arrow word navigation.
rupprecht Nov 12, 2019
b2839c4
[globalisel][irtanslator] The IRTranslator should preserve TBAA infor…
dsandersllvm Nov 14, 2019
2c83197
[GPGPU] Fix #includes.
Meinersbur Nov 14, 2019
4d02263
[yaml2obj][COFF] Add support for extended relocation tables
sndmitriev Nov 14, 2019
1ee84e5
[DebugInfo] Allow spill slots in call site parameter descriptions
vedantk Nov 14, 2019
3cec2a1
[X86] Fix the implementation of __readcr3/__writecr3 to work in 64-bi…
topperc Nov 14, 2019
f7b3ae6
[GPGPU] Fix depricated warning.
Meinersbur Nov 14, 2019
e69a736
[llvm-dis] Fix the disable-output flag
ormris Nov 14, 2019
bfa3257
Revert "Temporarily Revert:"
alexey-bataev Nov 14, 2019
f24c335
[COFF] Don't include llvm/LTO/LTO.h in a header
rnk Nov 14, 2019
4c39f34
[SanitizerCommon] Print the current value of options when printing ou…
delcypher Oct 29, 2019
dd16b3f
[BPF] Restrict preserve_access_index attribute to C only
yonghong-song Nov 14, 2019
f4f47da
[Reproducer] Enable crash reports for reproducer tests
JDevlieghere Nov 14, 2019
adfad4d
Forward declare the DWARFCache to avoid including LLVM DWARF details
rnk Nov 14, 2019
de3fb1e
[COFF] Avoid CodeView include in header
rnk Nov 14, 2019
3b142bc
[LLDB] Fix more -Wdocumentation issues (NFC)
JDevlieghere Nov 14, 2019
76ac166
[libc++] [P0920] [P1661] Update status page.
mkurdej Nov 14, 2019
4c1a1d3
Add missing includes needed to prune LLVMContext.h include, NFC
rnk Nov 14, 2019
95c770f
[Utility] Remove a dead header [PPC64LE_ehframe_Registers.h]
Nov 14, 2019
8723b95
[WinEH] Fix the wrong alignment orientation during calculating EH frame.
phoebewang Nov 14, 2019
a4c76be
[InstCombine] Don't use getFirstNonPHI in FoldIntegerTypedPHI
francisvm Nov 15, 2019
3466ceb
Add a test to cover structural match for recursive data types
bcardosolopes Nov 14, 2019
bc11830
[llvm-objcopy][MachO] Implement --remove-section
nuta Nov 15, 2019
16f38dd
[ORC] Add a utility to support dumping JIT'd objects to disk for debu…
lhames Nov 14, 2019
2a42cfd
gn build: Merge 16f38dda292
llvmgnsyncbot Nov 15, 2019
39af723
Unbreak the clang test suite when hexagon-link is not available
davezarzycki Nov 15, 2019
cd4d1a9
Merge commit '5565d365f2a' into sycl-web
sndmitriev Nov 15, 2019
bc276c6
GlobalISel: Lower s1 source G_SITOFP/G_UITOFP
arsenm Nov 15, 2019
69fcfb7
AMDGPU: Try to commute sub of boolean ext
arsenm Nov 14, 2019
31479d8
AMDGPU: Change boolean content type to 0 or 1
arsenm Nov 11, 2019
04dcb80
GCC 5.3 build fix
zmodem Nov 15, 2019
c42e385
Fix GCC -Wcast-qual warnings
zmodem Nov 15, 2019
87054ec
[AST] Use written names instead of `type-param-0-0` in more cases whe…
sam-mccall Nov 14, 2019
902e845
[ARM,MVE] Add intrinsics for 'administrative' vector operations.
statham-arm Nov 13, 2019
9e37892
[ARM,MVE] Add intrinsics for vector get/set lane.
statham-arm Nov 15, 2019
1643734
[clang] Remove the DIFlagArgumentNotModified debug info flag
djtodoro Nov 15, 2019
1587c7e
[Scalarizer] Treat values from unreachable blocks as undef
mikaelholmen Nov 15, 2019
dda8e95
[MIPS GlobalISel] Select addiu
Nov 15, 2019
1f55935
[MIPS GlobalISel] Select andi, ori and xori
Nov 15, 2019
7132770
[ARM][MVE] tail-predication
Nov 15, 2019
41d6ad6
Revert "[clang] Remove the DIFlagArgumentNotModified debug info flag"
djtodoro Nov 15, 2019
c953e06
[CodeGen] Increase the size of a SmallVector
jayfoad Nov 15, 2019
0908093
DWARFDebugLoc(v4): Add an incremental parsing function
labath Nov 5, 2019
a763d98
[gen_ast_dump_json_test.py] Add a --update flag
arichardson Oct 29, 2019
698ea9c
[gen_ast_dump_json_test.py] Parse RUN: lines with --update
arichardson Oct 29, 2019
049f4c9
[gen_ast_dump_json_test.py] Infer --filters flags when using --update
arichardson Oct 29, 2019
90dbb47
[gen_ast_dump_json_test.py] Skip manual tests when using --update
arichardson Oct 29, 2019
d09e811
[gen_ast_dump_json_test.py] Copy to binary directory to omit --clang …
arichardson Nov 12, 2019
7debe51
[gen_ast_dump_json_test.py] Allow updating multiple files in one go
arichardson Nov 12, 2019
709ea17
[NFC] Regenerate ast-dump-json tests
arichardson Nov 12, 2019
3c3048c
Include the mangled name in -ast-dump=json
arichardson Nov 15, 2019
0df4a8f
[update_cc_test_checks.py] Use -ast-dump=json to get mangled name
arichardson Nov 15, 2019
e6584b2
Move floating point related entities to namespace level
spavloff Aug 29, 2019
9c5e0fc
gn build: Merge e6584b2b7b2
llvmgnsyncbot Nov 15, 2019
5f0c3ba
Fix TestFormatters.py stepping too far
rovka Nov 14, 2019
3d708bf
Recommit "[ThinLTO] Add correctness check for RO/WO variable import"
eleviant Nov 15, 2019
02419ab
[AMDGPU] Lower llvm.amdgcn.s.buffer.load.v3[i|f]32
piotrAMD Nov 12, 2019
c2f6efc
[Clang][ASTImporter] Added visibility check for ClassTemplateDecl.
balazske Nov 15, 2019
b0c1900
[ARM,MVE] Add reversed isel patterns for MVE `vcmp qN,rN`
statham-arm Nov 15, 2019
fa3b87f
[CodeComplete] Constructor overload candidates report as vector(int) …
sam-mccall Nov 15, 2019
e3d5ff5
[RISCV] Match GCC `-march`/`-mabi` driver defaults
lenary Nov 15, 2019
509efe5
[clangd] Add isHeaderFile helper.
hokein Nov 13, 2019
b221c9d
[clangd] Replace getLangOpts().isHeaderFile usage with isHeaderFile h…
hokein Nov 15, 2019
cb17614
clang: enable unwind tables on FreeBSD !amd64
emaste Nov 15, 2019
aa6d48f
Implement target(branch-protection) attribute for AArch64
momchil-velikov Nov 15, 2019
c3607f5
[X86][SSE] Add test for extractelement from volatile vector load
RKSimon Nov 15, 2019
840c891
[llvm-objcopy][NFC] Use generated object file in COFF/add-section.test
sndmitriev Nov 13, 2019
3dfa975
Add read-only data assembly writing for aix
Nov 15, 2019
ad9fd32
[clangd] Fix SelectionTree behavior on constructor init-lists.
sam-mccall Nov 15, 2019
713c30b
[clangd] Don't consider class template params part of constructor name.
sam-mccall Nov 15, 2019
f018246
[scudo][standalone] Enabled SCUDO_DEBUG for tests + fixes
Nov 14, 2019
c908196
[clangd] Fix typo in symbol kind conversion
sam-mccall Nov 15, 2019
7276868
[MirNamer][Canonicalizer]: Perform instruction semantic based renaming
Nov 15, 2019
358eaa3
[clang-format] Flexible line endings
Nov 15, 2019
3bc7119
Comment the fact that DWARFDebugInfoEntry isn't copyable.
adrian-prantl Nov 15, 2019
767eadd
[libcxx] use __builtin_isnan in std::isnan.
TocarIP Nov 15, 2019
8e34be2
[libc++] [chrono] Fix year_month_weekday::ok() implementation.
mkurdej Nov 15, 2019
81104ea
[CMake] Configure the Info.plist so it contains a real version number.
JDevlieghere Nov 15, 2019
f7efea0
[LoadStoreVectorize] Use '||' instead of '|' between sides with funct…
davidbolvansky Nov 15, 2019
67c416d
[DebugInfo] Allow spill slots in call site parameter descriptions
vedantk Nov 14, 2019
8bcd01f
[ThinLTO] Fix -Wunused-function in NDEBUG builds after llvmorg-10-ini…
MaskRay Nov 15, 2019
28a5dc7
[llvm-objcopy][MachO] Implement --redefine-sym and --redefine-syms
MaskRay Nov 13, 2019
575e09d
[AST] Let DeclarationNameInfo printing use PrintingPolicy, and fix co…
sam-mccall Nov 15, 2019
209e30b
[clangd] Don't repeat class template args when printing constructor d…
sam-mccall Nov 15, 2019
d6de5f1
[SVFS] Inject TLI Mappings in VFABI attribute.
Nov 11, 2019
e06f3e0
[OpenMP 5.0] - Extend defaultmap, by Chi Chun Chen.
chichunchen Nov 15, 2019
478ad94
[GCOV] Skip artificial functions from being emitted
aganea Nov 15, 2019
2f95b64
Rename posix/FileSystem.cpp to FileSystemPosix.cpp
adrian-prantl Nov 15, 2019
7d71dd9
Add RTTI support to the SymbolFile class hierarchy
adrian-prantl Nov 15, 2019
1cbe003
[-gmodules] Let LLDB log a warning if the Clang module hash mismatches.
adrian-prantl Nov 14, 2019
f897d08
[LoopCacheAnalysis]: Fix assertion failure during cost computation
rcraik Nov 15, 2019
09c7e51
Add a missing triple in ast-dump-decl-json.m
arichardson Nov 15, 2019
0287efb
[mips] Do not emit R_MIPS_JALR for sym+offset in case of O32 ABI
atanasyan Nov 9, 2019
6108eb4
[mips] Enable `la` pseudo instruction on 64-bit arch.
atanasyan Nov 11, 2019
7889d8e
Revert "[LoadStoreVectorize] Use '||' instead of '|' between sides wi…
zygoloid Nov 15, 2019
7f1cb1f
gn build: Merge d6de5f12d48
llvmgnsyncbot Nov 15, 2019
9c1baa2
re-land [DebugInfo] Add debug location to stubs generated by CGDeclCX…
aganea Nov 15, 2019
782392d
[clang-tidy] modernize-use-using work with multi-argument templates
Nov 15, 2019
ee0882b
[SimplifyCFG] propagate fast-math-flags (FMF) from phi to select
rotateright Nov 15, 2019
50e9956
[clang-tidy] modernize-use-override new option AllowOverrideAndFinal
Nov 15, 2019
caf3166
Revert "re-land [DebugInfo] Add debug location to stubs generated by …
aganea Nov 15, 2019
631be5c
Remove Support/Options.h, it is unused
rnk Nov 14, 2019
51a0a4e
gn build: Merge 631be5c0d41
llvmgnsyncbot Nov 15, 2019
96fbc32
[clang-tidy] Give readability-redundant-string-init a customizable li…
Nov 15, 2019
47bd7c5
Revert "[clang-tidy] Give readability-redundant-string-init a customi…
Nov 15, 2019
304abde
[GISel][CombinerHelper] Add support for scalar type for the result of…
Nov 15, 2019
98ceac4
[GISel][CombinerHelper] Use uses() instead of operands() when travers…
Nov 15, 2019
9053574
Don't use end-of-line comments for the DebugInfoKind enum, NFC
rnk Nov 15, 2019
06f3dab
[clang-tidy] Fix readability-redundant-string-init for c++17/c++2a
Nov 15, 2019
12d7500
[clang-tidy] Give readability-redundant-string-init a customizable li…
Nov 15, 2019
a578adc
dotest: Add a way for the run_to_* helpers to register dylibs
fredriss Nov 8, 2019
d41ed54
Merge from 'sycl' to 'sycl-web' (#1)
Nov 15, 2019
4516dc1
Don't add optnone or noinline if the function is already marked as
ahatanaka Nov 15, 2019
ce0f3ee
[COFF] Don't error if the only inputs are from /wholearchive:
rnk Nov 7, 2019
194d7ec
[WebAssembly] Fix miscompile of select with and
tlively Nov 15, 2019
d295087
DebugInfo: Templatize rnglist header parsing to setup for reuse with …
dwblaikie Nov 15, 2019
0304360
Add a testcase for Clang modules being updated within one LLDB session.
adrian-prantl Nov 16, 2019
4d23764
Fix -Wunused-result warnings in LLDB
rnk Nov 14, 2019
979da9a
Avoid including Builtins.h in Preprocessor.h
rnk Nov 16, 2019
2c7c528
[lldb-vscode] support the completion request
Oct 30, 2019
97c742e
[llvm-cov] Fix illegal cast from uint64_t to int64_t
sajjadm-google Nov 16, 2019
77cfcd7
DebugInfo: Use loclistx for DWARFv5 location lists to reduce the numb…
dwblaikie Nov 12, 2019
0393b87
Merge from 'master' to 'sycl-web' (#184)
sndmitriev Nov 16, 2019
cf6cf0c
[RISCV] Handle variable sized objects with the stack need to be reali…
ShivaChen Oct 15, 2019
d8f7c68
AMDGPU/SILoadStoreOptimizer: fix a likely bug introduced recently
nhaehnle Oct 9, 2019
42effc1
Add support of the next Ubuntu (Ubuntu 20.04 - Focal Fossa)
sylvestre Nov 16, 2019
a4a7c12
[clang-format] Add SpaceBeforeBrackets
mydeveloperday Nov 16, 2019
57776f7
[ELF] Fix lld build on Windows/MinGW
aykevl Nov 15, 2019
114f3e5
Fix a build failure with perf: Add a missing include to llvm/Support/…
sylvestre Nov 16, 2019
d4819fe
Remove +x permission on clang/lib/Format/Format.cpp
sylvestre Nov 16, 2019
9b40a7f
Remove +x permission on some files
sylvestre Nov 16, 2019
5987cc1
[clang-format] fix regression in middle pointer alignment
mydeveloperday Nov 16, 2019
bf142fc
MCObjectStreamer: assign MCSymbols in the dummy fragment to offset 0.
jyknight Nov 10, 2019
a7f97b0
[clangd] Improve long and confusing preamble log message.
sam-mccall Nov 16, 2019
423f541
[DWARF5]Addition of alignment atrribute in typedef DIE.
SouraVX Nov 15, 2019
08ea1ee
[NFC] Refactor representation of materialized temporaries
Ralender Nov 16, 2019
6d7fa65
[mips] Remove old FIXME comment. NFC
atanasyan Nov 16, 2019
584704c
[mips] Remove redundant cast. NFC
atanasyan Nov 16, 2019
2916489
[Docs] Fix relative links in tutorial.
christinaa Nov 16, 2019
0068c59
[libc++] Rename __to_raw_pointer to __to_address.
EricWF Nov 16, 2019
551acdb
Make it possible to run MIRCanonicalizer in pipeline.
Nov 16, 2019
63cf704
[Docs] Try fixing the tutorial toctree
christinaa Nov 16, 2019
fb55d56
[Docs] Fix sphinx warning.
christinaa Nov 16, 2019
5e782e7
[Docs] Remove stray :doc: directive.
christinaa Nov 16, 2019
45d048c
[libc++] Add C++20 contiguous_iterator_tag.
EricWF Nov 17, 2019
6624fcb
[libc++] Add _ITER_CONCEPT and _ITER_TRAITS implementations from C++20
EricWF Nov 17, 2019
cc6b853
[MIRNamer]: Make the check lines in the test robust with regex.
Nov 17, 2019
c9276fb
Revert "[NFC] Refactor representation of materialized temporaries"
nico Nov 17, 2019
7bed2cb
[InstCombine] Add extra tests for overflow_to_sat.ll. NFC
davemgreen Nov 17, 2019
03fce6b
[InstCombine] Canonicalize sadd.with.overflow with clamp to sadd.sat
davemgreen Nov 17, 2019
08390c5
[InstCombine] Canonicalize ssub.with.overflow with clamp to ssub.sat
davemgreen Nov 17, 2019
f5870b0
[SimplifyCFG] add tests for possible FP speculative select; NFC
rotateright Nov 17, 2019
23f7360
[SimplifyCFG] add fast-math-flags to tests for better coverage; NFC
rotateright Nov 17, 2019
ebf9bf2
[SimplifyCFG] propagate fast-math-flags (FMF) from phi to select
rotateright Nov 17, 2019
a516fba
[Attributor] Use nofree argument attribute for heap-to-stack conversion
Nov 17, 2019
28c1838
[ConstantFold] Add some tests for binops with constants and undefs.
fhahn Nov 13, 2019
8eeabba
[ConstantFold] Handle identity folds at top of ConstantFoldBinaryInst
fhahn Nov 17, 2019
d4ba11a
[LegalizeTypes] Merge ExpandIntRes_LLROUND and ExpandIntRes_LLRINT in…
topperc Nov 17, 2019
9b515b6
[LegalizeTypes] Remove PromoteFloat support form ExpandIntRes_LLROUND…
topperc Nov 17, 2019
1b0efe2
[LegalizeTypes] When expanding the integer result of LLROUND/LLRINT, …
topperc Nov 17, 2019
5d67d81
[InstCombine] prevent crashing/assert on shift constant expression (P…
rotateright Nov 17, 2019
b11386f
Make it possible to redirect not only errs() but also outs()
rui314 Nov 15, 2019
a937a58
llvm/ObjCARC: Use continue to reduce some nesting, NFC
dexonsmith Nov 18, 2019
5864cb3
[docs] Fix broken links in Kaleidoscope chapter 3
modocache Nov 18, 2019
a0337d2
[PowerPC] extend PPCPreIncPrep Pass for ds/dq form
Nov 18, 2019
af43528
[LegalizeTypes][X86] Add support for expanding the result type of STR…
topperc Nov 18, 2019
783cb86
llvm/ObjCARC: Split OptimizeIndividualCallImpl out of OptimizeIndivid…
dexonsmith Nov 18, 2019
f82dba0
Rename __is_foo_iterator traits to reflect their Cpp17 nature.
EricWF Nov 18, 2019
909d7bf
Fix Windows buildbots
rui314 Nov 18, 2019
5a56d2a
[LegalizeTypes] Remove unnecessary conversion from EVT to MVT to MVT:…
topperc Nov 18, 2019
bfbbf0a
[LegalizeTypes] Remove SoftenFloat handling from ExpandIntRes_LLROUND…
topperc Nov 18, 2019
832dd0a
Merge from 'sycl' to 'sycl-web' (#1)
Nov 18, 2019
816ff98
[Sparc] Fix "Cannot select" error for AtomicFence on 32-bit V9
jrtc27 Nov 18, 2019
c0f6ad7
DWARF location lists: Add section index dumping
labath Nov 14, 2019
2d739f9
[ARM] Allocatable Global Register Variables for ARM
Nov 14, 2019
e24ca96
Merge from 'master' to 'sycl-web' (#16)
bader Nov 18, 2019
9259d27
Merge from 'master' to 'sycl-web' (#54)
bader Nov 18, 2019
36ff05f
Merge from 'sycl' to 'sycl-web' (#1)
Nov 21, 2019
160076d
SPIRV translator pulldown for 90a03aa9.
vladimirlaz Nov 20, 2019
1bd4f52
Re-commit "DWARF location lists: Add section index dumping"
labath Nov 14, 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 @@ -89,6 +89,9 @@ def main():
database = json.load(open(os.path.join(build_path, db_path)))
files = [entry['file'] for entry in database]

# Filter out .rc files on Windows. CMake includes them for some reason.
files = [f for f in files if not f.endswith('.rc')]

max_task = args.j
if max_task == 0:
max_task = multiprocessing.cpu_count()
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
//===--- BadSignalToKillThreadCheck.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 "BadSignalToKillThreadCheck.h"
#include "clang/AST/ASTContext.h"
#include "clang/ASTMatchers/ASTMatchFinder.h"

using namespace clang::ast_matchers;

namespace clang {
namespace tidy {
namespace bugprone {

void BadSignalToKillThreadCheck::registerMatchers(MatchFinder *Finder) {
Finder->addMatcher(
callExpr(allOf(callee(functionDecl(hasName("::pthread_kill"))),
argumentCountIs(2)),
hasArgument(1, integerLiteral().bind("integer-literal")))
.bind("thread-kill"),
this);
}

static Preprocessor *PP;

void BadSignalToKillThreadCheck::check(const MatchFinder::MatchResult &Result) {
const auto IsSigterm = [](const auto &KeyValue) -> bool {
return KeyValue.first->getName() == "SIGTERM";
};
const auto TryExpandAsInteger =
[](Preprocessor::macro_iterator It) -> Optional<unsigned> {
if (It == PP->macro_end())
return llvm::None;
const MacroInfo *MI = PP->getMacroInfo(It->first);
const Token &T = MI->tokens().back();
StringRef ValueStr = StringRef(T.getLiteralData(), T.getLength());

llvm::APInt IntValue;
constexpr unsigned AutoSenseRadix = 0;
if (ValueStr.getAsInteger(AutoSenseRadix, IntValue))
return llvm::None;
return IntValue.getZExtValue();
};

const auto SigtermMacro = llvm::find_if(PP->macros(), IsSigterm);

if (!SigtermValue && !(SigtermValue = TryExpandAsInteger(SigtermMacro)))
return;

const auto *MatchedExpr = Result.Nodes.getNodeAs<Expr>("thread-kill");
const auto *MatchedIntLiteral =
Result.Nodes.getNodeAs<IntegerLiteral>("integer-literal");
if (MatchedIntLiteral->getValue() == *SigtermValue) {
diag(MatchedExpr->getBeginLoc(),
"thread should not be terminated by raising the 'SIGTERM' signal");
}
}

void BadSignalToKillThreadCheck::registerPPCallbacks(
const SourceManager &SM, Preprocessor *pp, Preprocessor *ModuleExpanderPP) {
PP = pp;
}

} // namespace bugprone
} // namespace tidy
} // namespace clang
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
//===--- BadSignalToKillThreadCheck.h - clang-tidy --------------*- C++ -*-===//
//
// 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
//
//===----------------------------------------------------------------------===//

#ifndef LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_BUGPRONE_BADSIGNALTOKILLTHREADCHECK_H
#define LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_BUGPRONE_BADSIGNALTOKILLTHREADCHECK_H

#include "../ClangTidyCheck.h"

namespace clang {
namespace tidy {
namespace bugprone {

/// Finds ``pthread_kill`` function calls when thread is terminated by
/// ``SIGTERM`` signal.
/// For the user-facing documentation see:
/// http://clang.llvm.org/extra/clang-tidy/checks/bugprone-bad-signal-to-kill-thread.html
class BadSignalToKillThreadCheck : public ClangTidyCheck {
public:
BadSignalToKillThreadCheck(StringRef Name, ClangTidyContext *Context)
: ClangTidyCheck(Name, Context) {}
void registerMatchers(ast_matchers::MatchFinder *Finder) override;
void check(const ast_matchers::MatchFinder::MatchResult &Result) override;
void registerPPCallbacks(const SourceManager &SM, Preprocessor *PP,
Preprocessor *ModuleExpanderPP) override;
Optional<unsigned> SigtermValue;
};

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

#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_BUGPRONE_BADSIGNALTOKILLTHREADCHECK_H
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
#include "../cppcoreguidelines/NarrowingConversionsCheck.h"
#include "ArgumentCommentCheck.h"
#include "AssertSideEffectCheck.h"
#include "BadSignalToKillThreadCheck.h"
#include "BoolPointerImplicitConversionCheck.h"
#include "BranchCloneCheck.h"
#include "CopyConstructorInitCheck.h"
Expand Down Expand Up @@ -68,6 +69,8 @@ class BugproneModule : public ClangTidyModule {
"bugprone-argument-comment");
CheckFactories.registerCheck<AssertSideEffectCheck>(
"bugprone-assert-side-effect");
CheckFactories.registerCheck<BadSignalToKillThreadCheck>(
"bugprone-bad-signal-to-kill-thread");
CheckFactories.registerCheck<BoolPointerImplicitConversionCheck>(
"bugprone-bool-pointer-implicit-conversion");
CheckFactories.registerCheck<BranchCloneCheck>(
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 @@ -3,6 +3,7 @@ set(LLVM_LINK_COMPONENTS support)
add_clang_library(clangTidyBugproneModule
ArgumentCommentCheck.cpp
AssertSideEffectCheck.cpp
BadSignalToKillThreadCheck.cpp
BoolPointerImplicitConversionCheck.cpp
BranchCloneCheck.cpp
BugproneTidyModule.cpp
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
//===----------------------------------------------------------------------===//

#include "MacroRepeatedSideEffectsCheck.h"
#include "clang/Basic/Builtins.h"
#include "clang/Frontend/CompilerInstance.h"
#include "clang/Lex/MacroArgs.h"
#include "clang/Lex/PPCallbacks.h"
Expand Down
Empty file.
Empty file.
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 @@ -10,6 +10,7 @@
#include "../ClangTidyModule.h"
#include "../ClangTidyModuleRegistry.h"
#include "../bugprone/UnhandledSelfAssignmentCheck.h"
#include "../bugprone/BadSignalToKillThreadCheck.h"
#include "../google/UnnamedNamespaceInHeaderCheck.h"
#include "../misc/NewDeleteOverloadsCheck.h"
#include "../misc/NonCopyableObjects.h"
Expand Down Expand Up @@ -82,6 +83,9 @@ class CERTModule : public ClangTidyModule {
CheckFactories.registerCheck<LimitedRandomnessCheck>("cert-msc30-c");
CheckFactories.registerCheck<ProperlySeededRandomGeneratorCheck>(
"cert-msc32-c");
// POS
CheckFactories.registerCheck<bugprone::BadSignalToKillThreadCheck>(
"cert-pos44-c");
}

ClangTidyOptions getModuleOptions() override {
Expand Down
12 changes: 8 additions & 4 deletions clang-tools-extra/clang-tidy/modernize/UseOverrideCheck.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,13 @@ namespace modernize {
UseOverrideCheck::UseOverrideCheck(StringRef Name, ClangTidyContext *Context)
: ClangTidyCheck(Name, Context),
IgnoreDestructors(Options.get("IgnoreDestructors", false)),
AllowOverrideAndFinal(Options.get("AllowOverrideAndFinal", false)),
OverrideSpelling(Options.get("OverrideSpelling", "override")),
FinalSpelling(Options.get("FinalSpelling", "final")) {}

void UseOverrideCheck::storeOptions(ClangTidyOptions::OptionMap &Opts) {
Options.store(Opts, "IgnoreDestructors", IgnoreDestructors);
Options.store(Opts, "AllowOverrideAndFinal", AllowOverrideAndFinal);
Options.store(Opts, "OverrideSpelling", OverrideSpelling);
Options.store(Opts, "FinalSpelling", FinalSpelling);
}
Expand Down Expand Up @@ -103,7 +105,8 @@ void UseOverrideCheck::check(const MatchFinder::MatchResult &Result) {
bool OnlyVirtualSpecified = HasVirtual && !HasOverride && !HasFinal;
unsigned KeywordCount = HasVirtual + HasOverride + HasFinal;

if (!OnlyVirtualSpecified && KeywordCount == 1)
if ((!OnlyVirtualSpecified && KeywordCount == 1) ||
(!HasVirtual && HasOverride && HasFinal && AllowOverrideAndFinal))
return; // Nothing to do.

std::string Message;
Expand All @@ -113,8 +116,9 @@ void UseOverrideCheck::check(const MatchFinder::MatchResult &Result) {
Message = "annotate this function with '%0' or (rarely) '%1'";
} else {
StringRef Redundant =
HasVirtual ? (HasOverride && HasFinal ? "'virtual' and '%0' are"
: "'virtual' is")
HasVirtual ? (HasOverride && HasFinal && !AllowOverrideAndFinal
? "'virtual' and '%0' are"
: "'virtual' is")
: "'%0' is";
StringRef Correct = HasFinal ? "'%1'" : "'%0'";

Expand Down Expand Up @@ -211,7 +215,7 @@ void UseOverrideCheck::check(const MatchFinder::MatchResult &Result) {
Diag << FixItHint::CreateInsertion(InsertLoc, ReplacementText);
}

if (HasFinal && HasOverride) {
if (HasFinal && HasOverride && !AllowOverrideAndFinal) {
SourceLocation OverrideLoc = Method->getAttr<OverrideAttr>()->getLocation();
Diag << FixItHint::CreateRemoval(
CharSourceRange::getTokenRange(OverrideLoc, OverrideLoc));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ class UseOverrideCheck : public ClangTidyCheck {

private:
const bool IgnoreDestructors;
const bool AllowOverrideAndFinal;
const std::string OverrideSpelling;
const std::string FinalSpelling;
};
Expand Down
42 changes: 31 additions & 11 deletions clang-tools-extra/clang-tidy/modernize/UseUsingCheck.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,25 +39,46 @@ static bool CheckRemoval(SourceManager &SM, SourceLocation StartLoc,
File.begin(), TokenBegin, File.end());

Token Tok;
int ParenLevel = 0;
int NestingLevel = 0; // Parens, braces, and square brackets
int AngleBracketLevel = 0;
bool FoundTypedef = false;

while (!DeclLexer.LexFromRawLexer(Tok) && !Tok.is(tok::semi)) {
switch (Tok.getKind()) {
case tok::l_brace:
case tok::r_brace:
// This might be the `typedef struct {...} T;` case.
return false;
if (NestingLevel == 0 && AngleBracketLevel == 0) {
// At top level, this might be the `typedef struct {...} T;` case.
// Inside parens, square brackets, or angle brackets it's not.
return false;
}
++NestingLevel;
break;
case tok::l_paren:
ParenLevel++;
case tok::l_square:
++NestingLevel;
break;
case tok::r_brace:
case tok::r_paren:
ParenLevel--;
case tok::r_square:
--NestingLevel;
break;
case tok::less:
// If not nested in paren/brace/square bracket, treat as opening angle bracket.
if (NestingLevel == 0)
++AngleBracketLevel;
break;
case tok::greater:
// Per C++ 17 Draft N4659, Section 17.2/3
// https://timsong-cpp.github.io/cppwp/n4659/temp.names#3:
// "When parsing a template-argument-list, the first non-nested > is
// taken as the ending delimiter rather than a greater-than operator."
// If not nested in paren/brace/square bracket, treat as closing angle bracket.
if (NestingLevel == 0)
--AngleBracketLevel;
break;
case tok::comma:
if (ParenLevel == 0) {
// If there is comma and we are not between open parenthesis then it is
// two or more declarations in this chain.
if (NestingLevel == 0 && AngleBracketLevel == 0) {
// If there is a non-nested comma we have two or more declarations in this chain.
return false;
}
break;
Expand Down Expand Up @@ -88,8 +109,7 @@ void UseUsingCheck::check(const MatchFinder::MatchResult &Result) {
if (StartLoc.isMacroID() && IgnoreMacros)
return;

auto Diag =
diag(StartLoc, "use 'using' instead of 'typedef'");
auto Diag = diag(StartLoc, "use 'using' instead of 'typedef'");

// do not fix if there is macro or array
if (MatchedDecl->getUnderlyingType()->isArrayType() || StartLoc.isMacroID())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

#include "RedundantStringInitCheck.h"
#include "../utils/Matchers.h"
#include "../utils/OptionsUtils.h"
#include "clang/ASTMatchers/ASTMatchers.h"

using namespace clang::ast_matchers;
Expand All @@ -17,19 +18,43 @@ namespace clang {
namespace tidy {
namespace readability {

const char DefaultStringNames[] = "::std::basic_string";

RedundantStringInitCheck::RedundantStringInitCheck(StringRef Name,
ClangTidyContext *Context)
: ClangTidyCheck(Name, Context),
StringNames(utils::options::parseStringList(
Options.get("StringNames", DefaultStringNames))) {}

void RedundantStringInitCheck::storeOptions(ClangTidyOptions::OptionMap &Opts) {
Options.store(Opts, "StringNames", DefaultStringNames);
}

void RedundantStringInitCheck::registerMatchers(MatchFinder *Finder) {
if (!getLangOpts().CPlusPlus)
return;
const auto hasStringTypeName = hasAnyName(
SmallVector<StringRef, 3>(StringNames.begin(), StringNames.end()));

// Version of StringNames with namespaces removed
std::vector<std::string> stringNamesNoNamespace;
for (const std::string &name : StringNames) {
std::string::size_type colonPos = name.rfind(':');
stringNamesNoNamespace.push_back(
name.substr(colonPos == std::string::npos ? 0 : colonPos + 1));
}
const auto hasStringCtorName = hasAnyName(SmallVector<StringRef, 3>(
stringNamesNoNamespace.begin(), stringNamesNoNamespace.end()));

// Match string constructor.
const auto StringConstructorExpr = expr(anyOf(
cxxConstructExpr(argumentCountIs(1),
hasDeclaration(cxxMethodDecl(hasName("basic_string")))),
// If present, the second argument is the alloc object which must not
// be present explicitly.
cxxConstructExpr(argumentCountIs(2),
hasDeclaration(cxxMethodDecl(hasName("basic_string"))),
hasArgument(1, cxxDefaultArgExpr()))));
const auto StringConstructorExpr = expr(
anyOf(cxxConstructExpr(argumentCountIs(1),
hasDeclaration(cxxMethodDecl(hasStringCtorName))),
// If present, the second argument is the alloc object which must
// not be present explicitly.
cxxConstructExpr(argumentCountIs(2),
hasDeclaration(cxxMethodDecl(hasStringCtorName)),
hasArgument(1, cxxDefaultArgExpr()))));

// Match a string constructor expression with an empty string literal.
const auto EmptyStringCtorExpr = cxxConstructExpr(
Expand All @@ -46,23 +71,23 @@ void RedundantStringInitCheck::registerMatchers(MatchFinder *Finder) {
// string bar("");
Finder->addMatcher(
namedDecl(
varDecl(hasType(hasUnqualifiedDesugaredType(recordType(
hasDeclaration(cxxRecordDecl(hasName("basic_string")))))),
hasInitializer(expr(ignoringImplicit(anyOf(
EmptyStringCtorExpr,
EmptyStringCtorExprWithTemporaries)))
.bind("expr"))),
unless(parmVarDecl()))
.bind("decl"),
varDecl(
hasType(hasUnqualifiedDesugaredType(recordType(
hasDeclaration(cxxRecordDecl(hasStringTypeName))))),
hasInitializer(expr(ignoringImplicit(anyOf(
EmptyStringCtorExpr, EmptyStringCtorExprWithTemporaries)))))
.bind("vardecl"),
unless(parmVarDecl())),
this);
}

void RedundantStringInitCheck::check(const MatchFinder::MatchResult &Result) {
const auto *CtorExpr = Result.Nodes.getNodeAs<Expr>("expr");
const auto *Decl = Result.Nodes.getNodeAs<NamedDecl>("decl");
diag(CtorExpr->getExprLoc(), "redundant string initialization")
<< FixItHint::CreateReplacement(CtorExpr->getSourceRange(),
Decl->getName());
const auto *VDecl = Result.Nodes.getNodeAs<VarDecl>("vardecl");
// VarDecl's getSourceRange() spans 'string foo = ""' or 'string bar("")'.
// So start at getLocation() to span just 'foo = ""' or 'bar("")'.
SourceRange ReplaceRange(VDecl->getLocation(), VDecl->getEndLoc());
diag(VDecl->getLocation(), "redundant string initialization")
<< FixItHint::CreateReplacement(ReplaceRange, VDecl->getName());
}

} // namespace readability
Expand Down
Loading