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

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

[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

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

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

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

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

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

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

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

<    1   2   3