Re: r343224 - [Tooling] Get rid of uses of llvm::Twine::str which is slow. NFC

2018-10-01 Thread David Blaikie via cfe-commits
On Thu, Sep 27, 2018 at 7:51 AM Eric Liu via cfe-commits < cfe-commits@lists.llvm.org> wrote: > Author: ioeric > Date: Thu Sep 27 07:50:24 2018 > New Revision: 343224 > > URL: http://llvm.org/viewvc/llvm-project?rev=343224&view=rev > Log: > [Tooling] Get rid of uses of llvm::Twine::str which is sl

Re: r343492 - [OPENMP][NVPTX] Handle `requires datasharing` flag correctly with

2018-10-01 Thread Jonas Hahnfeld via cfe-commits
Does this fix an issue or is it just 'this looks incorrect'? __kmpc_data_sharing_push_stack has an extra case if the runtime is uninitialized, so AFAICS the initialization in __kmpc_spmd_kernel_init should not be needed. If the runtime needs to be initialized Clang emits a call to __kmpc_data

[PATCH] D52727: [clang-tidy] White List Option for performance-unnecessary-value-param, performance-unnecessary-copy-initialization and performance-for-range-copy

2018-10-01 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added a comment. Thanks, that looks much better. Please clang-format the patch. This pattern is repeated at least 4 times now, i think some abstraction is needed. Comment at: clang-tidy/performance/ForRangeCopyCheck.cpp:49 + // Skip whitelisted types + const auto

Re: r342912 - [CodeGen] Revert commit https://reviews.llvm.org/rL342717

2018-10-01 Thread David Blaikie via cfe-commits
When reverting patches it's helpful to include some context (links to buildbots, plus inline/textual descriptions of errors, etc) for why the change is being made - so people looking to explain the failure they're seeing can see if this change is intended to address it, or if someone's going back t

[PATCH] D52730: [analysis] ConversionChecker: handle floating point

2018-10-01 Thread Donát Nagy via Phabricator via cfe-commits
donat.nagy created this revision. donat.nagy added reviewers: NoQ, george.karpenkov, rnkovacs, baloghadamsoftware, mikhail.ramalho. Herald added subscribers: cfe-commits, Szelethus. Extend the alpha.core.Conversion checker to handle implicit converions where a too large integer value is converted

Re: r343279 - [cxx2a] P0624R2: Lambdas with no capture-default are

2018-10-01 Thread David Blaikie via cfe-commits
Awesome - should/does this mean stateless lambdas can be used in uninitialized contexts? std::set s; Would be kind of neat/handy (so you didn't have to pass in the comparator on construction, etc) On Thu, Sep 27, 2018 at 3:48 PM Richard Smith via cfe-commits < cfe-commits@lists.llvm.org> wrote:

[PATCH] D52731: [OpenMP] Simplify code for reductions on distribute directives, NFC.

2018-10-01 Thread Jonas Hahnfeld via Phabricator via cfe-commits
Hahnfeld created this revision. Hahnfeld added reviewers: ABataev, gtbercea. Herald added subscribers: cfe-commits, guansong. Only need to care about the 'distribute simd' case, all other composite directives are handled elsewhere. This was already reflected in the outer 'if' condition, so all oth

[PATCH] D52732: [OpenMP][NVPTX] Simplify codegen for orphaned parallel, NFCI.

2018-10-01 Thread Jonas Hahnfeld via Phabricator via cfe-commits
Hahnfeld created this revision. Hahnfeld added reviewers: ABataev, gtbercea. Herald added subscribers: cfe-commits, guansong, jholewinski. Worker threads fork off to the compiler generated worker function directly after entering the kernel function. Hence, there is no need to check whether the cur

[PATCH] D52733: [OpenMP][NVPTX] Avoid data sharing if in parallel region

2018-10-01 Thread Jonas Hahnfeld via Phabricator via cfe-commits
Hahnfeld created this revision. Hahnfeld added reviewers: gtbercea, ABataev. Herald added subscribers: cfe-commits, guansong, jholewinski. Previously the generated code only checked if the kernel is executing in SPMD mode. However a worker thread participating in a parallel region will never execu

[PATCH] D52441: [CodeGen] Update min-legal-vector width based on function argument and return types

2018-10-01 Thread Craig Topper via Phabricator via cfe-commits
craig.topper added a comment. Herald added a subscriber: arphaman. Ping https://reviews.llvm.org/D52441 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: r343279 - [cxx2a] P0624R2: Lambdas with no capture-default are

2018-10-01 Thread Richard Smith via cfe-commits
On Mon, 1 Oct 2018, 09:55 David Blaikie via cfe-commits, < cfe-commits@lists.llvm.org> wrote: > Awesome - should/does this mean stateless lambdas can be used in > uninitialized contexts? > > std::set })> s; > > Would be kind of neat/handy (so you didn't have to pass in the comparator > on construc

[PATCH] D52401: Remove redundant null pointer check in operator delete

2018-10-01 Thread Fangrui Song via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL343503: Remove redundant null pointer check in operator delete (authored by MaskRay, committed by ). Repository: rL LLVM https://reviews.llvm.org/D52401 Files: libcxx/trunk/src/new.cpp Index: libc

Re: r343279 - [cxx2a] P0624R2: Lambdas with no capture-default are

2018-10-01 Thread David Blaikie via cfe-commits
Excellent, excellent - thanks! On Mon, Oct 1, 2018 at 10:22 AM Richard Smith wrote: > On Mon, 1 Oct 2018, 09:55 David Blaikie via cfe-commits, < > cfe-commits@lists.llvm.org> wrote: > >> Awesome - should/does this mean stateless lambdas can be used in >> uninitialized contexts? >> >> std::set> }

[PATCH] D45776: [clang-tidy] Customize FileCheck prefix in check_clang-tidy.py

2018-10-01 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added a comment. Herald added a subscriber: arphaman. Did this intentionally omit the possibility to pass a group of prefixes, like `FileCheck` supports? Usefulness of this feature is somewhat penalized by this. Repository: rL LLVM https://reviews.llvm.org/D45776 __

[PATCH] D52730: [analysis] ConversionChecker: handle floating point

2018-10-01 Thread Umann Kristóf via Phabricator via cfe-commits
Szelethus added inline comments. Comment at: lib/StaticAnalyzer/Checkers/ConversionChecker.cpp:175 + + if (RepresentsUntilExp >= sizeof(unsigned long long)*8) { return false; How about `AC.getSizeType(AC.UnsignedLongLongTy))`? Comment at:

[PATCH] D52735: [analyzer][NFC] Refactor functions in PlistDiDiagnostics to take Preproc as parameter

2018-10-01 Thread Umann Kristóf via Phabricator via cfe-commits
Szelethus created this revision. Szelethus added reviewers: NoQ, george.karpenkov, dcoughlin. Herald added subscribers: cfe-commits, mikhail.ramalho, a.sidorin, szepet, xazax.hun, whisperity. This is patch is a preparation for the proposed inclusion of macro expansions in the plist output. Also

[PATCH] D52735: [analyzer][NFC] Refactor functions in PlistDiDiagnostics to take Preproc as parameter

2018-10-01 Thread George Karpenkov via Phabricator via cfe-commits
george.karpenkov requested changes to this revision. george.karpenkov added a comment. This revision now requires changes to proceed. Please reupload with context (-U999) Repository: rC Clang https://reviews.llvm.org/D52735 ___ cfe-commits mailin

[PATCH] D52731: [OpenMP] Simplify code for reductions on distribute directives, NFC.

2018-10-01 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev accepted this revision. ABataev added a comment. This revision is now accepted and ready to land. LG Repository: rC Clang https://reviews.llvm.org/D52731 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bi

[PATCH] D52377: [HIP] Support early finalization of device code for -fno-gpu-rdc

2018-10-01 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl updated this revision to Diff 167774. yaxunl retitled this revision from "[HIP] Support early finalization of device code" to "[HIP] Support early finalization of device code for -fno-gpu-rdc". yaxunl edited the summary of this revision. yaxunl added a comment. Uses -fno-gpu-rdc for early

[PATCH] D52735: [analyzer][NFC] Refactor functions in PlistDiagnostics to take Preproc as parameter

2018-10-01 Thread Umann Kristóf via Phabricator via cfe-commits
Szelethus updated this revision to Diff 167776. Szelethus retitled this revision from "[analyzer][NFC] Refactor functions in PlistDiDiagnostics to take Preproc as parameter" to "[analyzer][NFC] Refactor functions in PlistDiagnostics to take Preproc as parameter". Szelethus added a comment. Oops.

[PATCH] D52735: [analyzer][NFC] Refactor functions in PlistDiagnostics to take Preproc as parameter

2018-10-01 Thread George Karpenkov via Phabricator via cfe-commits
george.karpenkov accepted this revision. george.karpenkov added inline comments. This revision is now accepted and ready to land. Comment at: lib/StaticAnalyzer/Core/PlistDiagnostics.cpp:98 + + const SourceManager &SM = PP.getSourceManager(); + const LangOptions &LangOpts = PP.

[PATCH] D52676: [clang-format] tweaked another case of lambda formatting

2018-10-01 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir added a comment. Digging a bit further, seems like the behavior you're looking for could be achieved by setting the `AlignAfterOpenBracket` option to `DontAlign` or `AlwaysBreak`: % clang-format -style='{BasedOnStyle: google, AlignAfterOpenBracket: AlwaysBreak}' test.cc void f() {

[PATCH] D52735: [analyzer][NFC] Refactor functions in PlistDiagnostics to take Preproc as parameter

2018-10-01 Thread Umann Kristóf via Phabricator via cfe-commits
Szelethus added a comment. Would you be okay with me clang-formatting this file? I'm aware of a few people doing some work with this file, but the diff didn't seem too bad to cause any serious rebasing nightmares. https://reviews.llvm.org/D52735 _

[PATCH] D52735: [analyzer][NFC] Refactor functions in PlistDiagnostics to take Preproc as parameter

2018-10-01 Thread George Karpenkov via Phabricator via cfe-commits
george.karpenkov added a comment. Sorry no --- going through those while doing archaeology sucks. You could reformat your changed lines though. https://reviews.llvm.org/D52735 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm

[PATCH] D52735: [analyzer][NFC] Refactor functions in PlistDiagnostics to take Preproc as parameter

2018-10-01 Thread Umann Kristóf via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL343511: [analyzer][NFC] Refactor functions in PlistDiagnostics to take Preproc as… (authored by Szelethus, committed by ). Herald added a subscriber: llvm-commits. Changed prior to commit: https://revie

[PATCH] D52735: [analyzer][NFC] Refactor functions in PlistDiagnostics to take Preproc as parameter

2018-10-01 Thread Umann Kristóf via Phabricator via cfe-commits
Szelethus added a comment. Ah, okay, I'm fine with that. https://reviews.llvm.org/D52735 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

r343511 - [analyzer][NFC] Refactor functions in PlistDiagnostics to take Preproc as parameter

2018-10-01 Thread Kristof Umann via cfe-commits
Author: szelethus Date: Mon Oct 1 11:11:51 2018 New Revision: 343511 URL: http://llvm.org/viewvc/llvm-project?rev=343511&view=rev Log: [analyzer][NFC] Refactor functions in PlistDiagnostics to take Preproc as parameter This is patch is a preparation for the proposed inclusion of macro expansion

r343513 - [clang-format] Fix typo in comment, NFCI

2018-10-01 Thread Krasimir Georgiev via cfe-commits
Author: krasimir Date: Mon Oct 1 11:18:00 2018 New Revision: 343513 URL: http://llvm.org/viewvc/llvm-project?rev=343513&view=rev Log: [clang-format] Fix typo in comment, NFCI Modified: cfe/trunk/lib/Format/FormatToken.h Modified: cfe/trunk/lib/Format/FormatToken.h URL: http://llvm.org/view

[PATCH] D52137: Added warning for unary minus used with unsigned type

2018-10-01 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 updated this revision to Diff 167784. xbolva00 added a comment. Suggestions implemented https://reviews.llvm.org/D52137 Files: include/clang/Basic/DiagnosticSemaKinds.td lib/Sema/SemaChecking.cpp test/Sema/unary-minus-integer-impcast.c Index: test/Sema/unary-minus-integer-impca

[PATCH] D52441: [CodeGen] Update min-legal-vector width based on function argument and return types

2018-10-01 Thread Reid Kleckner via Phabricator via cfe-commits
rnk added a comment. Code looks fine, but attribute testing is always a pain. Comment at: test/CodeGen/aarch64-neon-3v.c:14 -// CHECK-LABEL: define <16 x i8> @test_vandq_s8(<16 x i8> %a, <16 x i8> %b) #0 { // CHECK: [[AND_I:%.*]] = and <16 x i8> %a, %b Th

[PATCH] D52676: [clang-format] tweaked another case of lambda formatting

2018-10-01 Thread Oleg Smolsky via Phabricator via cfe-commits
oleg.smolsky added a comment. In https://reviews.llvm.org/D52676#1251342, @krasimir wrote: > Digging a bit further, seems like the behavior you're looking for could be > achieved by setting the `AlignAfterOpenBracket` option to `DontAlign` or > `AlwaysBreak`: > > % clang-format -style='{Based

[PATCH] D52732: [OpenMP][NVPTX] Simplify codegen for orphaned parallel, NFCI.

2018-10-01 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev accepted this revision. ABataev added a comment. This revision is now accepted and ready to land. LG Repository: rC Clang https://reviews.llvm.org/D52732 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bi

[PATCH] D52598: [OpenCL] Fixed address space cast in C style cast of C++ parsing

2018-10-01 Thread John McCall via Phabricator via cfe-commits
rjmccall added inline comments. Comment at: lib/Sema/SemaCast.cpp:2283 + const QualType &SrcType, + const QualType &DestType) { + // OpenCL v1 s6.5: Casting a pointer to address space A to a pointer to ---

[PATCH] D52438: [CUDA] Add basic support for CUDA-10.0

2018-10-01 Thread Artem Belevich via Phabricator via cfe-commits
tra closed this revision. tra added a comment. Landed in https://reviews.llvm.org/rC342924 https://reviews.llvm.org/D52438 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D52738: [AST] Pack the bit-fields of FunctionProtoType into Type.

2018-10-01 Thread Bruno Ricci via Phabricator via cfe-commits
riccibruno created this revision. riccibruno added a reviewer: rjmccall. riccibruno added a project: clang. Herald added a subscriber: cfe-commits. Move the bit-fields of FunctionProtoType into FunctionTypeBitfields. This cuts the size of FunctionProtoType by a pointer. Additionally use llvm::Tra

[PATCH] D52674: [AST] Add Obj-C discriminator to MS ABI RTTI

2018-10-01 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. Conceptually this seems fine, but I think it would be good to stop and make sure we're using a consistent style when mangling extensions. Currently it feels like every patch to add a Clang extension to the Microsoft mangling ends up inventing its own rules and crossin

[PATCH] D52733: [OpenMP][NVPTX] Avoid data sharing if in parallel region

2018-10-01 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added a comment. It might lead to increased register pressure, isn't it? Currently, I'm trying to emit the code that can be optimized out and, thus, may decrease the register pressure. That's why I tried to reduce the number of the runtime checks. Repository: rC Clang https://review

[PATCH] D49466: Initial implementation of -fmacro-prefix-map and -ffile-prefix-map

2018-10-01 Thread Joerg Sonnenberger via Phabricator via cfe-commits
joerg added inline comments. Comment at: lib/Lex/PPMacroExpansion.cpp:1460 + for (const auto &Entry : MacroPrefixMap) +if (Path.startswith(Entry.first)) + return (Twine(Entry.second) + Path.substr(Entry.first.size())).str(); Lekensteyn wrote: > dankm wr

[PATCH] D50631: [AST] Stuff more data into FunctionTypeBitfields

2018-10-01 Thread Bruno Ricci via Phabricator via cfe-commits
riccibruno abandoned this revision. riccibruno added a comment. Superseded by https://reviews.llvm.org/D52738. Repository: rC Clang https://reviews.llvm.org/D50631 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-

r343517 - [clang-format] Update comment, NFCI

2018-10-01 Thread Krasimir Georgiev via cfe-commits
Author: krasimir Date: Mon Oct 1 11:41:21 2018 New Revision: 343517 URL: http://llvm.org/viewvc/llvm-project?rev=343517&view=rev Log: [clang-format] Update comment, NFCI The initializer of `ParameterCount` was updated from 1 to 0 in r175165, but the comment was never touched: https://github.com/

[PATCH] D52674: [AST] Add Obj-C discriminator to MS ABI RTTI

2018-10-01 Thread Shoaib Meenai via Phabricator via cfe-commits
smeenai added a comment. In https://reviews.llvm.org/D52674#1251419, @rjmccall wrote: > Conceptually this seems fine, but I think it would be good to stop and make > sure we're using a consistent style when mangling extensions. Currently it > feels like every patch to add a Clang extension to

[PATCH] D52738: [AST] Pack the bit-fields of FunctionProtoType into Type.

2018-10-01 Thread John McCall via Phabricator via cfe-commits
rjmccall accepted this revision. rjmccall added a comment. This revision is now accepted and ready to land. The `reinterpret_cast` is legal because it's dynamic storage that's never actually accessed as an `ExceptionType`. IIRC there are reasonable-sounding strict-aliasing arguments about the v

r343518 - Distinguish `__block` variables that are captured by escaping blocks

2018-10-01 Thread Akira Hatanaka via cfe-commits
Author: ahatanak Date: Mon Oct 1 11:50:14 2018 New Revision: 343518 URL: http://llvm.org/viewvc/llvm-project?rev=343518&view=rev Log: Distinguish `__block` variables that are captured by escaping blocks from those that aren't. This patch changes the way __block variables that aren't captured by

[PATCH] D50488: [Analyzer] Checker for non-determinism caused by sorting of pointer-like elements

2018-10-01 Thread Mandeep Singh Grang via Phabricator via cfe-commits
mgrang added a comment. In https://reviews.llvm.org/D50488#1246321, @whisperity wrote: > Hey @mgrang! Let's see some results on some projects and answer NoQ's > comment, then I think we can put this in for all the world to see. Was busy with CppCon 2018 in the past couple of weeks so could not

[PATCH] D52722: [analyzer] Move StdCLibraryFunctions to apiModeling

2018-10-01 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ accepted this revision. NoQ added a comment. This revision is now accepted and ready to land. Aha, ok, `apiModeling` is on by default, like `core`. Cool, thanks! Repository: rC Clang https://reviews.llvm.org/D52722 ___ cfe-commits mailing lis

[PATCH] D52610: [Esan] Port cache frag to FreeBSD

2018-10-01 Thread David CARLIER via Phabricator via cfe-commits
devnexen added a comment. The compiler-rt part had been committed. Repository: rC Clang https://reviews.llvm.org/D52610 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D52742: [analyzer][WIP] Add macro expansions to the plist output

2018-10-01 Thread Umann Kristóf via Phabricator via cfe-commits
Szelethus created this revision. Szelethus added reviewers: NoQ, george.karpenkov, xazax.hun, rnkovacs, dcoughlin, MTC, dkrupp. Herald added subscribers: cfe-commits, mikhail.ramalho, a.sidorin, szepet, whisperity. This is the implementation of the inclusion of macro expansions into the plist o

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

2018-10-01 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added a comment. @Szelethus, thank you a lot for covering this review! @mate1214, yes, please please split this up, like @Szelethus described. At the moment this patch is not only huge, it is very under-tested. Eg., the Visitor promises support for C++ temporaries (which can potentially be

[PATCH] D52695: [clang][Parse] Diagnose useless null statements (PR39111)

2018-10-01 Thread Eli Friedman via Phabricator via cfe-commits
efriedma added a comment. Again, I'm not sure we really want this... we don't really like adding new off-by-default warnings, and we don't usually add diagnostics to enforce style. Comment at: include/clang/Basic/DiagnosticGroups.td:163 def CXX11ExtraSemi : DiagGroup<"c++11-e

[PATCH] D52538: [MinGW] Allow using ASan

2018-10-01 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo added a comment. Ping Repository: rC Clang https://reviews.llvm.org/D52538 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D52742: [analyzer][WIP] Add macro expansions to the plist output

2018-10-01 Thread Umann Kristóf via Phabricator via cfe-commits
Szelethus added a reviewer: whisperity. Szelethus added a comment. We need your all-seeing hawk eye! Repository: rC Clang https://reviews.llvm.org/D52742 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailma

Re: r342827 - Fix modules build with shared library.

2018-10-01 Thread David Blaikie via cfe-commits
I can't really reproduce this - when I try to build clang/llvm with LLVM_ENABLE_MODULES in CMake I'm still seeing an error I reported March on a cfe-dev thread - something to do with unique_ptr instantiations for MappedBlockStream in the PDB parsing code. So, I'm wondering what error you hit, Eric

[PATCH] D49466: Initial implementation of -fmacro-prefix-map and -ffile-prefix-map

2018-10-01 Thread Peter Wu via Phabricator via cfe-commits
Lekensteyn added inline comments. Comment at: lib/Lex/PPMacroExpansion.cpp:1460 + for (const auto &Entry : MacroPrefixMap) +if (Path.startswith(Entry.first)) + return (Twine(Entry.second) + Path.substr(Entry.first.size())).str(); joerg wrote: > Lekenste

[PATCH] D52538: [MinGW] Allow using ASan

2018-10-01 Thread Reid Kleckner via Phabricator via cfe-commits
rnk added inline comments. Comment at: lib/Driver/ToolChain.cpp:370-373 + const char *Suffix = Shared ? (Triple.isWindowsGNUEnvironment() + ? ".dll.a" + : Triple.isOSWindows() ? ".lib" : ".so")

[clang-tools-extra] r343526 - [clangd] exclude check-clangd from check-all, fix buildbot failure.

2018-10-01 Thread Haojian Wu via cfe-commits
Author: hokein Date: Mon Oct 1 13:21:41 2018 New Revision: 343526 URL: http://llvm.org/viewvc/llvm-project?rev=343526&view=rev Log: [clangd] exclude check-clangd from check-all, fix buildbot failure. check-clangd is included via check-clang-tools, otherwise we will run two instances of check-cla

[clang-tools-extra] r343528 - [clang-tidy] Build it even without static analyzer

2018-10-01 Thread Stephen Kelly via cfe-commits
Author: steveire Date: Mon Oct 1 13:24:22 2018 New Revision: 343528 URL: http://llvm.org/viewvc/llvm-project?rev=343528&view=rev Log: [clang-tidy] Build it even without static analyzer Conditionally compile the parts of clang-tidy which depend on the static analyzer. Funnily enough, I made the

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

2018-10-01 Thread Stephen Kelly via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL343528: [clang-tidy] Build it even without static analyzer (authored by steveire, committed by ). Herald added a subscriber: llvm-commits. Changed prior to commit: https://reviews.llvm.org/D52334?vs=167

[PATCH] D52664: Update CMakeLists.txt snippet so that example compiles

2018-10-01 Thread Stephen Kelly via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC343530: Update CMakeLists.txt snippet so that example compiles (authored by steveire, committed by ). Changed prior to commit: https://reviews.llvm.org/D52664?vs=167521&id=167816#toc Repository: rC C

r343530 - Update CMakeLists.txt snippet so that example compiles

2018-10-01 Thread Stephen Kelly via cfe-commits
Author: steveire Date: Mon Oct 1 13:28:07 2018 New Revision: 343530 URL: http://llvm.org/viewvc/llvm-project?rev=343530&view=rev Log: Update CMakeLists.txt snippet so that example compiles Summary: Previous to this the example didn't work out of the box, it seems some cmake config changed betwe

[PATCH] D52664: Update CMakeLists.txt snippet so that example compiles

2018-10-01 Thread Stephen Kelly via Phabricator via cfe-commits
steveire added a comment. Done! Thanks for the contribution! Repository: rC Clang https://reviews.llvm.org/D52664 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

r343531 - Revert r343518.

2018-10-01 Thread Akira Hatanaka via cfe-commits
Author: ahatanak Date: Mon Oct 1 13:29:34 2018 New Revision: 343531 URL: http://llvm.org/viewvc/llvm-project?rev=343531&view=rev Log: Revert r343518. Bots are still failing. http://lab.llvm.org:8011/builders/sanitizer-x86_64-linux-fast/builds/24420 http://lab.llvm.org:8011/builders/llvm-clang-x

[clang-tools-extra] r343532 - [clang-query] Sort command options

2018-10-01 Thread Stephen Kelly via cfe-commits
Author: steveire Date: Mon Oct 1 13:34:15 2018 New Revision: 343532 URL: http://llvm.org/viewvc/llvm-project?rev=343532&view=rev Log: [clang-query] Sort command options Modified: clang-tools-extra/trunk/clang-query/QueryParser.cpp Modified: clang-tools-extra/trunk/clang-query/QueryParser.cp

[clang-tools-extra] r343533 - [clang-query] Add missing 'l' command handling

2018-10-01 Thread Stephen Kelly via cfe-commits
Author: steveire Date: Mon Oct 1 13:34:21 2018 New Revision: 343533 URL: http://llvm.org/viewvc/llvm-project?rev=343533&view=rev Log: [clang-query] Add missing 'l' command handling The `let` command was added in commit 045c15ba (Add new 'let' command to bind arbitrary values into constants., 201

[PATCH] D52538: [MinGW] Allow using ASan

2018-10-01 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo added inline comments. Comment at: lib/Driver/ToolChain.cpp:370-373 + const char *Suffix = Shared ? (Triple.isWindowsGNUEnvironment() + ? ".dll.a" + : Triple.isOSWindows() ? ".lib" : ".so")

[PATCH] D52538: [MinGW] Allow using ASan

2018-10-01 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo updated this revision to Diff 167817. mstorsjo added a comment. Clarified the comment about shared MSVCRT, moved handling of `.dll.a` into a separate condition afterwards. https://reviews.llvm.org/D52538 Files: lib/Driver/ToolChain.cpp lib/Driver/ToolChains/MinGW.cpp lib/Driver/

[PATCH] D52441: [CodeGen] Update min-legal-vector width based on function argument and return types

2018-10-01 Thread Eric Christopher via Phabricator via cfe-commits
echristo added a comment. Couple of comments/questions: a) How do you want these attributes to be handled in merging/inlining? Also, are they a failure on module linking? In general, how do they work with LTO? b) Could use some more comments when we're adding/merging the attributes in IR genera

[clang-tools-extra] r343535 - [clang-query] Add missing quit test

2018-10-01 Thread Stephen Kelly via cfe-commits
Author: steveire Date: Mon Oct 1 13:45:39 2018 New Revision: 343535 URL: http://llvm.org/viewvc/llvm-project?rev=343535&view=rev Log: [clang-query] Add missing quit test Modified: clang-tools-extra/trunk/unittests/clang-query/QueryParserTest.cpp Modified: clang-tools-extra/trunk/unittests/c

[clang-tools-extra] r343536 - [clang-query] Test non-code-completion on single letter shortcuts

2018-10-01 Thread Stephen Kelly via cfe-commits
Author: steveire Date: Mon Oct 1 13:45:44 2018 New Revision: 343536 URL: http://llvm.org/viewvc/llvm-project?rev=343536&view=rev Log: [clang-query] Test non-code-completion on single letter shortcuts Modified: clang-tools-extra/trunk/unittests/clang-query/QueryParserTest.cpp Modified: clang

[PATCH] D52538: [MinGW] Allow using ASan

2018-10-01 Thread Reid Kleckner via Phabricator via cfe-commits
rnk added a comment. Regarding ubsan, it probably works, I haven't tested it though. https://reviews.llvm.org/D52538 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D52538: [MinGW] Allow using ASan

2018-10-01 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 https://reviews.llvm.org/D52538 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D52746: [clang-query] Add single-letter 'q' alias for 'quit'

2018-10-01 Thread Stephen Kelly via Phabricator via cfe-commits
steveire created this revision. steveire added reviewers: alexfh, aaron.ballman. Herald added a subscriber: cfe-commits. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D52746 Files: clang-query/QueryParser.cpp Index: clang-query/QueryParser.cpp

[PATCH] D52538: [MinGW] Allow using ASan

2018-10-01 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo added a comment. In https://reviews.llvm.org/D52538#1251620, @rnk wrote: > Regarding ubsan, it probably works, I haven't tested it though. Ok, thanks. I guess ubsan doesn't need quite as intricate integration with the platform as asan does anyway. https://reviews.llvm.org/D52538

r343537 - [MinGW] Allow using ASan

2018-10-01 Thread Martin Storsjo via cfe-commits
Author: mstorsjo Date: Mon Oct 1 13:53:25 2018 New Revision: 343537 URL: http://llvm.org/viewvc/llvm-project?rev=343537&view=rev Log: [MinGW] Allow using ASan Linking to ASan for MinGW is similar to MSVC, but MinGW always links the MSVCRT dynamically, so there is only one of the MSVC cases to co

[PATCH] D52538: [MinGW] Allow using ASan

2018-10-01 Thread Martin Storsjö via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL343537: [MinGW] Allow using ASan (authored by mstorsjo, committed by ). Herald added a subscriber: llvm-commits. Changed prior to commit: https://reviews.llvm.org/D52538?vs=167817&id=167823#toc Reposit

[PATCH] D52746: [clang-query] Add single-letter 'q' alias for 'quit'

2018-10-01 Thread Stephen Kelly via Phabricator via cfe-commits
steveire updated this revision to Diff 167825. steveire added a comment. Add test Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D52746 Files: clang-query/QueryParser.cpp unittests/clang-query/QueryParserTest.cpp Index: unittests/clang-query/QueryParserTest.cpp ===

[PATCH] D52529: [Frontend] Simplify -print-decl-contexts with DeclNodes.inc

2018-10-01 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. A gentle ping :) Repository: rC Clang https://reviews.llvm.org/D52529 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] r343538 - Sort expected test output after previous commit

2018-10-01 Thread Stephen Kelly via cfe-commits
Author: steveire Date: Mon Oct 1 14:10:30 2018 New Revision: 343538 URL: http://llvm.org/viewvc/llvm-project?rev=343538&view=rev Log: Sort expected test output after previous commit Modified: clang-tools-extra/trunk/unittests/clang-query/QueryParserTest.cpp Modified: clang-tools-extra/trunk

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

2018-10-01 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. I think going back to the old mangling makes sense. Regarding memory management, I assume that the C++ code is just forward declaring objective C class and interface types so it can pass them around

[PATCH] D52750: [Diagnostics] Check for integer overflow in array size expressions

2018-10-01 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 created this revision. xbolva00 added a reviewer: rsmith. Herald added a subscriber: cfe-commits. Fixes PR27439 Repository: rC Clang https://reviews.llvm.org/D52750 Files: lib/Sema/SemaType.cpp test/Sema/integer-overflow.c Index: test/Sema/integer-overflow.c ==

[PATCH] D52529: [Frontend] Simplify -print-decl-contexts with DeclNodes.inc

2018-10-01 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added a comment. Do we need `-print-decl-contexts` at all? It's not exposed by the driver, not tested, not documented, has a very strange output format (the bracketing character supplies some information about the kind of declaration, but it's not clear *what* information), and it doesn'

[PATCH] D52750: [Diagnostics] Check for integer overflow in array size expressions

2018-10-01 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 added a comment. Seems it crashes with test suite. Looking at it. Repository: rC Clang https://reviews.llvm.org/D52750 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D52750: [Diagnostics] Check for integer overflow in array size expressions

2018-10-01 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 updated this revision to Diff 167835. xbolva00 added a comment. Fixed crash https://reviews.llvm.org/D52750 Files: lib/Sema/SemaType.cpp test/Sema/integer-overflow.c Index: test/Sema/integer-overflow.c === --- test/S

[PATCH] D52746: [clang-query] Add single-letter 'q' alias for 'quit'

2018-10-01 Thread Umann Kristóf via Phabricator via cfe-commits
Szelethus added a comment. I'd personally really enjoy this feature. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D52746 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-com

Re: r342827 - Fix modules build with shared library.

2018-10-01 Thread Richard Smith via cfe-commits
This looks like the wrong fix to me, but I don't really know enough about what's being done with ExprMutationAnalyzer to have an opinion on what the right fix is. Shuai, what is the goal here? Why is this code being moved to Analysis/? Do you intend to call it from the compiler frontend at some po

r343542 - Distinguish `__block` variables that are captured by escaping blocks

2018-10-01 Thread Akira Hatanaka via cfe-commits
Author: ahatanak Date: Mon Oct 1 14:51:28 2018 New Revision: 343542 URL: http://llvm.org/viewvc/llvm-project?rev=343542&view=rev Log: Distinguish `__block` variables that are captured by escaping blocks from those that aren't. This patch changes the way __block variables that aren't captured by

[PATCH] D52529: [Frontend] Simplify -print-decl-contexts with DeclNodes.inc

2018-10-01 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay updated this revision to Diff 167836. MaskRay added a comment. Delete -print-decl-contexts Repository: rC Clang https://reviews.llvm.org/D52529 Files: include/clang/Driver/CC1Options.td include/clang/Frontend/ASTConsumers.h include/clang/Frontend/FrontendOptions.h lib/Fronten

[PATCH] D52750: [Diagnostics] Check for integer overflow in array size expressions

2018-10-01 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added a comment. We're going to try evaluating the array size anyway (in `isArraySizeVLA`). It would be much better to produce the overflow warnings as part of that evaluation rather than adding an extra evaluation step to produce them. https://reviews.llvm.org/D52750 ___

[PATCH] D52529: [Frontend] Delete -print-decl-contexts

2018-10-01 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay updated this revision to Diff 167837. MaskRay retitled this revision from "[Frontend] Simplify -print-decl-contexts with DeclNodes.inc" to "[Frontend] Delete -print-decl-contexts". MaskRay edited the summary of this revision. MaskRay removed a reviewer: clang. MaskRay added a comment. .

Re: r342827 - Fix modules build with shared library.

2018-10-01 Thread Shuai Wang via cfe-commits
George wanted to use it from clang (or, at least can't use from anything from clang-tidy.) I was actually assuming the intended usage is from some tooling instead of the frontend itself, but I never checked with George. Personally I don't think ExprMutationAnalyzer should be used in anywhere other

[PATCH] D52750: [Diagnostics] Check for integer overflow in array size expressions

2018-10-01 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 updated this revision to Diff 167840. xbolva00 added a comment. - Move code as suggested https://reviews.llvm.org/D52750 Files: lib/Sema/SemaType.cpp test/Sema/integer-overflow.c Index: test/Sema/integer-overflow.c =

[PATCH] D52137: Added warning for unary minus used with unsigned type

2018-10-01 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! Comment at: lib/Sema/SemaChecking.cpp:10899 + if (TargetRange.Width > SourceRange.Width) +if (auto *UO = dyn_cast(E)) Add braces to these oute

[PATCH] D52730: [analysis] ConversionChecker: handle floating point

2018-10-01 Thread Umann Kristóf via Phabricator via cfe-commits
Szelethus added a subscriber: whisperity. Szelethus added inline comments. Comment at: lib/StaticAnalyzer/Checkers/ConversionChecker.cpp:175 + + if (RepresentsUntilExp >= sizeof(unsigned long long)*8) { return false; Szelethus wrote: > How about `AC.getSize

[PATCH] D52750: [Diagnostics] Check for integer overflow in array size expressions

2018-10-01 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added a comment. This is still evaluating the expression twice. To evaluate it only once, you'll need to sink the checks into `Sema::VerifyIntegerConstantExpression`'s call to `EvaluateKnownConstInt`. (That should also remove the redundant diagnostics noise in the language modes where si

[PATCH] D52529: [Frontend] Delete -print-decl-contexts

2018-10-01 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. Looks good to me. Please first mail cfe-dev announcing this change and wait a day or so for anyone using this feature to speak up before committing. Comment at: test/Coverag

[PATCH] D52529: [Frontend] Delete -print-decl-contexts

2018-10-01 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay updated this revision to Diff 167842. MaskRay added a comment. Coverage/ast-printing.{c,cpp} contain other dumping tests. Don't delete them Repository: rC Clang https://reviews.llvm.org/D52529 Files: include/clang/Driver/CC1Options.td include/clang/Frontend/ASTConsumers.h inclu

[PATCH] D52730: [analysis] ConversionChecker: handle floating point

2018-10-01 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added inline comments. Comment at: lib/StaticAnalyzer/Checkers/ConversionChecker.cpp:175 + + if (RepresentsUntilExp >= sizeof(unsigned long long)*8) { return false; Szelethus wrote: > Szelethus wrote: > > How about `AC.getSizeType(AC.UnsignedLongLongTy)

[PATCH] D52248: [SEMA] ignore duplicate declaration specifiers from typeof exprs

2018-10-01 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers marked an inline comment as done. nickdesaulniers added inline comments. Comment at: test/FixIt/fixit.c:50 -// CHECK: const typedef int int_t; -const typedef typedef int int_t; // expected-warning {{duplicate 'typedef'}} - nickdesaulniers wrote: >

[PATCH] D52248: [SEMA] ignore duplicate declaration specifiers from typeof exprs

2018-10-01 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers updated this revision to Diff 167843. nickdesaulniers marked 2 inline comments as done. nickdesaulniers added a comment. - add back test for typedef typedef - add test for dupl _Atomic and restrict Repository: rC Clang https://reviews.llvm.org/D52248 Files: include/clang/Ba

[PATCH] D52248: [SEMA] ignore duplicate declaration specifiers from typeof exprs

2018-10-01 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers updated this revision to Diff 167845. nickdesaulniers marked an inline comment as done. nickdesaulniers added a comment. - move back untouched test case Repository: rC Clang https://reviews.llvm.org/D52248 Files: include/clang/Basic/DiagnosticSemaKinds.td lib/Parse/ParseD

[PATCH] D52751: Allow comments with '#' in dynamic AST Matchers

2018-10-01 Thread Stephen Kelly via Phabricator via cfe-commits
steveire created this revision. steveire added a reviewer: aaron.ballman. Herald added a subscriber: cfe-commits. This is necessary for clang-query to be able to handle comments. Repository: rC Clang https://reviews.llvm.org/D52751 Files: lib/ASTMatchers/Dynamic/Parser.cpp unittests/ASTM

<    1   2   3   >