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

2018-10-01 Thread Dávid Bolvanský via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC343560: Added warning for unary minus used with unsigned type (authored by xbolva00, committed by ). Repository: rC Clang https://reviews.llvm.org/D52137 Files: include/clang/Basic/DiagnosticSemaKin

r343560 - Added warning for unary minus used with unsigned type

2018-10-01 Thread David Bolvansky via cfe-commits
Author: xbolva00 Date: Mon Oct 1 23:02:30 2018 New Revision: 343560 URL: http://llvm.org/viewvc/llvm-project?rev=343560&view=rev Log: Added warning for unary minus used with unsigned type Summary: Inspired by MSVC, which found some occurrences of this expression on our code base. Fixes PR38950

[PATCH] D52412: OpenCL: Mark printf format string argument

2018-10-01 Thread Matt Arsenault via Phabricator via cfe-commits
arsenm added a comment. ping https://reviews.llvm.org/D52412 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D52320: AMDGPU: add __builtin_amdgcn_update_dpp

2018-10-01 Thread Matt Arsenault via Phabricator via cfe-commits
arsenm added inline comments. Comment at: lib/CodeGen/CGBuiltin.cpp:11313-11315 + case AMDGPU::BI__builtin_amdgcn_update_dpp: { +llvm::SmallVector Args; +for (unsigned I = 0; I != 6; ++I) b-sumner wrote: > arsenm wrote: > > The only difference between th

[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 167869. xbolva00 marked an inline comment as done. 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-impcast.c

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

2018-10-01 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 marked an inline comment as done. xbolva00 added inline comments. Comment at: test/Sema/unary-minus-integer-impcast-2.c:1 +// RUN: %clang_cc1 %s -verify -Wconversion -fsyntax-only -triple i386-pc-linux-gnu + rsmith wrote: > You can combine the two tests

[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 167868. xbolva00 added a comment. - tests merged 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-impcast.c

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

2018-10-01 Thread Artem Dergachev via Phabricator via cfe-commits
mith disagrees though, and he has a point: http://lists.llvm.org/pipermail/cfe-commits/Week-of-Mon-20181001/245294.html Let's keep this in `lib/StaticAnalyzer` then! Repository: rC Clang https://reviews.llvm.org/D52390 ___ cfe-commits maili

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

2018-10-01 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added inline comments. Comment at: test/Sema/unary-minus-integer-impcast-2.c:1 +// RUN: %clang_cc1 %s -verify -Wconversion -fsyntax-only -triple i386-pc-linux-gnu + You can combine the two tests together into a single file using a #ifdef to detect which

r343556 - [CodeGen] Before entering the loop that copies a non-trivial array field

2018-10-01 Thread Akira Hatanaka via cfe-commits
Author: ahatanak Date: Mon Oct 1 18:00:44 2018 New Revision: 343556 URL: http://llvm.org/viewvc/llvm-project?rev=343556&view=rev Log: [CodeGen] Before entering the loop that copies a non-trivial array field of a non-trivial C struct, copy the preceding trivial fields that haven't been copied. Th

[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. In https://reviews.llvm.org/D52674#1251439, @smeenai wrote: > 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.

[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 167861. xbolva00 added a comment. - Addressed comments, added tests https://reviews.llvm.org/D52137 Files: include/clang/Basic/DiagnosticSemaKinds.td lib/Sema/SemaChecking.cpp test/Sema/unary-minus-integer-impcast-2.c test/Sema/unary-minus-integer-

[PATCH] D52398: Thread safety analysis: Unwrap __builtin_expect in getTrylockCallExpr

2018-10-01 Thread Aaron Puchert via Phabricator via cfe-commits
aaronpuchert added a comment. @delesley Any objections to this? It's certainly useful for our code base, because our `assert`-like macros use `__builtin_expect`, but I'm not sure if that applies to the general public. Repository: rC Clang https://reviews.llvm.org/D52398 _

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

2018-10-01 Thread Aaron Puchert via Phabricator via cfe-commits
aaronpuchert marked 2 inline comments as done. aaronpuchert added a comment. Since the (remaining) arguments are examined in a separate function, I thought I'd eliminate the boolean variables in `VisitCallExpr`. Apparently I prefer control flow over booleans, but if you disagree I can obviously

Re: r342827 - Fix modules build with shared library.

2018-10-01 Thread Eric Fiselier via cfe-commits
I was building with -DLLVM_ENABLE_MODULES=ON -DBUILD_SHARED_LIBS=ON. I think that's enough to trigger it? /Eric On Mon, Oct 1, 2018 at 4:13 PM David Blaikie wrote: > 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 re

[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 167858. xbolva00 added a comment. fixed extra new line https://reviews.llvm.org/D52750 Files: lib/Sema/SemaType.cpp test/Sema/integer-overflow.c Index: test/Sema/integer-overflow.c === -

[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. I have not found a way yet since EvaluateForOverflow returns nothing so I don't know how to check whether there was overflow or not. Uploaded alternative patch which passes test suite and has no double warning issue. https://reviews.llvm.org/D52750 ___

[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 167857. https://reviews.llvm.org/D52750 Files: lib/Sema/SemaExpr.cpp lib/Sema/SemaType.cpp test/Sema/integer-overflow.c Index: test/Sema/integer-overflow.c === --- test/Sema/integer-over

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

2018-10-01 Thread Aaron Puchert via Phabricator via cfe-commits
aaronpuchert updated this revision to Diff 167856. aaronpuchert marked 4 inline comments as done. aaronpuchert added a comment. Moved iterator shifting to VisitCallExpr, eliminated boolean variables, and minor corrections as suggested in the review. There remains no intended functional change to

Re: r342827 - Fix modules build with shared library.

2018-10-01 Thread Richard Smith via cfe-commits
On Mon, 1 Oct 2018 at 16:10, George Karpenkov via cfe-commits < cfe-commits@lists.llvm.org> wrote: > Hi Richard, > > On Oct 1, 2018, at 2:50 PM, Richard Smith via cfe-commits < > cfe-commits@lists.llvm.org> wrote: > > This looks like the wrong fix to me, but I don't really know enough about > what

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

2018-10-01 Thread Gor Nishanov via Phabricator via cfe-commits
GorNishanov accepted this revision. GorNishanov added a comment. LGTM! Thank you for doing this. Repository: rC Clang https://reviews.llvm.org/D51741 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/li

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

2018-10-01 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers added inline comments. Comment at: lib/Sema/DeclSpec.cpp:441-442 else -DiagID = IsExtension ? diag::ext_duplicate_declspec : - diag::warn_duplicate_declspec; +DiagID = IsExtension ? diag::ext_duplicate_declspec +

Re: r342827 - Fix modules build with shared library.

2018-10-01 Thread George Karpenkov via cfe-commits
Hi Richard, > On Oct 1, 2018, at 2:50 PM, Richard Smith via cfe-commits > wrote: > > 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

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

2018-10-01 Thread Artem Belevich via Phabricator via cfe-commits
tra added inline comments. Comment at: include/clang/Driver/Options.td:587-589 +def fgpu_rdc : Flag<["-"], "fgpu-rdc">, Flags<[CC1Option]>, HelpText<"Generate relocatable device code, also known as separate compilation mode.">; +def fno_gpu_rdc : Flag<["-"], "fno-gpu-rdc">; -

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

2018-10-01 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added a comment. Downgrading the C89 warning for duplicate qualifiers from typedefs / __typeof from `ExtWarn` to `Extension` seems very reasonable to me. However, I don't see a justification for removing the warning for duplicate explicit (non-typedef) qualifiers in C99, nor for downgrad

[PATCH] D52754: [clang-doc] Clean up Markdown output

2018-10-01 Thread Julie Hockett via Phabricator via cfe-commits
juliehockett created this revision. juliehockett added reviewers: jakehehrlich, leonardchan, lebedev.ri. juliehockett added a project: clang-tools-extra. Make the output for the MDGenerator cleaner and more readable. https://reviews.llvm.org/D52754 Files: clang-tools-extra/clang-doc/MDGenerat

[PATCH] D52753: [tooling] Create executor by name

2018-10-01 Thread Julie Hockett via Phabricator via cfe-commits
juliehockett created this revision. juliehockett added a reviewer: ioeric. juliehockett added a project: clang. Allow creation of a ToolExecutor given a name and a set of parsed options. This is useful in the case where the calling tool always wants to use a particular non-default implementation

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

2018-10-01 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay marked 3 inline comments as done. MaskRay added a comment. In https://reviews.llvm.org/D52529#1251760, @rsmith wrote: > 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. Thanks! Sent ou

[PATCH] D52058: Add Parameters to DW_AT_name Attribute of Template Variables

2018-10-01 Thread Matthew Voss via Phabricator via cfe-commits
ormris updated this revision to Diff 167849. ormris added a comment. - Clarify CGDebugInfo::CollectVarTemplateParams Repository: rC Clang https://reviews.llvm.org/D52058 Files: lib/CodeGen/CGDebugInfo.cpp lib/CodeGen/CGDebugInfo.h test/CodeGenCXX/debug-info-template-member.cpp Index:

[PATCH] D52752: [clang-query] Add comment token handling

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

[PATCH] D52752: [clang-query] Add comment token handling

2018-10-01 Thread Stephen Kelly via Phabricator via cfe-commits
steveire created this revision. steveire added a reviewer: aaron.ballman. Herald added subscribers: cfe-commits, mgorny. It is possible to pass a file of commands to clang-query using the command line option -f or --preload. Make it possible to write comments in such files. Repository: rCTE C

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

2018-10-01 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added a comment. Like Eli, I don't see much value in this warning. But it doesn't seem much different from `-Wextra-semi` in that regard for languages in which such extra semicolons are generally valid -- I expect both warnings will generally diagnose typos and little else. Does this wa

[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

[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] 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 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] 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] 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] 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] 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] 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] 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] 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 =

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] 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. .

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

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

[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

[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] 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] 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 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] 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

[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] 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

[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] 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

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
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

[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 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] 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

[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] 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

[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] 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")

[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

[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

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

[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

[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

[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

[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

[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")

[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

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] 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

[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] 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] 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] 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] 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] 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] 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

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] 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

[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

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] 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-

[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] 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] 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] 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] 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 ---

  1   2   3   >