[PATCH] D52290: [driver][mips] Adjust target triple accordingly to provided ABI name

2018-09-26 Thread Simon Atanasyan via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL343169: [driver][mips] Adjust target triple accordingly to provided ABI name (authored by atanasyan, committed by ). Herald added a subscriber: llvm-commits. Changed prior to commit:

r343169 - [driver][mips] Adjust target triple accordingly to provided ABI name

2018-09-26 Thread Simon Atanasyan via cfe-commits
Author: atanasyan Date: Wed Sep 26 22:04:50 2018 New Revision: 343169 URL: http://llvm.org/viewvc/llvm-project?rev=343169=rev Log: [driver][mips] Adjust target triple accordingly to provided ABI name Explicitly selected MIPS ABI using the `-mabi` option implies corresponding target triple. For

[PATCH] D52290: [driver][mips] Adjust target triple accordingly to provided ABI name

2018-09-26 Thread Simon Atanasyan via Phabricator via cfe-commits
atanasyan added a comment. Thanks for review. Repository: rC Clang https://reviews.llvm.org/D52290 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] r343168 - [clang-tidy] Add dependency to clangAnalysis after rC343160

2018-09-26 Thread Fangrui Song via cfe-commits
Author: maskray Date: Wed Sep 26 21:23:24 2018 New Revision: 343168 URL: http://llvm.org/viewvc/llvm-project?rev=343168=rev Log: [clang-tidy] Add dependency to clangAnalysis after rC343160 Modified: clang-tools-extra/trunk/clang-tidy/mpi/CMakeLists.txt Modified:

[clang-tools-extra] r343166 - llvm::sort(C.begin(), C.end()) -> llvm::sort(C)

2018-09-26 Thread Fangrui Song via cfe-commits
Author: maskray Date: Wed Sep 26 21:19:29 2018 New Revision: 343166 URL: http://llvm.org/viewvc/llvm-project?rev=343166=rev Log: llvm::sort(C.begin(), C.end()) -> llvm::sort(C) The convenience wrapper in STLExtras is available since rL342102. Modified:

[PATCH] D10833: Retrieve BinaryOperator::getOpcode and BinaryOperator::getOpcodeStr via libclang and its python interface

2018-09-26 Thread Ian Sunamura via Phabricator via cfe-commits
kent08ian added a comment. Herald added a subscriber: dexonsmith. In https://reviews.llvm.org/D10833#1109371, @kent08ian wrote: > In https://reviews.llvm.org/D10833#970906, @milianw wrote: > > > still looks good to me. can someone else please review and commit this? > > > Ping Any updates on

[PATCH] D47687: [Sema] Missing -Wlogical-op-parentheses warnings in macros (PR18971)

2018-09-26 Thread Xing via Phabricator via cfe-commits
Higuoxing added a comment. Ping. Now, this patch could give fix-it note on parentheses in macros. https://reviews.llvm.org/D47687 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D52583: [analyzer] [NFC] Move the code for dumping the program point to ProgramPoint

2018-09-26 Thread George Karpenkov via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC343160: [analyzer] [NFC] Move the code for dumping the program point to ProgramPoint (authored by george.karpenkov, committed by ). Herald added a subscriber: cfe-commits. Changed prior to commit:

[PATCH] D52519: [analyzer] [NFC] Heavy refactoring of trackNullOrUndefValue

2018-09-26 Thread George Karpenkov via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL343159: [analyzer] [NFC] Heavy refactoring of trackNullOrUndefValue (authored by george.karpenkov, committed by ). Herald added a subscriber: llvm-commits. Changed prior to commit:

r343160 - [analyzer] [NFC] Move the code for dumping the program point to ProgramPoint

2018-09-26 Thread George Karpenkov via cfe-commits
Author: george.karpenkov Date: Wed Sep 26 18:46:18 2018 New Revision: 343160 URL: http://llvm.org/viewvc/llvm-project?rev=343160=rev Log: [analyzer] [NFC] Move the code for dumping the program point to ProgramPoint So we can dump them outside of viewing the exploded grpah. Differential

[PATCH] D52519: [analyzer] [NFC] Heavy refactoring of trackNullOrUndefValue

2018-09-26 Thread George Karpenkov via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC343159: [analyzer] [NFC] Heavy refactoring of trackNullOrUndefValue (authored by george.karpenkov, committed by ). Herald added a subscriber: cfe-commits. Changed prior to commit:

r343159 - [analyzer] [NFC] Heavy refactoring of trackNullOrUndefValue

2018-09-26 Thread George Karpenkov via cfe-commits
Author: george.karpenkov Date: Wed Sep 26 18:45:57 2018 New Revision: 343159 URL: http://llvm.org/viewvc/llvm-project?rev=343159=rev Log: [analyzer] [NFC] Heavy refactoring of trackNullOrUndefValue Differential Revision: https://reviews.llvm.org/D52519 Modified:

[PATCH] D52586: [X86] Add the movbe instruction intrinsics from icc.

2018-09-26 Thread Craig Topper via Phabricator via cfe-commits
craig.topper created this revision. craig.topper added reviewers: spatel, RKSimon. These intrinsics exist in icc. They can be found on the Intel Intrinsics Guide website. All the backend support is in place to pattern match a load+bswap or a bswap+store pattern to the MOVBE instructions. So we

[PATCH] D52585: [analyzer] [testing] Pass through an extra argument for specifying extra analyzer options

2018-09-26 Thread George Karpenkov via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC343158: [analyzer] [testing] Pass through an extra argument for specifying extra… (authored by george.karpenkov, committed by ). Herald added a subscriber: cfe-commits. Changed prior to commit:

r343158 - [analyzer] [testing] Pass through an extra argument for specifying extra analyzer options

2018-09-26 Thread George Karpenkov via cfe-commits
Author: george.karpenkov Date: Wed Sep 26 18:10:59 2018 New Revision: 343158 URL: http://llvm.org/viewvc/llvm-project?rev=343158=rev Log: [analyzer] [testing] Pass through an extra argument for specifying extra analyzer options Differential Revision: https://reviews.llvm.org/D52585 Modified:

[PATCH] D52527: [clang-format] fix Bug 38686: add AfterCaseLabel to BraceWrapping

2018-09-26 Thread Owen Pan via Phabricator via cfe-commits
owenpan updated this revision to Diff 167225. owenpan added a comment. Updated ClangFormatStyleOptions.rst. Repository: rC Clang https://reviews.llvm.org/D52527 Files: docs/ClangFormatStyleOptions.rst include/clang/Format/Format.h lib/Format/Format.cpp

[PATCH] D50901: [clang][ubsan] Split Implicit Integer Truncation Sanitizer into unsigned and signed checks

2018-09-26 Thread Vitaly Buka via Phabricator via cfe-commits
vitalybuka added inline comments. Comment at: lib/CodeGen/CGExprScalar.cpp:305 enum ImplicitConversionCheckKind : unsigned char { -ICCK_IntegerTruncation = 0, +ICCK_IntegerTruncation = 0, // Legacy, no longer used. +ICCK_UnsignedIntegerTruncation = 1,

[PATCH] D52581: [AST] Revert mangling changes from r339428

2018-09-26 Thread Shoaib Meenai via Phabricator via cfe-commits
smeenai created this revision. smeenai added reviewers: compnerd, rjmccall, theraven, DHowett-MSFT. As discussed in https://reviews.llvm.org/D50144, we want Obj-C classes to have the same mangling as C++ structs, to support headers like the following: #ifdef __OBJC__ @class I; #else

[PATCH] D52443: Thread safety analysis: Examine constructor arguments

2018-09-26 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. This generally looks sensible to me. Comment at: lib/Analysis/ThreadSafety.cpp:1970 + // There can be default arguments, so we stop when one iterator is at end(). + for (auto Arg = ArgBegin; Param != Params.end() && Arg != ArgEnd; +

r343152 - Remove trailing space in rC343150

2018-09-26 Thread Fangrui Song via cfe-commits
Author: maskray Date: Wed Sep 26 16:47:00 2018 New Revision: 343152 URL: http://llvm.org/viewvc/llvm-project?rev=343152=rev Log: Remove trailing space in rC343150 Modified: cfe/trunk/include/clang/Sema/Lookup.h Modified: cfe/trunk/include/clang/Sema/Lookup.h URL:

r343150 - Init LookupResult::AmbiguityKind

2018-09-26 Thread Vitaly Buka via cfe-commits
Author: vitalybuka Date: Wed Sep 26 15:58:53 2018 New Revision: 343150 URL: http://llvm.org/viewvc/llvm-project?rev=343150=rev Log: Init LookupResult::AmbiguityKind We don't expect useful value there unless it's "ambiguous". However we use read it for copying and moving, so we need either init

r343148 - [DebugInfo] Generate debug information for labels.

2018-09-26 Thread Hsiangkai Wang via cfe-commits
Author: hsiangkai Date: Wed Sep 26 15:18:45 2018 New Revision: 343148 URL: http://llvm.org/viewvc/llvm-project?rev=343148=rev Log: [DebugInfo] Generate debug information for labels. Generate DILabel metadata and call llvm.dbg.label after label statement to associate the metadata with the label.

[PATCH] D52576: llvm::sort(C.begin(), C.end(), ...) -> llvm::sort(C, ...)

2018-09-26 Thread Fangrui Song via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL343147: llvm::sort(C.begin(), C.end(), ...) - llvm::sort(C, ...) (authored by MaskRay, committed by ). Herald added a subscriber: llvm-commits. Repository: rL LLVM https://reviews.llvm.org/D52576

r343147 - llvm::sort(C.begin(), C.end(), ...) -> llvm::sort(C, ...)

2018-09-26 Thread Fangrui Song via cfe-commits
Author: maskray Date: Wed Sep 26 15:16:28 2018 New Revision: 343147 URL: http://llvm.org/viewvc/llvm-project?rev=343147=rev Log: llvm::sort(C.begin(), C.end(), ...) -> llvm::sort(C, ...) Summary: The convenience wrapper in STLExtras is available since rL342102. Reviewers: rsmith, #clang,

[PATCH] D52576: llvm::sort(C.begin(), C.end(), ...) -> llvm::sort(C, ...)

2018-09-26 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay updated this revision to Diff 167206. MaskRay added a comment. Reflow nearby statements as rsmith@ requested: git diff -U0 --no-color 'HEAD^' | ~/llvm/tools/clang/tools/clang-format/clang-format-diff.py -i -p1 Repository: rC Clang https://reviews.llvm.org/D52576 Files:

[PATCH] D52578: Thread safety analysis: Allow scoped releasing of capabilities

2018-09-26 Thread Aaron Puchert via Phabricator via cfe-commits
aaronpuchert added a comment. See the bug for further discussion. I'm not sure if we want to have this, but if the pattern is used more widely it might make sense. It blows up the code a bit, although I hope that https://reviews.llvm.org/D51187 might reduce it again. Repository: rC Clang

[PATCH] D52576: llvm::sort(C.begin(), C.end(), ...) -> llvm::sort(C, ...)

2018-09-26 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith accepted this revision. rsmith added a comment. This revision is now accepted and ready to land. Thanks for the cleanup! Maybe consider running `clang-format-diff` on this? Comment at: lib/Sema/SemaOverload.cpp:10813-10814 - llvm::sort(Cands.begin(), Cands.end(), +

[PATCH] D52578: Thread safety analysis: Allow scoped releasing of capabilities

2018-09-26 Thread Aaron Puchert via Phabricator via cfe-commits
aaronpuchert created this revision. aaronpuchert added reviewers: aaron.ballman, delesley. Herald added a subscriber: cfe-commits. The pattern is problematic with C++ exceptions, and not as widespread as scoped locks, but it's still used by some, for example Chromium. We are a bit stricter here

[PATCH] D52290: [driver][mips] Adjust target triple accordingly to provided ABI name

2018-09-26 Thread Reid Kleckner via Phabricator via cfe-commits
rnk accepted this revision. rnk added a comment. This revision is now accepted and ready to land. Lgtm, thanks! Repository: rC Clang https://reviews.llvm.org/D52290 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D52576: llvm::sort(C.begin(), C.end(), ...) -> llvm::sort(C, ...)

2018-09-26 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay created this revision. MaskRay added a reviewer: rsmith. Herald added subscribers: cfe-commits, kadircet, arphaman, mgrang. The convenience wrapper in STLExtras is available since https://reviews.llvm.org/rL342102. Repository: rC Clang https://reviews.llvm.org/D52576 Files:

Re: r338385 - [RISCV] Add driver for riscv32-unknown-elf baremetal target

2018-09-26 Thread Erik Pilkington via cfe-commits
I put a patch up to fix this here: https://reviews.llvm.org/D52574 Please take these warnings more seriously next time. It's the committer's responsibility to fix these warnings [1], and they often identify legitimate issues in the patch. Thanks, Erik [1]:

[PATCH] D52574: NFC: Fix some darwin linker warnings introduced in r338385

2018-09-26 Thread Erik Pilkington via Phabricator via cfe-commits
erik.pilkington created this revision. erik.pilkington added reviewers: xbolva00, kristina, asb. Herald added subscribers: kadircet, jocewei, PkmX, dexonsmith, the_o, brucehoult, MartinMosbeck, rogfer01, mgrang, edward-jones, zzheng, jrtc27, ioeric, niosHD, sabuasal, apazos, simoncook,

[PATCH] D52290: [driver][mips] Adjust target triple accordingly to provided ABI name

2018-09-26 Thread Simon Atanasyan via Phabricator via cfe-commits
atanasyan added inline comments. Comment at: lib/Driver/Driver.cpp:492 + .Case("64", Target.get64BitArchVariant()) + .Default(Target); + rnk wrote: > We should emit a diagnostic for invalid -mabi=values. We already do that: $

[PATCH] D52571: [Sema] Handle __va_start for Windows/ARM64 in the same way as for ARM

2018-09-26 Thread Reid Kleckner via Phabricator via cfe-commits
rnk accepted this revision. rnk added a comment. This revision is now accepted and ready to land. lgtm Repository: rC Clang https://reviews.llvm.org/D52571 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D52571: [Sema] Handle __va_start for Windows/ARM64 in the same way as for ARM

2018-09-26 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo created this revision. mstorsjo added reviewers: dmajor, mgrang, ssijaric, rnk, compnerd. Herald added subscribers: chrib, kristof.beyls. This fixes PR39090. Repository: rC Clang https://reviews.llvm.org/D52571 Files: lib/Sema/SemaChecking.cpp test/SemaCXX/microsoft-varargs.cpp

[PATCH] D51686: [OpenMP] Improve search for libomptarget-nvptx

2018-09-26 Thread Jonas Hahnfeld via Phabricator via cfe-commits
Hahnfeld added inline comments. Comment at: lib/Driver/ToolChains/Cuda.cpp:665 +// Add path to lib / lib64 folder. +SmallString<256> DefaultLibPath = ABataev wrote: > You're changing the order of the lookup for the paths. Is this intended? If > so,

[PATCH] D51686: [OpenMP] Improve search for libomptarget-nvptx

2018-09-26 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: lib/Driver/ToolChains/Cuda.cpp:515 + if (Arg *A = Args.getLastArg(options::OPT_libomptarget_nvptx_path_EQ)) +CmdArgs.push_back(Args.MakeArgString(Twine("-L") + A->getValue())); + `const Arg *A`

[PATCH] D52538: [MinGW] Allow using ASan

2018-09-26 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo added a comment. Also, I notice that ubsan also is built for windows, but in the MSVC toolchain, only asan (and libfuzzer) can be enabled, not ubsan. Is there something else missing for ubsan, or what's the matter with that one? Repository: rC Clang https://reviews.llvm.org/D52538

[PATCH] D50294: [Driver] Use -gdwarf-3 by default for FreeBSD

2018-09-26 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. In https://reviews.llvm.org/D50294#1245454, @emaste wrote: > I'm using this change: > https://github.com/emaste/freebsd/commit/1c3deab6d518feb1a7e88de5b342a139e4022a21 > > In FreeBSD 12 and later we use Clang, lld, and ELF Tool Chain. (We still have > gas and objdump

[PATCH] D51686: [OpenMP] Improve search for libomptarget-nvptx

2018-09-26 Thread Jonas Hahnfeld via Phabricator via cfe-commits
Hahnfeld added a comment. Ping Repository: rC Clang https://reviews.llvm.org/D51686 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D52434: [OpenMP] Make default schedules for NVPTX target regions in SPMD mode achieve coalescing

2018-09-26 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: lib/CodeGen/CGOpenMPRuntime.cpp:9199 + OpenMPDistScheduleClauseKind *ScheduleKind, llvm::Value *) const { + return; +} Remove `return;`, it is not required Comment at:

[PATCH] D52434: [OpenMP] Make default schedules for NVPTX target regions in SPMD mode achieve coalescing

2018-09-26 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
gtbercea updated this revision to Diff 167172. gtbercea edited the summary of this revision. gtbercea added a comment. Only change default schedule for distribute directive. Repository: rC Clang https://reviews.llvm.org/D52434 Files: lib/CodeGen/CGOpenMPRuntime.cpp

[PATCH] D52552: [clang-tidy] Flag Classes Inheriting From Structs

2018-09-26 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added inline comments. Comment at: test/clang-tidy/misc-class-inherit-from-struct.cpp:13 +}; + +class C lebedev.ri wrote: > Missing cases: > * struct inheriting from struct > * Different inheritance visibility: > * You only check the default

r343131 - P1008R1 Classes with user-declared constructors are never aggregates in

2018-09-26 Thread Richard Smith via cfe-commits
Author: rsmith Date: Wed Sep 26 12:00:16 2018 New Revision: 343131 URL: http://llvm.org/viewvc/llvm-project?rev=343131=rev Log: P1008R1 Classes with user-declared constructors are never aggregates in C++20. Added: cfe/trunk/test/SemaCXX/cxx2a-compat.cpp

[PATCH] D52290: [driver][mips] Adjust target triple accordingly to provided ABI name

2018-09-26 Thread Reid Kleckner via Phabricator via cfe-commits
rnk added inline comments. Comment at: lib/Driver/Driver.cpp:492 + .Case("64", Target.get64BitArchVariant()) + .Default(Target); + We should emit a diagnostic for invalid -mabi=values. Repository: rC Clang

[PATCH] D49864: [clang-tidy] The script clang-tidy-diff.py doesn't accept 'pass by' options (--)

2018-09-26 Thread Jano Simas via Phabricator via cfe-commits
janosimas added inline comments. Comment at: clang-tidy/tool/clang-tidy-diff.py:123-130 if args.fix: command.append('-fix') if args.checks != '': command.append('-checks=' + quote + args.checks + quote) if args.quiet: command.append('-quiet') if

[PATCH] D49864: [clang-tidy] The script clang-tidy-diff.py doesn't accept 'pass by' options (--)

2018-09-26 Thread Jano Simas via Phabricator via cfe-commits
janosimas requested review of this revision. janosimas added inline comments. Comment at: clang-tidy/tool/clang-tidy-diff.py:123-130 if args.fix: command.append('-fix') if args.checks != '': command.append('-checks=' + quote + args.checks + quote) if

[PATCH] D52552: [clang-tidy] Flag Classes Inheriting From Structs

2018-09-26 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: docs/ReleaseNotes.rst:109 +- New :doc:`misc-class-inherit-from-struct + ` check. Please use alphabetical order for new checks list. Comment at:

[PATCH] D52530: [analyzer] scan-build: if --status-bugs is passed, don't forget about the exit status of the actual build

2018-09-26 Thread George Karpenkov via Phabricator via cfe-commits
george.karpenkov added a comment. @jroelofs Thanks, but in general code owners would need to take a look as well. @lebedev.ri The code looks great, thanks! Repository: rC Clang https://reviews.llvm.org/D52530 ___ cfe-commits mailing list

Re: [PATCH] D52499: [clang-cl] Make /Gs imply default stack probes, not /Gs0 (PR39074)

2018-09-26 Thread Nico Weber via cfe-commits
Sounds great, thanks! On Wed, Sep 26, 2018 at 8:33 AM Hans Wennborg via Phabricator via cfe-commits wrote: > hans added inline comments. > > > > Comment at: include/clang/Driver/CLCompatOptions.td:94 > +def : CLFlag<"Gs">, HelpText<"Use stack probes (default)">, > + Alias,

[PATCH] D52392: [X86] For lzcnt/tzcnt intrinsics use cttz/ctlz intrinsics with zero_undef flag set to false.

2018-09-26 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC343126: [X86] For lzcnt/tzcnt intrinsics use cttz/ctlz intrinsics with zero_undef flag… (authored by ctopper, committed by ). Changed prior to commit:

r343126 - [X86] For lzcnt/tzcnt intrinsics use cttz/ctlz intrinsics with zero_undef flag set to false.

2018-09-26 Thread Craig Topper via cfe-commits
Author: ctopper Date: Wed Sep 26 10:01:44 2018 New Revision: 343126 URL: http://llvm.org/viewvc/llvm-project?rev=343126=rev Log: [X86] For lzcnt/tzcnt intrinsics use cttz/ctlz intrinsics with zero_undef flag set to false. Previously we used a select and the zero_undef=true intrinsic. In -O2

[PATCH] D52536: clang-format: [JS] conditional types.

2018-09-26 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir accepted this revision. krasimir added inline comments. This revision is now accepted and ready to land. Comment at: unittests/Format/FormatTestJS.cpp:2315 + " never) extends((k: infer I) => void) ? I " + ": never;"); +}

[PATCH] D52552: [clang-tidy] Flag Classes Inheriting From Structs

2018-09-26 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. This strikes me as likely being a very chatty diagnostic. For instance, it will trigger on harmless code that uses empty base class optimization (in addition to other concerns pointed out by @lebedev.ri). It seems like the real concern here is unintentional

[PATCH] D45050: [clang-tidy] New checker for not null-terminated result caused by strlen(), size() or equal length

2018-09-26 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang-tidy/bugprone/NotNullTerminatedResultCheck.cpp:1038 + + SmallString<128> NewAddNullTermExprStr; + NewAddNullTermExprStr = "\n"; JonasToth wrote: > whisperity wrote: > > aaron.ballman wrote: > > > This

[PATCH] D52281: [clang-tidy] Add modernize check to use std::invoke in generic code

2018-09-26 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang-tidy/modernize/ReplaceGenericFunctorCallCheck.cpp:70 +const auto *Paren = dyn_cast(MFunctor->getCallee()); +const auto *BinOp = dyn_cast(Paren->getSubExpr()); + How do you know `Paren` won't be null?

[PATCH] D52547: Tell whether file/folder for include completions.

2018-09-26 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added a comment. A drive-by comment. Would it be cleaner to pass this information from clang? Relying on completion label seems shaky. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D52547 ___ cfe-commits mailing list

[PATCH] D51741: [coro]Pass rvalue reference for named local variable to return_value

2018-09-26 Thread Brian Gesiak via Phabricator via cfe-commits
modocache accepted this revision. modocache added a comment. This revision is now accepted and ready to land. This is great, thanks! Sorry for letting it languish. I defer to @GorNishanov, but I don't see why this couldn't go in now and if there're any edge cases I'm missing we can address

Re: [clang-tools-extra] r342730 - [clangd] Remember to serialize symbol origin in YAML.

2018-09-26 Thread Ilya Biryukov via cfe-commits
> The downside is probably that all symbols in yaml would have the same origin, which is a bit redundant but doesn't seem to matter much. All my comments boil down to this one, but the argument is not only redundant - it does not make sense design-wise to store an origin in the serialized static

[PATCH] D52503: [clangd] Fix bugs with incorrect memory estimate report

2018-09-26 Thread Kirill Bobyrev via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rCTE343117: [clangd] Fix bugs with incorrect memory estimate report (authored by omtcyfz, committed by ). Changed prior to commit: https://reviews.llvm.org/D52503?vs=167079=167143#toc Repository: rCTE

[clang-tools-extra] r343117 - [clangd] Fix bugs with incorrect memory estimate report

2018-09-26 Thread Kirill Bobyrev via cfe-commits
Author: omtcyfz Date: Wed Sep 26 08:06:23 2018 New Revision: 343117 URL: http://llvm.org/viewvc/llvm-project?rev=343117=rev Log: [clangd] Fix bugs with incorrect memory estimate report * With the current implementation, `sizeof(std::vector)` is added twice to the `Dex` memory estimate which is

[PATCH] D52554: [WIP] [clangd] Tests for special methods code-completion

2018-09-26 Thread Jan Korous via Phabricator via cfe-commits
jkorous created this revision. jkorous added reviewers: sammccall, ilya-biryukov. jkorous added a project: clang-tools-extra. Herald added subscribers: cfe-commits, kadircet, arphaman, dexonsmith, MaskRay, ioeric. Created in order to check we agree on what are the requirements and would later

[PATCH] D52545: [docs] Update PostingList string representation format

2018-09-26 Thread Kirill Bobyrev via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL343116: [docs] Update PostingList string representation format (authored by omtcyfz, committed by ). Herald added a subscriber: llvm-commits. Changed prior to commit:

[clang-tools-extra] r343116 - [docs] Update PostingList string representation format

2018-09-26 Thread Kirill Bobyrev via cfe-commits
Author: omtcyfz Date: Wed Sep 26 07:59:49 2018 New Revision: 343116 URL: http://llvm.org/viewvc/llvm-project?rev=343116=rev Log: [docs] Update PostingList string representation format Because `PostingList` objects are compressed, it is now impossible to see elements other than the current one

[PATCH] D52545: [docs] Update PostingList string representation format

2018-09-26 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev updated this revision to Diff 167138. kbobyrev added a comment. Simplify the documentation format. https://reviews.llvm.org/D52545 Files: clang-tools-extra/clangd/index/dex/Iterator.h Index: clang-tools-extra/clangd/index/dex/Iterator.h

[PATCH] D52545: [docs] Update PostingList string representation format

2018-09-26 Thread Eric Liu via Phabricator via cfe-commits
ioeric added inline comments. Comment at: clang-tools-extra/clangd/index/dex/Iterator.h:97 /// ChildN is N-th iterator child. Raw iterators over PostingList are - /// represented as "[ID1, ID2, ..., {IDN}, ... END]" where IDN is N-th - /// PostingList entry and the element

[PATCH] D52552: [clang-tidy] Flag Classes Inheriting From Structs

2018-09-26 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added a comment. Please upload patches with full context. Please do follow coding style, clang-format your patches. Would it make sense to not catch-all all the `class : struct`, but consider the explicitly specified inheritance visibility? Comment at:

[PATCH] D52364: [clangd] Initial supoprt for cross-namespace global code completion.

2018-09-26 Thread Eric Liu via Phabricator via cfe-commits
ioeric added inline comments. Comment at: clangd/index/Index.h:430 /// - /// The global scope is "", a top level scope is "foo::", etc. + /// The global scope is "", a top level scope is "foo::", etc. "*" is + /// wildcard. sammccall wrote: > I'm not a big

[PATCH] D52364: [clangd] Initial supoprt for cross-namespace global code completion.

2018-09-26 Thread Eric Liu via Phabricator via cfe-commits
ioeric updated this revision to Diff 167135. ioeric marked 14 inline comments as done. ioeric added a comment. - address review comments Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D52364 Files: clangd/CodeComplete.cpp clangd/CodeComplete.h clangd/index/Index.h

[PATCH] D52552: [clang-tidy] Flag Classes Inheriting From Structs

2018-09-26 Thread Dennis Melamed via Phabricator via cfe-commits
DennisMelamed created this revision. DennisMelamed added reviewers: alexfh, aaron.ballman, hokein, JonasToth. Herald added subscribers: xazax.hun, mgorny. [clang-tidy] Flag Classes Inheriting From Structs Added a check which flags cases of a class inheriting from a struct, which can cause

[PATCH] D52491: [ARM/AArch64][v8.5A] Add Armv8.5-A target

2018-09-26 Thread Oliver Stannard via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC343111: [ARM/AArch64][v8.5A] Add Armv8.5-A target (authored by olista01, committed by ). Changed prior to commit: https://reviews.llvm.org/D52491?vs=166908=167130#toc Repository: rC Clang

r343111 - [ARM/AArch64][v8.5A] Add Armv8.5-A target

2018-09-26 Thread Oliver Stannard via cfe-commits
Author: olista01 Date: Wed Sep 26 07:20:29 2018 New Revision: 343111 URL: http://llvm.org/viewvc/llvm-project?rev=343111=rev Log: [ARM/AArch64][v8.5A] Add Armv8.5-A target This patch allows targetting Armv8.5-A from Clang. Most of the implementation is in TargetParser, so this is mostly just

[PATCH] D52286: [Intrinsic] Signed Saturation Intirnsic

2018-09-26 Thread Bevin Hansson via Phabricator via cfe-commits
ebevhan added inline comments. Comment at: lib/CodeGen/SelectionDAG/LegalizeDAG.cpp:1119 + case ISD::SSAT: +// Target legalization checked here? +Action = TargetLowering::Expand; leonardchan wrote: > ebevhan wrote: > > leonardchan wrote: > > > ebevhan

[PATCH] D52360: [clang-tidy] Fix for performance-unnecessary-value-param, performance-unnecessary-copy-initialization and performance-for-range-copy

2018-09-26 Thread Felix Berger via Phabricator via cfe-commits
flx added a comment. In https://reviews.llvm.org/D52360#1246472, @baloghadamsoftware wrote: > In https://reviews.llvm.org/D52360#1246443, @danilaml wrote: > > > Would that also skip checks for something like `shared_ptr`? > > > Yes, everything ending on `pointer`, `ptr`, `reference` or `ref`,

[PATCH] D52315: [clang-tidy] Fix for performance-unnecessary-value-param, performance-unnecessary-copy-initialization and performance-for-range-copy

2018-09-26 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added a comment. In https://reviews.llvm.org/D52315#1245747, @dblaikie wrote: > ... I think this has been attempted to be superseded by https://reviews.llvm.org/D52360, although that has the same basic issue. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D52315

[PATCH] D52360: [clang-tidy] Fix for performance-unnecessary-value-param, performance-unnecessary-copy-initialization and performance-for-range-copy

2018-09-26 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added a comment. In https://reviews.llvm.org/D52360#1246474, @baloghadamsoftware wrote: > In https://reviews.llvm.org/D52360#1246452, @lebedev.ri wrote: > > > I disagree, it **must** not have false-negatives by default. > > > What kind of false-negatives could be caused by smart

[PATCH] D52503: [clangd] Fix bugs with incorrect memory estimate report

2018-09-26 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev added inline comments. Comment at: clang-tools-extra/clangd/index/dex/Dex.cpp:251 Bytes += InvertedIndex.getMemorySize(); - for (const auto : InvertedIndex) -Bytes += P.second.bytes(); + for (const auto : InvertedIndex) +Bytes +=

[PATCH] D52549: [VFS] Add a VFS wrapper which avoids opening nonexistent files by reading dirs.

2018-09-26 Thread Sam McCall via Phabricator via cfe-commits
sammccall added a comment. As noted, this is really early stage, but would appreciate design feedback (I think both of you have spent some time fighting VFS by now...) Repository: rC Clang https://reviews.llvm.org/D52549 ___ cfe-commits mailing

[PATCH] D52549: [VFS] Add a VFS wrapper which avoids opening nonexistent files by reading dirs.

2018-09-26 Thread Sam McCall via Phabricator via cfe-commits
sammccall updated this revision to Diff 167126. sammccall added a comment. remove commented code Repository: rC Clang https://reviews.llvm.org/D52549 Files: include/clang/Basic/VirtualFileSystem.h lib/Basic/AvoidStatsVFS.cpp lib/Basic/CMakeLists.txt lib/Basic/VirtualFileSystem.cpp

[PATCH] D52549: [VFS] Add a VFS wrapper which avoids opening nonexistent files by reading dirs.

2018-09-26 Thread Sam McCall via Phabricator via cfe-commits
sammccall created this revision. sammccall added reviewers: ioeric, ilya-biryukov. Herald added subscribers: cfe-commits, jfb, mgorny. This is intended to reduce the number of syscalls when building large translation units that have long include paths. This is a WIP for early feedback: -

[PATCH] D52421: [Sema] Diagnose parameter names that shadow inherited field names

2018-09-26 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri accepted this revision. lebedev.ri added a comment. This revision is now accepted and ready to land. This looks good to me, but you probably want to wait for someone else to review this, too. https://reviews.llvm.org/D52421 ___

[PATCH] D52334: [clang-tidy] Build it even without static analyzer

2018-09-26 Thread Jonas Toth via Phabricator via cfe-commits
JonasToth added a comment. Please wait for explicit approval from @alexfh Am 26.09.2018 um 13:05 schrieb Stephen Kelly via Phabricator: > steveire added a comment. > > Can I go ahead and merge this now? > > Repository: > > rCTE Clang Tools Extra > > https://reviews.llvm.org/D52334

[PATCH] D45050: [clang-tidy] New checker for not null-terminated result caused by strlen(), size() or equal length

2018-09-26 Thread Jonas Toth via Phabricator via cfe-commits
JonasToth added inline comments. Comment at: clang-tidy/bugprone/NotNullTerminatedResultCheck.cpp:1038 + + SmallString<128> NewAddNullTermExprStr; + NewAddNullTermExprStr = "\n"; whisperity wrote: > aaron.ballman wrote: > > This should be done using a `Twine`.

[PATCH] D52419: [clangd] Cache FS stat() calls when building preamble.

2018-09-26 Thread Eric Liu via Phabricator via cfe-commits
ioeric added inline comments. Comment at: clangd/ClangdUnit.cpp:339 +llvm::ErrorOr status(const Twine ) override { + auto I = StatCache.find(Path.str()); + return (I != StatCache.end()) ? I->getValue() : FS->status(Path); ilya-biryukov wrote: >

[PATCH] D52419: [clangd] Cache FS stat() calls when building preamble.

2018-09-26 Thread Eric Liu via Phabricator via cfe-commits
ioeric updated this revision to Diff 167124. ioeric marked 7 inline comments as done. ioeric added a comment. - address review comments Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D52419 Files: clangd/CMakeLists.txt clangd/ClangdServer.cpp clangd/ClangdUnit.cpp

[PATCH] D51340: Add /Zc:DllexportInlines option to clang-cl

2018-09-26 Thread Hans Wennborg via Phabricator via cfe-commits
hans added a comment. The static local stuff still makes me nervous. How much does Chromium break if we just ignore the problem? And how does -fvisibility-inlines-hidden handle the issue? Also, Sema already has a check for static locals in C inline functions: $ echo "inline void f() {

[PATCH] D52547: Tell whether file/folder for include completions.

2018-09-26 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet created this revision. kadircet added a reviewer: sammccall. Herald added subscribers: cfe-commits, arphaman, jkorous, ioeric, ilya-biryukov. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D52547 Files: clangd/CodeComplete.cpp clangd/Protocol.h

[PATCH] D52533: [test] Use --sysroot instead of -B in print-multi-directory.c

2018-09-26 Thread Christian Bruel via Phabricator via cfe-commits
chrib added a reviewer: jroelofs. chrib added a comment. Hi Martin, maybe just a NIT, use --sysroot= rather than just --sysroot for consistency with other tests. Otherwise looks good to me, thanks (adding Jonathan as I'm not sure I can accept) Repository: rC Clang

[PATCH] D52530: [analyzer] scan-build: if --status-bugs is passed, don't forget about the exit status of the actual build

2018-09-26 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC343105: [analyzer] scan-build: if --status-bugs is passed, dont forget about the exit… (authored by lebedevri, committed by ). Repository: rC Clang https://reviews.llvm.org/D52530 Files:

[PATCH] D52530: [analyzer] scan-build: if --status-bugs is passed, don't forget about the exit status of the actual build

2018-09-26 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added a comment. In https://reviews.llvm.org/D52530#1246459, @jroelofs wrote: > LGTM Thank you for the speedy review! Repository: rC Clang https://reviews.llvm.org/D52530 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

r343105 - [analyzer] scan-build: if --status-bugs is passed, don't forget about the exit status of the actual build

2018-09-26 Thread Roman Lebedev via cfe-commits
Author: lebedevri Date: Wed Sep 26 06:08:44 2018 New Revision: 343105 URL: http://llvm.org/viewvc/llvm-project?rev=343105=rev Log: [analyzer] scan-build: if --status-bugs is passed, don't forget about the exit status of the actual build Summary: This has been bothering me for a while, but only

[PATCH] D52390: [analyzer] Add StackSizeChecker to StaticAnalyzer

2018-09-26 Thread Umann Kristóf via Phabricator via cfe-commits
Szelethus added inline comments. Comment at: include/clang/StaticAnalyzer/Checkers/StackUsageMeasuringVisitor.h:102-111 + bool hasEmptyFlaggedUsageStored(const Stmt *S) const { +auto iter = StmtSubtreeUsages.find(S); +return iter != StmtSubtreeUsages.end() && +

[PATCH] D52360: [clang-tidy] Fix for performance-unnecessary-value-param, performance-unnecessary-copy-initialization and performance-for-range-copy

2018-09-26 Thread Balogh , Ádám via Phabricator via cfe-commits
baloghadamsoftware added a comment. In https://reviews.llvm.org/D52360#1246452, @lebedev.ri wrote: > I disagree, it **must** not have false-negatives by default. What kind of false-negatives could be caused by smart pointers or references? Sane people do not name a type pointer or reference

[PATCH] D52360: [clang-tidy] Fix for performance-unnecessary-value-param, performance-unnecessary-copy-initialization and performance-for-range-copy

2018-09-26 Thread Balogh , Ádám via Phabricator via cfe-commits
baloghadamsoftware added a comment. In https://reviews.llvm.org/D52360#1246443, @danilaml wrote: > Would that also skip checks for something like `shared_ptr`? Yes, everything ending on `pointer`, `ptr`, `reference` or `ref`, first letter case insensitive. Repository: rCTE Clang Tools

[PATCH] D52545: [docs] Update PostingList string representation format

2018-09-26 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev created this revision. kbobyrev added reviewers: ioeric, sammccall. kbobyrev added a project: clang-tools-extra. Herald added subscribers: kadircet, arphaman, jkorous. Because `PostingList` objects are compressed, it is now impossible to see elements other than the current one and the

[PATCH] D52530: [analyzer] scan-build: if --status-bugs is passed, don't forget about the exit status of the actual build

2018-09-26 Thread Jonathan Roelofs via Phabricator via cfe-commits
jroelofs accepted this revision. jroelofs added a comment. This revision is now accepted and ready to land. LGTM Repository: rC Clang https://reviews.llvm.org/D52530 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D52499: [clang-cl] Make /Gs imply default stack probes, not /Gs0 (PR39074)

2018-09-26 Thread Hans Wennborg via Phabricator via cfe-commits
hans added inline comments. Comment at: include/clang/Driver/CLCompatOptions.td:94 +def : CLFlag<"Gs">, HelpText<"Use stack probes (default)">, + Alias, AliasArgs<["4096"]>; def _SLASH_Gs : CLJoined<"Gs">, thakis wrote: >

[PATCH] D52499: [clang-cl] Make /Gs imply default stack probes, not /Gs0 (PR39074)

2018-09-26 Thread Nico Weber via Phabricator via cfe-commits
thakis added a comment. Thanks! lgtm. Comment at: include/clang/Driver/CLCompatOptions.td:94 +def : CLFlag<"Gs">, HelpText<"Use stack probes (default)">, + Alias, AliasArgs<["4096"]>; def _SLASH_Gs : CLJoined<"Gs">,

Re: [clang-tools-extra] r342730 - [clangd] Remember to serialize symbol origin in YAML.

2018-09-26 Thread Eric Liu via cfe-commits
I think it depends on how you interpret the origin. You could tie the origin to the index or to the producer of the symbol. The current model seems to be the later (origin is a configuration in SymbolCollector. MergeIndex manipulates the origin, but I would rather treat that as a special case).

[PATCH] D52360: [clang-tidy] Fix for performance-unnecessary-value-param, performance-unnecessary-copy-initialization and performance-for-range-copy

2018-09-26 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added a comment. In https://reviews.llvm.org/D52360#1246440, @baloghadamsoftware wrote: > Config option is a good idea but it must not be empty by default. The checker > must ignore all pointer and references by default based on their names. I disagree, it **must** not have

  1   2   >