LLVM/llvm 356928cfe/trunk/lib/Format TokenAnnotator.cpp, cfe/trunk/unittests/Format FormatTestObjC.cpp

[clang-format] Refine structured binding detection

Revision r356575 had the unfortunate consequence that now clang-format never
detects an ObjC call expression after `&&`.

This patch tries harder to distinguish between C++17 structured bindings and
ObjC call expressions and adds a few regression tests.

Reviewers: klimek

Reviewed By: klimek

Subscribers: cfe-commits

Tags: #clang

Differential Revision: https://reviews.llvm.org/D59774

LLVM/llvm 356927lldb/trunk/source/Utility Args.cpp, lldb/trunk/unittests/Utility ArgsTest.cpp

[Args] Handle backticks to prevent crash.

Currently LLDB crashes when autocompleting a command that ends with a
backtick because the quote character wasn't handled. This fixes that and
adds a unit test for this function.

Differential revision: https://reviews.llvm.org/D59779

LLVM/llvm 356926llvm/trunk/lib/CodeGen MachineScheduler.cpp, llvm/trunk/test/CodeGen/AMDGPU sched-assert-onlydbg-value-empty-region.mir

MISched: Don't schedule regions with 0 instructions

I think this is correct, but may not necessarily be the correct fix
for the assertion I'm really trying to solve. If a scheduling region
was found that only has dbg_value instructions, the RegPressure
tracker would end up in an inconsistent state because it would skip
over any debug instructions and point to an instruction outside of the
scheduling region. It may still be possible for this to happen if
there are some real schedulable instructions between dbg_values, but I
haven't managed to break this.

The testcase is extremely sensitive and I'm not sure how to make it
more resistent to future scheduler changes that would avoid stressing
this situation.

LLVM/llvm 356925cfe/trunk/lib/Sema SemaDecl.cpp SemaExpr.cpp

[Sema][NFCI] Don't allocate storage for the various CorrectionCandidateCallback unless we 
are going to do some typo correction

The various CorrectionCandidateCallbacks are currently heap-allocated
unconditionally. This was needed because of delayed typo correction.
However these allocations represent currently 15.4% of all allocations
(number of allocations) when parsing all of Boost (!), mostly because
of ParseCastExpression, ParseStatementOrDeclarationAfterAttrtibutes
and isCXXDeclarationSpecifier. Note that all of these callback objects
are small. Let's not do this.

Instead initially allocate the callback on the stack, and only do a
heap allocation if we are going to do some typo correction. Do this by:

1. Adding a clone function to each callback, which will do a polymorphic
   clone of the callback. This clone function is required to be implemented
   by every callback (of which there is a fair amount). Make sure this is
   the case by making it pure virtual.

2. Use this clone function when we are going to try to correct a typo.

This additionally cut the time of -fsyntax-only on all of Boost by 0.5%
(not that much, but still something). No functional changes intended.

Differential Revision: https://reviews.llvm.org/D58827

    [2 lines not shown]

LLVM/llvm 356924llvm/trunk/utils/release merge-request.sh

merge-request.sh: Update 8.0 metabug for 8.0.1

LLVM/llvm 356923clang-tools-extra/trunk/docs ReleaseNotes.rst

Attempt to fix sphinx bot after r356897

LLVM/llvm 356922llvm/trunk/lib/Target/AMDGPU SIWholeQuadMode.cpp

AMDGPU: Preserve LiveIntervals in WQM

This seems to already be done, but wasn't marked.

LLVM/llvm 356921pstl/trunk/test utils.h

[pstl] Make sure unit tests exit with a non-zero error code when they fail

The previous test system would only print errors to stderr, however CMake
(and lit) detect failure via the program returning a non-zero error code.
So all the tests would always pretend they passed.
+15-161 files

LLVM/llvm 356920cfe/trunk CMakeLists.txt

[clang] Remove cmake warning message (NFC)

Recognize an empty string for CLANG_DEFAULT_UNWINDLIB as a valid option.

LLVM/llvm 356919llvm/trunk/test/tools/llvm-objcopy/ELF preserve-segment-contents.test preserve-segment-contents-ehdr-phdrs.test, llvm/trunk/tools/llvm-objcopy/ELF Object.cpp Object.h

[llvm-objcopy]Preserve data in segments not covered by sections

llvm-objcopy previously knew nothing about data in segments that wasn't
covered by section headers, meaning that it wrote zeroes instead of what
was there. As it is possible for this data to be useful to the loader,
this patch causes llvm-objcopy to start preserving this data. Data in
sections that are explicitly removed continues to be written as zeroes.

This fixes https://bugs.llvm.org/show_bug.cgi?id=41005.

Reviewed by: jakehehrlich, rupprecht

Differential Revision: https://reviews.llvm.org/D59483

LLVM/llvm 356918libcxx/trunk/include optional, libcxx/trunk/test/std/utilities/optional/optional.object/optional.object.ctor ctor.fail.cpp

Cleaup of requirements for optional. While researching LWG3196, I realized that optional 
did not reject 'const in_place_t' like it should. Added a test as well, and a check for 
arrays (which were already disallowed, but now we get a better error message). Should not 
affect anyone's code.

LLVM/llvm 356917pstl/trunk/include/pstl/internal algorithm_impl.h

[PSTL][NFC] Add missing #include

LLVM/llvm 356916clang-tools-extra/trunk/clangd/clients/clangd-vscode/src extension.ts

[clangd] Add .cu files to VSCode extension

clangd should be able to handle those with a proper compilation
database. However, users using 'nvcc' might start seeing spurious errors
in '.cu' files after this change.

My plan is to land and release this, but be ready to revert in
case of negative user feedback.

Reviewers: hokein

Reviewed By: hokein

Subscribers: ioeric, MaskRay, jkorous, arphaman, kadircet, jdoerfert, cfe-commits

Tags: #clang

Differential Revision: https://reviews.llvm.org/D59759

LLVM/llvm 356915llvm/trunk/test/Transforms/SLPVectorizer/X86 alternate-int.ll

[SLPVectorizer] Update file missed in rL356913

Differential Revision: https://reviews.llvm.org/D59738

LLVM/llvm 356914llvm/trunk/test/CodeGen/X86 vector-zext.ll

[x86] add tests for vector zext; NFC

The AVX1 lowering is poor.

LLVM/llvm 356913llvm/trunk/test/Transforms/LoopVectorize/X86 metadata-enable.ll, llvm/trunk/test/Transforms/SLPVectorizer/AArch64 getelementptr.ll

[SLPVectorizer] reorderInputsAccordingToOpcode - remove non-Instruction canonicalization

Remove attempts to commute non-Instructions to the LHS - the codegen changes appear to 
rely on chance more than anything else and also have a tendency to fight existing 
instcombine canonicalization which moves constants to the RHS of commutable binary ops.

This is prep work towards:
(a) reusing reorderInputsAccordingToOpcode for alt-shuffles and removing the similar 
(b) improving reordering to optimized cases with commutable and non-commutable 
instructions to still find splat/consecutive ops.

Differential Revision: https://reviews.llvm.org/D59738

LLVM/llvm 356912cfe/trunk/lib/Format TokenAnnotator.cpp, cfe/trunk/unittests/Format FormatTestProto.cpp

Revert "[clang-format] Keep protobuf "package" statement on one line"

This reverts commit r356835. This patch causes a regression, see the
test below:

verifyFormat("// Detached comment\n\n"
             "// Leading comment\n"
             "syntax = \"proto2\"; // trailing comment\n\n"
             "// in foo.bar package\n"
             "package foo.bar; // foo.bar package\n");

LLVM/llvm 356911lldb/trunk/lit/Driver TestRepl.test, lldb/trunk/tools/driver Driver.cpp

Update the lldb driver to support the -O and -S options when passing --repl

At the moment when --repl is passed to lldb it silently ignores any
commands passed via the options below:

--one-line-before-file <command>
                     Tells the debugger to execute this one-line lldb command before any 
file provided on the command line has been loaded.
--one-line <command>
                     Tells the debugger to execute this one-line lldb command after any 
file provided on the command line has been loaded.
--source-before-file <file>
                     Tells the debugger to read in and execute the lldb commands in the 
given file, before any file has been loaded.
--source <file>
                     Tells the debugger to read in and execute the lldb commands in the 
given file, after any file has been loaded.
-O <value>           Alias for --one-line-before-file
-o <value>           Alias for --one-line
-S <value>           Alias for --source-before-file
-s <value>           Alias for --source

The -O and -S options are quite useful when writing tests for the REPL
though, e.g. to change settings prior to entering REPL mode. This
patch updates the driver to still respect the commands supplied via -O

    [8 lines not shown]

LLVM/llvm 356910lldb/trunk/examples/customization/bin-utils binutils.py, lldb/trunk/examples/python mach_o.py

Python 2/3 compat: StringIO

Differential Revision: https://reviews.llvm.org/D59582

LLVM/llvm 356909lldb/trunk/examples/python lldbtk.py

Python 2/3 compat: tkinter

Differential Revision: https://reviews.llvm.org/D59586

LLVM/llvm 356908lldb/trunk/examples/summaries/cocoa CFArray.py CFBag.py

Python 2/3 compat: str vs basestring

Differential Revision: https://reviews.llvm.org/D59589

LLVM/llvm 356907llvm/trunk/tools/llvm-config llvm-config.cpp

Revert 356905

Commited from wrong directory...

LLVM/llvm 356906lldb/trunk/utils/lui lui.py sandbox.py

Python 2/3 compat: queue vs Queue

Differential Revision: https://reviews.llvm.org/D59590

LLVM/llvm 356905llvm/trunk/tools/llvm-config llvm-config.cpp

Python 2/3 compat: queue vs Queue

Differential Revision: https://reviews.llvm.org/D59590

LLVM/llvm 356904lldb/trunk/examples/summaries/cocoa CFString.py

Python 2/3 compat: unichr vs chr

LLVM/llvm 356903libcxx/trunk CMakeLists.txt, libcxx/trunk/lib CMakeLists.txt

[libc++][CMake] Allow merging libc++abi.a into libc++ even on Apple platforms

I can't see a good reason to disallow this, even though it isn't the
standard way we build libc++ for Apple platforms.

Making this work on Apple platforms requires using different flags for
--whole-archive and removing the -D flag when running `ar` to merge
archives because that flag isn't supported by the `ar` shipped on Apple
platforms. This shouldn't be an issue since the -D option appears to be
enabled by default in GNU `ar`.

Reviewers: phosek, EricWF, serge-sans-paille

Subscribers: mgorny, christof, jkorous, dexonsmith, libcxx-commits

Differential Revision: https://reviews.llvm.org/D59513

LLVM/llvm 356902clang-tools-extra/trunk/clang-tidy add_new_check.py

[clang-tidy] ClangTidy.h -> ClangTidyCheck.h

LLVM/llvm 356901llvm/trunk/lib/ObjectYAML MinidumpYAML.cpp

MinidumpYAML.cpp: Fix some code standard violations missed during review

functions should begin with lower case letters. NFC.

LLVM/llvm 356900pstl/trunk CMakeLists.txt

[pstl][CMake] Move include() closer to its point of use

LLVM/llvm 356899llvm/trunk/test/CodeGen/X86 regalloc-copy-hints.mir

[RegAlloc]  Simplify MIR test

Remove the IR part from test/CodeGen/X86/regalloc-copy-hints.mir (added by

To make the test remain functional, the parts of the MBB names referring to
BB names have been removed, as well as all machine memory operands.

LLVM/llvm 356898lldb/trunk/lit/Minidump dump-all.test fb-dump.test, lldb/trunk/source/Plugins/Process/minidump MinidumpTypes.h MinidumpParser.cpp

Minidump: Use minidump constants defined in llvm

This patch begins the process of migrating the "minidump" plugin to the
minidump parser in llvm. The llvm parser is not fully finished yet, but
even now, a lot of things can be switched over. The gradual migration
process will allow us to easier detect if things break than doing a big
one-step migration. Doing it early will allow us to make sure that the
llvm parser fits the use case that we need in lldb.

In this patch I start with the various minidump constants, which have
their llvm equivalent. It doesn't contain any functional changes. The
diff just reflects the different naming of things in llvm.

LLVM/llvm 356897clang-tools-extra/trunk/clang-include-fixer IncludeFixer.cpp, clang-tools-extra/trunk/clang-include-fixer/find-all-symbols STLPostfixHeaderMap.cpp

Rename directory housing clang-include-fixer to be eponymous

Makes the name of this directory consistent with the names of the other
directories in clang-tools-extra.

Similar to r356254. No intended behavior change.

Differential Revision: https://reviews.llvm.org/D59750

LLVM/llvm 356896lldb/trunk/packages/Python/lldbsuite/test/functionalities/postmortem/minidump-new TestMiniDumpUUID.py linux-arm-uuids-elf-build-id-20.dmp, lldb/trunk/source/Plugins/Process/minidump MinidumpParser.cpp MinidumpTypes.cpp

Reapply minidump changes reverted in r356806

The changes were reverted due to ubsan errors (unaligned accesses). Here
I fix those errors by first copying the data into aligned storage.
Besides fixing alignment issues, this also fixes reading of minidump
strings on big-endian systems.

LLVM/llvm 356895llvm/trunk/lib/ExecutionEngine/IntelJITEvents IntelJITEventListener.cpp

[DebugInfo] IntelJitEventListener follow up for "add SectionedAddress ..."

Following r354972 the Intel JIT Listener would not report line table
information because the section indices did not match. There was
a similar issue with the PerfJitEventListener. This change performs
the section index lookup when building the object address used to
query the line table information.

Differential Revision: https://reviews.llvm.org/D59490

LLVM/llvm 356894clang-tools-extra/trunk/clangd StdSymbolMap.inc, clang-tools-extra/trunk/clangd/include-mapping gen_std.py

[clangd] Add std subnamespace symbols to the symbol map.

Reviewers: ioeric, serge-sans-paille

Reviewed By: ioeric

Subscribers: ilya-biryukov, MaskRay, jkorous, arphaman, kadircet, jdoerfert, cfe-commits

Tags: #clang

Differential Revision: https://reviews.llvm.org/D59364

LLVM/llvm 356893clang-tools-extra/trunk/pp-trace PPTrace.cpp

[pp-trace] Use ClangTool in pp-trace, NFC

This patch partially reverts the commit rL356849.

Unfortunately, tooling::createExecutorFromCommandLineArgs doesn't
corperate well with our internal infrastructure, which leads failing
lit tests. We use ClangTool at the moment, until we find a better
solution to smooth it.

Reviewers: ioeric

Reviewed By: ioeric

Subscribers: jdoerfert, cfe-commits

Tags: #clang

Differential Revision: https://reviews.llvm.org/D59764

LLVM/llvm 356892clang-tools-extra/trunk/clang-tidy/bugprone UndefinedMemoryManipulationCheck.h UndelegatedConstructorCheck.h

[clang-tidy] Switch checks to #include "ClangTidyCheck.h"

LLVM/llvm 356891pstl/trunk/include/pstl/internal glue_algorithm_impl.h

[pstl] Call the right overload of std::equal with an execution policy

Thanks to Mikhail Dvorskiy for the patch.

Differential Revision: https://reviews.llvm.org/D59705

LLVM/llvm 356890clang-tools-extra/trunk/clang-tidy ClangTidyCheck.h ClangTidy.h, clang-tools-extra/trunk/docs/clang-tidy Contributing.rst

[clang-tidy] Separate the check-facing interface

Move ClangTidyCheck to a separate header/.cpp
Switch checks to #include "ClangTidyCheck.h"
Mention ClangTidyCheck.h in the docs

Reviewers: hokein, gribozavr, aaron.ballman

Reviewed By: hokein

Subscribers: mgorny, javed.absar, xazax.hun, arphaman, jdoerfert, llvm-commits, 

Tags: #clang, #llvm

Differential Revision: https://reviews.llvm.org/D59714

LLVM/llvm 356889llvm/trunk/tools/llvm-objcopy/ELF ELFObjcopy.cpp

[llvm-objcopy] - Refactor the code. NFC.

The idea of the patch is about to move out the code to a new
helper static functions (to reduce the size of 'handleArgs' and to
isolate the parts of it's logic).

Differential revision: https://reviews.llvm.org/D59762

LLVM/llvm 356888cfe/trunk/include/clang/Basic TokenKinds.def, cfe/trunk/lib/Parse ParseDeclCXX.cpp ParseDecl.cpp

[OpenCL] Allow addr space spelling without __ prefix in C++.

For backwards compatibility we allow alternative spelling of address
spaces - 'private', 'local', 'global', 'constant', 'generic'.

In order to accept 'private' correctly, parsing has been changed to
understand different use cases - access specifier vs address space.

Fixes PR40707 and PR41011!

Differential Revision: https://reviews.llvm.org/D59603

LLVM/llvm 356887clang-tools-extra/trunk/pp-trace PPTrace.cpp

[pp-trace] Try fixing MSVC C2248 after rCTE356849

LLVM/llvm 356886llvm/trunk/lib/Target/Mips MipsInstructionSelector.cpp, llvm/trunk/test/CodeGen/Mips/GlobalISel/instruction-select float_args.mir

[MIPS GlobalISel] Select copy for arguments from FPRBRegBank

Move selectCopy into MipsInstructionSelector class.
Select copy for arguments from FPRBRegBank for MIPS32.

Differential Revision: https://reviews.llvm.org/D59644

LLVM/llvm 356885llvm/trunk/utils/gn README.rst

gn build: Clean up README.rst a bit

- Make introduction a bit shorter
- Add a `git clone` step to Quick start
- Put command to run first in each of the Quick start steps
- Use ``code`` instead of `label` throughout; this is .rst not .md

Differential Revision: https://reviews.llvm.org/D59600

LLVM/llvm 356884llvm/trunk/utils/gn get.py

gn build: Let get.py keep zip file in memory instead of using a temp file

The zip is small, and it's a bit less code this way.
No intended behavior change.

Differential Revision: https://reviews.llvm.org/D59677

LLVM/llvm 356883llvm/trunk/lib/Target/Mips MipsRegisterBankInfo.cpp MipsRegisterBanks.td, llvm/trunk/test/CodeGen/Mips/GlobalISel/regbankselect float_args.mir

[MIPS GlobalISel] Add floating point register bank

Add floating point register bank for MIPS32.
Implement getRegBankFromRegClass for float register classes.

Differential Revision: https://reviews.llvm.org/D59643

LLVM/llvm 356882llvm/trunk/lib/Target/Mips MipsCallLowering.cpp MipsCallLowering.h, llvm/trunk/test/CodeGen/Mips/GlobalISel/irtranslator float_args.ll

[MIPS GlobalISel] Lower float and double arguments in registers

Lower float and double arguments in registers for MIPS32.
When float/double argument is passed through gpr registers
select appropriate move instruction.

Differential Revision: https://reviews.llvm.org/D59642

LLVM/llvm 356881llvm/trunk/test/tools/llvm-readobj elf-versioninfo.test, llvm/trunk/test/tools/yaml2obj verdef-section.yaml verneed-section.yaml

[llvm-readobj] Separate `Symbol Version` dumpers into `LLVM style` and `GNU style`

Currently, llvm-readobj can dump symbol version sections only in LLVM style. In this 
patch, I would like to separate these dumpers into GNU style and 
LLVM style for future implementation.

Reviewers: grimar, jhenderson, mattd, rupprecht

Reviewed By: jhenderson, rupprecht

Subscribers: ormris, dyung, RKSimon, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D59186

LLVM/llvm 356880clang-tools-extra/trunk/clangd ClangdLSPServer.cpp ClangdLSPServer.h, clang-tools-extra/trunk/test/clangd diagnostics.test

[clangd] Send empty diagnostics when a file is closed

The LSP clients cannot know clangd will not send diagnostic updates
for closed files, so we send them an empty list of diagnostics to
avoid showing stale diagnostics for closed files in the UI, e.g. in the
"Problems" pane of VSCode.

Fixes PR41217.

Reviewers: hokein

Reviewed By: hokein

Subscribers: ioeric, MaskRay, jkorous, arphaman, kadircet, cfe-commits

Tags: #clang

Differential Revision: https://reviews.llvm.org/D59757

LLVM/llvm 356879www-releases/trunk download.html, www-releases/trunk/8.0.0 clang+llvm-8.0.0-x86_64-linux-gnu-ubuntu-14.04.tar.xz clang+llvm-8.0.0-x86_64-linux-gnu-ubuntu-14.04.tar.xz.sig

8.0.0: Add ubuntu-14.04 binary