[PATCH] D45401: Fix 31480 - warn more aggressively when assignments get used as a boolean values

2018-04-06 Thread Will Song via Phabricator via cfe-commits
incertia updated this revision to Diff 141477. incertia added a comment. Pulled the check outside of the case statement. https://reviews.llvm.org/D45401 Files: lib/Sema/SemaExpr.cpp lib/Sema/SemaExprCXX.cpp Index: lib/Sema/SemaExprCXX.cpp ==

[PATCH] D45401: Fix 31480 - warn more aggressively when assignments get used as a boolean values

2018-04-06 Thread Will Song via Phabricator via cfe-commits
incertia created this revision. incertia added reviewers: rjmccall, rsmith. incertia added a project: clang. Herald added a subscriber: cfe-commits. To my understanding, the contents of a condition will always be implicitly casted to an rvalue before evaluation. Thus, moving the check to Perform

[libcxx] r329484 - Use void() to create a void expression type

2018-04-06 Thread Eric Fiselier via cfe-commits
Author: ericwf Date: Fri Apr 6 21:28:11 2018 New Revision: 329484 URL: http://llvm.org/viewvc/llvm-project?rev=329484&view=rev Log: Use void() to create a void expression type Modified: libcxx/trunk/include/compare Modified: libcxx/trunk/include/compare URL: http://llvm.org/viewvc/llvm-pro

r329481 - Sort source lists in lib/StaticAnalyzer.

2018-04-06 Thread Nico Weber via cfe-commits
Author: nico Date: Fri Apr 6 21:25:01 2018 New Revision: 329481 URL: http://llvm.org/viewvc/llvm-project?rev=329481&view=rev Log: Sort source lists in lib/StaticAnalyzer. Modified: cfe/trunk/lib/StaticAnalyzer/Core/CMakeLists.txt cfe/trunk/lib/StaticAnalyzer/Frontend/CMakeLists.txt Modi

[PATCH] D45382: [CodeGen] Avoid destructing a struct type that has already been destructed by a delegated constructor

2018-04-06 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. If that's the problem, then I think the right design is for CallArg to include an optional cleanup reference for a cleanup that can be deactivated at the instant of the call (we should assert that this exists for parameters that are destroyed in the callee), and then f

[PATCH] D45384: [ObjC++] Never pass structs with `__weak` fields in registers

2018-04-06 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. Just a couple minor requests; if you accept them, feel free to commit. Comment at: include/clang/AST/Decl.h:3556 +/// indirectly. This value is used only in C++. +APK_CannotPassInRegs, + I think it's probably worth spelling out

r329477 - Make CodeGen depend just once on clangAnalysis.

2018-04-06 Thread Nico Weber via cfe-commits
Author: nico Date: Fri Apr 6 20:29:47 2018 New Revision: 329477 URL: http://llvm.org/viewvc/llvm-project?rev=329477&view=rev Log: Make CodeGen depend just once on clangAnalysis. Modified: cfe/trunk/lib/CodeGen/CMakeLists.txt Modified: cfe/trunk/lib/CodeGen/CMakeLists.txt URL: http://llvm.o

[PATCH] D45212: [HIP] Let CUDA toolchain support HIP language mode and amdgpu

2018-04-06 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. This looks okay to me, but I think it would better if someone with more expertise in the design of the driver and frontend code could review this. Comment at: lib/Driver/Driver.cpp:2267 +if ((IA->getType() != types::TY_CUDA) && +IA

Re: r311958 - Revert "Revert r311552: [Bash-autocompletion] Add support for static analyzer flags"

2018-04-06 Thread Nico Weber via cfe-commits
Hi Yuka, sorry about the late review comment on this. I just happened to see that this lets Driver's Option.inc depend on StaticAnalyzer/Checker's Checker.inc. However, Driver does not depend on StaticAnalyzer/Checker. In practice, it works ok because of all tablegen targets being collected into c

RE: [clang-tools-extra] r329454 - [clang-tidy] One more fix compilation for ParentVirtualCallCheck.cpp: find_if predicate

2018-04-06 Thread via cfe-commits
Hi Zinovy, The PS4 Windows bot is still failing to compile this file after your latest change. Can you take a look? http://lab.llvm.org:8011/builders/llvm-clang-lld-x86_64-scei-ps4-windows10pro-fast/builds/16316 FAILED: tools/clang/tools/extra/clang-tidy/bugprone/CMakeFiles/clangTidyBugproneMo

[PATCH] D44988: [Sema] Fix decrement availability for built-in types

2018-04-06 Thread Volodymyr Sapsai via Phabricator via cfe-commits
vsapsai added inline comments. Comment at: test/SemaCXX/overloaded-builtin-operators.cpp:95-99 // C++ [over.built]p3 long l1 = lr--; + // C++ [over.built]p4 + float f1 = fr--; Looks like p3 for `lr--` is a typo because p3 is about `++` while p4 is about

[PATCH] D45384: [ObjC++] Never pass structs with `__weak` fields in registers

2018-04-06 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak updated this revision to Diff 141471. ahatanak added a comment. Replace flags CanPassInRegisters and CannotPassInRegisters with a 2-bit enum in RecordDecl. Repository: rC Clang https://reviews.llvm.org/D45384 Files: include/clang/AST/Decl.h include/clang/AST/Type.h lib/AST/De

r329476 - Remove another unnecessary -I flag passed to clang-tblgen.

2018-04-06 Thread Nico Weber via cfe-commits
Author: nico Date: Fri Apr 6 18:34:36 2018 New Revision: 329476 URL: http://llvm.org/viewvc/llvm-project?rev=329476&view=rev Log: Remove another unnecessary -I flag passed to clang-tblgen. Modified: cfe/trunk/include/clang/StaticAnalyzer/Checkers/CMakeLists.txt cfe/trunk/include/clang/St

[libcxx] r329474 - Work around missing braces in init warning

2018-04-06 Thread Eric Fiselier via cfe-commits
Author: ericwf Date: Fri Apr 6 18:28:54 2018 New Revision: 329474 URL: http://llvm.org/viewvc/llvm-project?rev=329474&view=rev Log: Work around missing braces in init warning Modified: libcxx/trunk/include/compare Modified: libcxx/trunk/include/compare URL: http://llvm.org/viewvc/llvm-proj

[PATCH] D43957: Fixing issue where a space was not added before a global namespace variable when SpacesInParentheses is set

2018-04-06 Thread Darby Payne via Phabricator via cfe-commits
dpayne added a comment. Hi Bumping this commit. I do not have commit access so I cannot merge myself, if you have the time could you merge this commit? Repository: rC Clang https://reviews.llvm.org/D43957 ___ cfe-commits mailing list cfe-commit

r329467 - Generalize test for 32-bit targets.

2018-04-06 Thread Richard Smith via cfe-commits
Author: rsmith Date: Fri Apr 6 17:28:32 2018 New Revision: 329467 URL: http://llvm.org/viewvc/llvm-project?rev=329467&view=rev Log: Generalize test for 32-bit targets. Modified: cfe/trunk/test/CodeGenCXX/tail-padding.cpp Modified: cfe/trunk/test/CodeGenCXX/tail-padding.cpp URL: http://llvm

[PATCH] D45392: [clang-tidy] add new check to find out objc ivars which do not have prefix '_'

2018-04-06 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added a comment. If this is Apple guideline, check name should reflect this. I think will be good idea to have general check for Apple naming conventions instead of separate checks for specific situations like //objc-ivar-declaration// and //objc-property-declaration//. ==

r329465 - Recommit r329442: Generate Libclang invocation reproducers using a new

2018-04-06 Thread Alex Lorenz via cfe-commits
Author: arphaman Date: Fri Apr 6 17:03:27 2018 New Revision: 329465 URL: http://llvm.org/viewvc/llvm-project?rev=329465&view=rev Log: Recommit r329442: Generate Libclang invocation reproducers using a new -cc1gen-reproducer driver option The recommit fixes: - An MSAN failure (CCPrintOptions wasn

[PATCH] D42893: [libclang] Add clang_File_tryGetRealPathName

2018-04-06 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. There is no unittest but I have verified with a C++ language server on Arch Linux. Without using this function, cquery/ccls will not be able to index system header files because of excessive .. in the path returned by clang_getFileName. Repository: rC Clang https:/

r329464 - Remove two unnecessary -I flags passed to clang-tblgen.

2018-04-06 Thread Nico Weber via cfe-commits
Author: nico Date: Fri Apr 6 16:36:50 2018 New Revision: 329464 URL: http://llvm.org/viewvc/llvm-project?rev=329464&view=rev Log: Remove two unnecessary -I flags passed to clang-tblgen. Modified: cfe/trunk/include/clang/Basic/CMakeLists.txt Modified: cfe/trunk/include/clang/Basic/CMakeLists

[PATCH] D45384: [ObjC++] Never pass structs with `__weak` fields in registers

2018-04-06 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. In https://reviews.llvm.org/D45384#1060369, @ahatanak wrote: > Yes. I intended it as a property that propagates to classes that contain or > derive from the type. > > Would it make it less confusing if I merged CXXRecordDecl::CanPassInRegisters > and RecordDecl::Cannot

[PATCH] D45305: ObjCGNU: Fix empty v3 protocols being emitted two fields short

2018-04-06 Thread Dustin L. Howett via Phabricator via cfe-commits
DHowett-MSFT updated this revision to Diff 141450. DHowett-MSFT added a comment. Added a test per @rjmccall's suggestion. I chose to test this by emitting assembly because the llvm ir is significantly harder to pick apart for the true _size_ of the protocol. Repository: rC Clang https://rev

[PATCH] D44646: Sema: in msvc compatibility mode, don't allow forceinline on variadics

2018-04-06 Thread Dustin L. Howett via Phabricator via cfe-commits
DHowett-MSFT added a comment. Thanks! I don't have the means to check this in myself. Repository: rC Clang https://reviews.llvm.org/D44646 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-

[PATCH] D45382: [CodeGen] Avoid destructing a struct type that has already been destructed by a delegated constructor

2018-04-06 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak added a comment. In https://reviews.llvm.org/D45382#1060163, @rjmccall wrote: > Hmm. I'm not actually sure *why* it's not okay to forward callee-cleanup > arguments. Do we just not have the necessary logic to disable the cleanup in > the caller? It seems that it would be OK if ther

[PATCH] D44449: [Parser] Fix assertion-on-invalid for unexpected typename.

2018-04-06 Thread Volodymyr Sapsai via Phabricator via cfe-commits
vsapsai updated this revision to Diff 141448. vsapsai added a comment. - Add a comment. https://reviews.llvm.org/D9 Files: clang/lib/Parse/ParseDecl.cpp clang/test/Parser/cxx-decl.cpp Index: clang/test/Parser/cxx-decl.cpp ===

[PATCH] D45357: [XRay][llvm+clang] Consolidate attribute list files

2018-04-06 Thread Vlad Tsyrklevich via Phabricator via cfe-commits
vlad.tsyrklevich accepted this revision. vlad.tsyrklevich added inline comments. This revision is now accepted and ready to land. Comment at: llvm/docs/XRayExample.rst:196 +``-fxray-attr-list=`` flag to clang. You can have multiple files, each defining +different sets of attribut

[PATCH] D45392: add new check to find out objc ivars which do not have prefix '_'

2018-04-06 Thread Yan Zhang via Phabricator via cfe-commits
Wizard updated this revision to Diff 141444. Wizard added a comment. fix doc Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D45392 Files: clang-tidy/objc/CMakeLists.txt clang-tidy/objc/IvarDeclarationCheck.cpp clang-tidy/objc/IvarDeclarationCheck.h clang-tidy/objc/ObjCTi

[PATCH] D45392: add new check to find out objc ivars which do not have prefix '_'

2018-04-06 Thread Yan Zhang via Phabricator via cfe-commits
Wizard created this revision. Herald added subscribers: cfe-commits, mgorny, klimek. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D45392 Files: clang-tidy/objc/CMakeLists.txt clang-tidy/objc/IvarDeclarationCheck.cpp clang-tidy/objc/IvarDeclarationCheck.h clang-tidy/objc/

[PATCH] D44449: [Parser] Fix assertion-on-invalid for unexpected typename.

2018-04-06 Thread Volodymyr Sapsai via Phabricator via cfe-commits
vsapsai added inline comments. Comment at: clang/lib/Parse/ParseDecl.cpp:3076 DS.SetRangeEnd(Tok.getAnnotationEndLoc()); ConsumeAnnotationToken(); // The typename } rsmith wrote: > vsapsai wrote: > > Here we potentially can leave annotati

[PATCH] D44773: [CMake] Use custom command and target to install libc++ headers

2018-04-06 Thread Petr Hosek via Phabricator via cfe-commits
phosek updated this revision to Diff 141442. phosek marked an inline comment as done. Repository: rCXX libc++ https://reviews.llvm.org/D44773 Files: libcxx/NOTES.TXT libcxx/cmake/Modules/HandleLibCXXABI.cmake libcxx/include/CMakeLists.txt libcxx/lib/CMakeLists.txt Index: libcxx/lib/CM

[PATCH] D45384: [ObjC++] Never pass structs with `__weak` fields in registers

2018-04-06 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak added a comment. Yes. I intended it as a property that propagates to classes that contain or derive from the type. Would it make it less confusing if I merged CXXRecordDecl::CanPassInRegisters and RecordDecl::CannotPassInRegisters into a single enum? For example, the enum could have t

[PATCH] D41148: [libcxx] implement declarations based on P0214R7.

2018-04-06 Thread Tim Shen via Phabricator via cfe-commits
timshen updated this revision to Diff 141436. timshen marked an inline comment as done. timshen added a comment. Update file comments copy-paste error. https://reviews.llvm.org/D41148 Files: libcxx/include/experimental/__config libcxx/include/experimental/simd libcxx/include/module.module

[libclc] r329462 - select: simplify implementation and fix fp16

2018-04-06 Thread Jan Vesely via cfe-commits
Author: jvesely Date: Fri Apr 6 15:00:00 2018 New Revision: 329462 URL: http://llvm.org/viewvc/llvm-project?rev=329462&view=rev Log: select: simplify implementation and fix fp16 Fix half precision implementation Vector ?: operator should behave exactly as select Passes CTS on carrizo Signed-off

[PATCH] D45294: [libcxx] [test] Remove non-portable assertions from filebuf tests

2018-04-06 Thread Billy Robert O'Neal III via Phabricator via cfe-commits
BillyONeal updated this revision to Diff 141433. BillyONeal retitled this revision from "[libcxx] [test] Remove non-portable assertions from filebuf's seekoff.pass.cpp test" to "[libcxx] [test] Remove non-portable assertions from filebuf tests". BillyONeal edited the summary of this revision. Bil

[PATCH] D45383: Strip reference from a va_list object in C when merging parameter types.

2018-04-06 Thread Eli Friedman via Phabricator via cfe-commits
efriedma added a comment. How could this patch possibly affect vprintf? Repository: rC Clang https://reviews.llvm.org/D45383 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[libcxx] r329460 - Implement P0768r1: Library support for the Spaceship Operator.

2018-04-06 Thread Eric Fiselier via cfe-commits
Author: ericwf Date: Fri Apr 6 14:37:23 2018 New Revision: 329460 URL: http://llvm.org/viewvc/llvm-project?rev=329460&view=rev Log: Implement P0768r1: Library support for the Spaceship Operator. this patch adds the header and implements all of it except for [comp.alg]. As I understand it, the

[PATCH] D45384: [ObjC++] Never pass structs with `__weak` fields in registers

2018-04-06 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. In https://reviews.llvm.org/D45384#1060192, @ahatanak wrote: > In https://reviews.llvm.org/D45384#1060164, @rjmccall wrote: > > > Well, but I think CanPassInRegisters==false in the base class does always > > mean CanPassInRegisters==false in the subclass. > > > I think

[PATCH] D45383: Strip reference from a va_list object in C when merging parameter types.

2018-04-06 Thread Erich Keane via Phabricator via cfe-commits
erichkeane added a comment. In https://reviews.llvm.org/D45383#1060275, @efriedma wrote: > By "builtins" I meant specifically the stuff that that user code isn't > allowed to declare, like __builtin_*, since they often have weird/incomplete > signatures. Unfortunately, the problem shows in vp

[PATCH] D44616: Update existed CodeGen TBAA tests

2018-04-06 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. Yes, this is fine. Repository: rC Clang https://reviews.llvm.org/D44616 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lis

[PATCH] D45383: Strip reference from a va_list object in C when merging parameter types.

2018-04-06 Thread Eli Friedman via Phabricator via cfe-commits
efriedma added a comment. By "builtins" I meant specifically the stuff that that user code isn't allowed to declare, like __builtin_*, since they often have weird/incomplete signatures. Repository: rC Clang https://reviews.llvm.org/D45383 ___ cf

[clang-tools-extra] r329454 - [clang-tidy] One more fix compilation for ParentVirtualCallCheck.cpp: find_if predicate

2018-04-06 Thread Zinovy Nis via cfe-commits
Author: zinovy.nis Date: Fri Apr 6 14:00:18 2018 New Revision: 329454 URL: http://llvm.org/viewvc/llvm-project?rev=329454&view=rev Log: [clang-tidy] One more fix compilation for ParentVirtualCallCheck.cpp: find_if predicate Modified: clang-tools-extra/trunk/clang-tidy/bugprone/ParentVirtua

[clang-tools-extra] r329452 - [clang-tidy] Fix compilation for ParentVirtualCallCheck.cpp

2018-04-06 Thread Zinovy Nis via cfe-commits
Author: zinovy.nis Date: Fri Apr 6 13:39:23 2018 New Revision: 329452 URL: http://llvm.org/viewvc/llvm-project?rev=329452&view=rev Log: [clang-tidy] Fix compilation for ParentVirtualCallCheck.cpp Modified: clang-tools-extra/trunk/clang-tidy/bugprone/ParentVirtualCallCheck.cpp Modified: cla

[PATCH] D45383: Strip reference from a va_list object in C when merging parameter types.

2018-04-06 Thread Erich Keane via Phabricator via cfe-commits
erichkeane added a comment. One big issue with just disallowing redecls of builtins is we have is that a number of these are actually expected to be in the system headers/libraries (such as vprintf). A ton of the math.h functions are also builtins. Repository: rC Clang https://reviews.llvm

[PATCH] D45387: [CUDA] Revert defining __CUDA_ARCH__ for amdgcn targets

2018-04-06 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added a comment. In https://reviews.llvm.org/D45387#1060194, @tra wrote: > You may want to mention in the commit log that this is a partial unroll of > r329232 / https://reviews.llvm.org/D45277. Will do. Thanks. https://reviews.llvm.org/D45387 __

r329449 - Don't assume constructors return void.

2018-04-06 Thread Richard Smith via cfe-commits
Author: rsmith Date: Fri Apr 6 13:06:02 2018 New Revision: 329449 URL: http://llvm.org/viewvc/llvm-project?rev=329449&view=rev Log: Don't assume constructors return void. Should fix ARM buildbot. Modified: cfe/trunk/test/CodeGenCXX/tail-padding.cpp Modified: cfe/trunk/test/CodeGenCXX/tail-

[PATCH] D45383: Strip reference from a va_list object in C when merging parameter types.

2018-04-06 Thread Erich Keane via Phabricator via cfe-commits
erichkeane added a comment. In https://reviews.llvm.org/D45383#1060104, @efriedma wrote: > Rather than adding weird hacks to merging, can we just reject any attempt to > redeclare a builtin? I don't believe we can. I think things often re-declare them, particularly when it comes to va_end.

[PATCH] D44295: [clang-tidy] Detect and fix calls to grand-...parent virtual methods instead of calls to parent's virtual methods

2018-04-06 Thread Zinovy Nis via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rCTE329448: [clang-tidy] Check if grand-..parent's virtual method was called instead of… (authored by zinovy.nis, committed by ). Changed prior to commit: https://reviews.llvm.org/D44295?vs=141199&id=1414

[clang-tools-extra] r329448 - [clang-tidy] Check if grand-..parent's virtual method was called instead of overridden parent's.

2018-04-06 Thread Zinovy Nis via cfe-commits
Author: zinovy.nis Date: Fri Apr 6 13:02:50 2018 New Revision: 329448 URL: http://llvm.org/viewvc/llvm-project?rev=329448&view=rev Log: [clang-tidy] Check if grand-..parent's virtual method was called instead of overridden parent's. class A {...int virtual foo() {...}...}; class B: public A {

[PATCH] D45387: [CUDA] Revert defining __CUDA_ARCH__ for amdgcn targets

2018-04-06 Thread Artem Belevich via Phabricator via cfe-commits
tra accepted this revision. tra added a comment. This revision is now accepted and ready to land. You may want to mention in the commit log that this is a partial unroll of r329232 / https://reviews.llvm.org/D45277. https://reviews.llvm.org/D45387

[PATCH] D45384: [ObjC++] Never pass structs with `__weak` fields in registers

2018-04-06 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak added a comment. In https://reviews.llvm.org/D45384#1060164, @rjmccall wrote: > Well, but I think CanPassInRegisters==false in the base class does always > mean CanPassInRegisters==false in the subclass. I think there are cases that is not true. If I compile the following code, S0 (b

[PATCH] D45387: [CUDA] Revert defining __CUDA_ARCH__ for amdgcn targets

2018-04-06 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl created this revision. yaxunl added a reviewer: tra. Herald added subscribers: nhaehnle, jholewinski. amdgcn targets only support HIP, which does not define `__CUDA_ARCH__`. `__HIP_DEVICE_COMPILE__` depends on HIP language mode, therefore it needs to be added in a different patch. refer

r329447 - Revert r329442 "Generate Libclang invocation reproducers using a new

2018-04-06 Thread Alex Lorenz via cfe-commits
Author: arphaman Date: Fri Apr 6 12:45:29 2018 New Revision: 329447 URL: http://llvm.org/viewvc/llvm-project?rev=329447&view=rev Log: Revert r329442 "Generate Libclang invocation reproducers using a new -cc1gen-reproducer driver option" The tests are failing on some bots Removed: cfe/trunk/

[PATCH] D45384: [ObjC++] Never pass structs with `__weak` fields in registers

2018-04-06 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. Well, but I think CanPassInRegisters==false in the base class does always mean CanPassInRegisters==false in the subclass. Repository: rC Clang https://reviews.llvm.org/D45384 ___ cfe-commits mailing list cfe-commits@lis

Re: r329342 - PR36992: do not store beyond the dsize of a class object unless we know

2018-04-06 Thread Richard Smith via cfe-commits
Thanks, I see the problem. On Fri, 6 Apr 2018, 11:56 via cfe-commits, wrote: > Hi Richard, > > I don't know if you are aware, but the test you added in this commit, > tail-padding.cpp is currently failing on one of the ARM bots. Can you take > a look? > > > http://lab.llvm.org:8011/builders/clan

[PATCH] D45382: [CodeGen] Avoid destructing a struct type that has already been destructed by a delegated constructor

2018-04-06 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. Hmm. I'm not actually sure *why* it's not okay to forward callee-cleanup arguments. Do we just not have the necessary logic to disable the cleanup in the caller? Repository: rC Clang https://reviews.llvm.org/D45382 _

r329445 - Revert "[analyzer] Remove an unused variable"

2018-04-06 Thread George Karpenkov via cfe-commits
Author: george.karpenkov Date: Fri Apr 6 12:14:05 2018 New Revision: 329445 URL: http://llvm.org/viewvc/llvm-project?rev=329445&view=rev Log: Revert "[analyzer] Remove an unused variable" This reverts commit 2fa3e3edc4ed6547cc4ce46a8c79d1891a5b3b36. Removed the wrong variable. Modified: cf

r329444 - [analyzer] Remove an unused variable

2018-04-06 Thread George Karpenkov via cfe-commits
Author: george.karpenkov Date: Fri Apr 6 12:03:43 2018 New Revision: 329444 URL: http://llvm.org/viewvc/llvm-project?rev=329444&view=rev Log: [analyzer] Remove an unused variable Modified: cfe/trunk/lib/Analysis/LiveVariables.cpp Modified: cfe/trunk/lib/Analysis/LiveVariables.cpp URL: http

[PATCH] D45384: [ObjC++] Never pass structs with `__weak` fields in registers

2018-04-06 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak created this revision. ahatanak added reviewers: rjmccall, rsmith. This patch fixes a bug in r328731 that caused structs with `__weak` fields to be passed in registers. This happens when a struct doesn't have a `__weak` field but one of its subobjects does. To fix this, I added flag CX

RE: r329342 - PR36992: do not store beyond the dsize of a class object unless we know

2018-04-06 Thread via cfe-commits
Hi Richard, I don't know if you are aware, but the test you added in this commit, tail-padding.cpp is currently failing on one of the ARM bots. Can you take a look? http://lab.llvm.org:8011/builders/clang-cmake-armv7-selfhost-neon/builds/178 TEST 'Clang :: CodeGenCXX/tail-

[PATCH] D45383: Strip reference from a va_list object in C when merging parameter types.

2018-04-06 Thread Eli Friedman via Phabricator via cfe-commits
efriedma added a comment. Rather than adding weird hacks to merging, can we just reject any attempt to redeclare a builtin? Repository: rC Clang https://reviews.llvm.org/D45383 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists

[PATCH] D45240: [ARM] Compute a target feature which corresponds to the ARM version.

2018-04-06 Thread Eli Friedman via Phabricator via cfe-commits
efriedma added a comment. > I take it we still have test cases for the arm <-> thumb transition? "-mthumb" and "-marm" are handled in the driver by rewriting the triple. Repository: rC Clang https://reviews.llvm.org/D45240 ___ cfe-commits mailin

[PATCH] D41968: [libunwind][MIPS] Support MIPS floating-point registers for hard-float ABIs.

2018-04-06 Thread John Baldwin via Phabricator via cfe-commits
bsdjhb added a comment. Ping @sdardis @compnerd Repository: rUNW libunwind https://reviews.llvm.org/D41968 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D45240: [ARM] Compute a target feature which corresponds to the ARM version.

2018-04-06 Thread Eli Friedman via Phabricator via cfe-commits
efriedma updated this revision to Diff 141393. efriedma added a comment. Add a bunch of tests for various arm arches. Make sure we do something reasonable when we can't figure out any arch at all. Repository: rC Clang https://reviews.llvm.org/D45240 Files: lib/Basic/Targets/ARM.cpp tes

[PATCH] D45383: Strip reference from a va_list object in C when merging parameter types.

2018-04-06 Thread Erich Keane via Phabricator via cfe-commits
erichkeane created this revision. erichkeane added reviewers: efriedma, eli.friedman, compnerd, rsmith. erichkeane added a project: clang. As reported here: https://bugs.llvm.org/show_bug.cgi?id=37033 Any usage of a builtin function that uses a va_list by reference will cause an assertion when red

r329442 - Generate Libclang invocation reproducers using a new -cc1gen-reproducer

2018-04-06 Thread Alex Lorenz via cfe-commits
Author: arphaman Date: Fri Apr 6 11:30:14 2018 New Revision: 329442 URL: http://llvm.org/viewvc/llvm-project?rev=329442&view=rev Log: Generate Libclang invocation reproducers using a new -cc1gen-reproducer driver option This commit is a follow up to the previous work that recorded Libclang invo

[PATCH] D40983: Generate Libclang invocation reproducers using a new -cc1gen-reproducer option

2018-04-06 Thread Alex Lorenz via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL329442: Generate Libclang invocation reproducers using a new -cc1gen-reproducer (authored by arphaman, committed by ). Herald added a subscriber: llvm-commits. Changed prior to commit: https://reviews.l

[PATCH] D45382: [CodeGen] Avoid destructing a struct type that has already been destructed by a delegated constructor

2018-04-06 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak created this revision. ahatanak added reviewers: rjmccall, rsmith. Herald added a subscriber: kristof.beyls. This patch fixes a bug where a struct with an ObjC `__weak` field gets destructed after it has already been destructed. This bug was introduced in r328731, which made changes to

[PATCH] D45254: [X86][WAITPKG] WaitPKG intrinsics

2018-04-06 Thread Gabor Buella via Phabricator via cfe-commits
GBuella added inline comments. Comment at: lib/Headers/waitpkgintrin.h:41 +static __inline__ void __DEFAULT_FN_ATTRS +_umwait (__SIZE_TYPE__ __CONTROL, __UINT64_TYPE__ __COUNTER) +{ craig.topper wrote: > Why does the intrinsic take size_t but then its truncated

[PATCH] D45277: [CUDA] Add amdgpu sub archs

2018-04-06 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added inline comments. Comment at: lib/Basic/Targets.cpp:161 +case CudaArch::GFX902: + return "320"; +case CudaArch::UNKNOWN: tra wrote: > yaxunl wrote: > > tra wrote: > > > yaxunl wrote: > > > > tra wrote: > > > > > yaxunl wrote: > > > > > >

[PATCH] D45240: [ARM] Compute a target feature which corresponds to the ARM version.

2018-04-06 Thread Florian Hahn via Phabricator via cfe-commits
fhahn accepted this revision. fhahn added a comment. Thanks for updating it to use the stuff from TargetParser. LGTM, with tests for the cases @joerg mentiond. Comment at: lib/Basic/Targets/ARM.cpp:345 // get default FPU features + llvm::ARM::ArchKind Arch = llvm::ARM::par

[PATCH] D45277: [CUDA] Add amdgpu sub archs

2018-04-06 Thread Artem Belevich via Phabricator via cfe-commits
tra added inline comments. Comment at: lib/Basic/Targets.cpp:161 +case CudaArch::GFX902: + return "320"; +case CudaArch::UNKNOWN: yaxunl wrote: > tra wrote: > > yaxunl wrote: > > > tra wrote: > > > > yaxunl wrote: > > > > > tra wrote: > > > > > > Unl

[PATCH] D38479: Make -mgeneral-regs-only more like GCC's

2018-04-06 Thread Bill Wendling via Phabricator via cfe-commits
void added a comment. Hallo! I was wondering what the status of this patch was. :-) https://reviews.llvm.org/D38479 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[libunwind] r329340 - [cmake] Remove duplicate command line options from build

2018-04-06 Thread Aaron Smith via cfe-commits
Author: asmith Date: Thu Apr 5 13:27:50 2018 New Revision: 329340 URL: http://llvm.org/viewvc/llvm-project?rev=329340&view=rev Log: [cmake] Remove duplicate command line options from build CMAKE_CXX_FLAGS and CMAKE_C_FLAGS are added twice to the command line. This causes the command line options

r329223 - Fixes errors with FS iterators caused by https://reviews.llvm.org/D44960

2018-04-06 Thread Max Moroz via cfe-commits
Author: dor1s Date: Wed Apr 4 12:47:25 2018 New Revision: 329223 URL: http://llvm.org/viewvc/llvm-project?rev=329223&view=rev Log: Fixes errors with FS iterators caused by https://reviews.llvm.org/D44960 Summary: In https://reviews.llvm.org/D44960, file status check is executed every time a real

r329278 - [PATCH] [RISCV] Extend getTargetDefines for RISCVTargetInfo

2018-04-06 Thread Shiva Chen via cfe-commits
Author: shiva Date: Thu Apr 5 05:54:00 2018 New Revision: 329278 URL: http://llvm.org/viewvc/llvm-project?rev=329278&view=rev Log: [PATCH] [RISCV] Extend getTargetDefines for RISCVTargetInfo Summary: This patch extend getTargetDefines and implement handleTargetFeatures and hasFeature. and define

Re: [PATCH] D41316: [libcxx] Allow random_device to be built optionally

2018-04-06 Thread Jon Roelofs via cfe-commits
> the targets where you would want to use this can't run the libcxx testsuite anyway (because they don't have an operating system to run the test programs under). I used to run libcxx tests for an arm baremetal toolchain I was building via semihosted QEMU. It was awkward and slow (especially for

[PATCH] D45277: [CUDA] Add amdgpu sub archs

2018-04-06 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added inline comments. Comment at: lib/Basic/Targets.cpp:161 +case CudaArch::GFX902: + return "320"; +case CudaArch::UNKNOWN: tra wrote: > yaxunl wrote: > > tra wrote: > > > yaxunl wrote: > > > > tra wrote: > > > > > Unless you're planning to

[libclc] r329433 - fmod: Port from amd_builtins

2018-04-06 Thread Jan Vesely via cfe-commits
Author: jvesely Date: Fri Apr 6 10:43:08 2018 New Revision: 329433 URL: http://llvm.org/viewvc/llvm-project?rev=329433&view=rev Log: fmod: Port from amd_builtins Uses only denormal path for fp32. Passes CTS on carrizo and turks. v2: whitespace fix Signed-off-by: Jan Vesely Reviewer: Aaron Wat

[PATCH] D45310: Warn about memcpy'ing non-trivial C structs

2018-04-06 Thread John McCall via Phabricator via cfe-commits
rjmccall added inline comments. Comment at: include/clang/AST/NonTrivialCStructTypeVisitor.h:30 +if (asDerived().getContext().getAsArrayType(FT)) + return asDerived().visitArray(DK, FT, std::forward(Args)...); + ahatanak wrote: > rjmccall wrote: > > Shou

[clang-tools-extra] r329428 - [clang-tidy] Sort includes; NFC

2018-04-06 Thread George Burgess IV via cfe-commits
Author: gbiv Date: Fri Apr 6 10:22:36 2018 New Revision: 329428 URL: http://llvm.org/viewvc/llvm-project?rev=329428&view=rev Log: [clang-tidy] Sort includes; NFC Modified: clang-tools-extra/trunk/clang-tidy/android/AndroidTidyModule.cpp Modified: clang-tools-extra/trunk/clang-tidy/android/A

[PATCH] D45277: [CUDA] Add amdgpu sub archs

2018-04-06 Thread Artem Belevich via Phabricator via cfe-commits
tra added inline comments. Comment at: lib/Basic/Targets.cpp:161 +case CudaArch::GFX902: + return "320"; +case CudaArch::UNKNOWN: yaxunl wrote: > tra wrote: > > yaxunl wrote: > > > tra wrote: > > > > Unless you're planning to guarantee 1:1 match to f

r329420 - [HIP] define __CUDA_ARCH_=1 for amdgcn targets

2018-04-06 Thread Yaxun Liu via cfe-commits
Author: yaxunl Date: Fri Apr 6 09:43:42 2018 New Revision: 329420 URL: http://llvm.org/viewvc/llvm-project?rev=329420&view=rev Log: [HIP] define __CUDA_ARCH_=1 for amdgcn targets Differential Revision: https://reviews.llvm.org/D45277 Modified: cfe/trunk/lib/Basic/Targets.cpp Modified: cfe/

[PATCH] D45254: [X86][WAITPKG] WaitPKG intrinsics

2018-04-06 Thread Craig Topper via Phabricator via cfe-commits
craig.topper accepted this revision. craig.topper added a comment. LGTM Comment at: lib/Headers/waitpkgintrin.h:41 +static __inline__ void __DEFAULT_FN_ATTRS +_umwait (__SIZE_TYPE__ __CONTROL, __UINT64_TYPE__ __COUNTER) +{ Why does the intrinsic take size_t b

r329411 - [OPENMP, NVPTX] Fix codegen for the teams reduction.

2018-04-06 Thread Alexey Bataev via cfe-commits
Author: abataev Date: Fri Apr 6 09:03:36 2018 New Revision: 329411 URL: http://llvm.org/viewvc/llvm-project?rev=329411&view=rev Log: [OPENMP, NVPTX] Fix codegen for the teams reduction. Added NUW flags for all the add|mul|sub operations + replaced sdiv by udiv as we operate on unsigned values on

[PATCH] D45373: [clang-format] Don't remove empty lines before namespace endings

2018-04-06 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir created this revision. krasimir added a reviewer: djasper. Herald added subscribers: cfe-commits, klimek. This implements an alternative to r327861, namely preserving empty lines before namespace endings. Repository: rC Clang https://reviews.llvm.org/D45373 Files: lib/Format/Name

[PATCH] D45363: [OpenCL] Added -std/-cl-std=CL2.2/CLC++

2018-04-06 Thread Alexey Bader via Phabricator via cfe-commits
bader added inline comments. Comment at: include/clang/Frontend/LangStandards.def:167 +LANGSTANDARD_ALIAS_DEPR(opencl22, "CL2.2") +LANGSTANDARD_ALIAS_DEPR(opencl22, "clc++") +LANGSTANDARD_ALIAS_DEPR(opencl22, "CLC++") OpenCL C++ 1.0 specification defines only 'c+

Re: r329300 - Disable -fmerge-all-constants as default.

2018-04-06 Thread Manoj Gupta via cfe-commits
Sure, will update. Thanks, Manoj On Fri, Apr 6, 2018 at 4:56 AM Nico Weber wrote: > This should probably get a release notes entry. Can you write one? > > On Thu, Apr 5, 2018 at 11:29 AM, Manoj Gupta via cfe-commits < > cfe-commits@lists.llvm.org> wrote: > >> Author: manojgupta >> Date: Thu Apr

[PATCH] D44188: Misc typos

2018-04-06 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh added a comment. Feel free to send the rest of the fixes as a separate patch. Repository: rL LLVM https://reviews.llvm.org/D44188 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-co

[PATCH] D44295: [clang-tidy] Detect and fix calls to grand-...parent virtual methods instead of calls to parent's virtual methods

2018-04-06 Thread Zinovy Nis via Phabricator via cfe-commits
zinovy.nis added a comment. Alexander, thanks for your patience and comments :-) https://reviews.llvm.org/D44295 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D44295: [clang-tidy] Detect and fix calls to grand-...parent virtual methods instead of calls to parent's virtual methods

2018-04-06 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh accepted this revision. alexfh added a comment. This revision is now accepted and ready to land. LG https://reviews.llvm.org/D44295 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-com

[PATCH] D45277: [CUDA] Add amdgpu sub archs

2018-04-06 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added inline comments. Comment at: lib/Basic/Targets.cpp:161 +case CudaArch::GFX902: + return "320"; +case CudaArch::UNKNOWN: tra wrote: > yaxunl wrote: > > tra wrote: > > > Unless you're planning to guarantee 1:1 match to functionality provid

[PATCH] D45363: [OpenCL] Added -std/-cl-std=CL2.2/CLC++

2018-04-06 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added a comment. LGTM. Thank! https://reviews.llvm.org/D45363 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D44188: Misc typos

2018-04-06 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh accepted this revision. alexfh added a comment. Thanks! I've looked through all the fixes. Most of them look reasonable. I've reverted a few files where I found something suspicious or outright wrong and will commit the rest of the patch after I ensure the tests pass. These files couldn'

r329394 - [Hexagon] Remove default values from lambda parameters

2018-04-06 Thread Krzysztof Parzyszek via cfe-commits
Author: kparzysz Date: Fri Apr 6 06:51:48 2018 New Revision: 329394 URL: http://llvm.org/viewvc/llvm-project?rev=329394&view=rev Log: [Hexagon] Remove default values from lambda parameters Modified: cfe/trunk/lib/CodeGen/CGBuiltin.cpp Modified: cfe/trunk/lib/CodeGen/CGBuiltin.cpp URL: http

[PATCH] D44609: [Clang-Format] New option BreakBeforeLambdaBody to manage lambda line break inside function parameter call

2018-04-06 Thread Francois JEAN via Phabricator via cfe-commits
Wawha added a comment. I'm not working on a public project with a public style guide, so not sure it will fit all the requirement inside. But perhaps the request of Rian for bareflank (https://bugs.llvm.org//show_bug.cgi?id=32151#c4) could help to fit the needs. The current patch do not exactl

[PATCH] D41316: [libcxx] Allow random_device to be built optionally

2018-04-06 Thread Jonathan Roelofs via Phabricator via cfe-commits
jroelofs added a subscriber: efriedma. jroelofs added a comment. > the targets where you would want to use this can't run the libcxx testsuite anyway (because they don't have an operating system to run the test programs under). I used to run libcxx tests for an arm baremetal toolchain I was bu

[PATCH] D45096: Allow the creation of human-friendly ASTDumper to arbitrary output stream

2018-04-06 Thread Alexander Kornienko via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL329391: Allow the creation of human-friendly ASTDumper to arbitrary output stream (authored by alexfh, committed by ). Herald added a subscriber: llvm-commits. Changed prior to commit: https://reviews.l

r329391 - Allow the creation of human-friendly ASTDumper to arbitrary output stream

2018-04-06 Thread Alexander Kornienko via cfe-commits
Author: alexfh Date: Fri Apr 6 06:01:12 2018 New Revision: 329391 URL: http://llvm.org/viewvc/llvm-project?rev=329391&view=rev Log: Allow the creation of human-friendly ASTDumper to arbitrary output stream Summary: `ASTPrinter` allows setting the ouput to any O-Stream, but that printer creates

[PATCH] D45096: Allow the creation of human-friendly ASTDumper to arbitrary output stream

2018-04-06 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh accepted this revision. alexfh added a comment. This revision is now accepted and ready to land. LG. I'll commit the patch for you. Repository: rC Clang https://reviews.llvm.org/D45096 ___ cfe-commits mailing list cfe-commits@lists.llvm.or

[PATCH] D40937: [clang-tidy] Infinite loop checker

2018-04-06 Thread Peter Szecsi via Phabricator via cfe-commits
szepet updated this revision to Diff 141322. szepet marked 4 inline comments as done. szepet added a comment. Addressed comments and readded the lost fixes. https://reviews.llvm.org/D40937 Files: clang-tidy/bugprone/BugproneTidyModule.cpp clang-tidy/bugprone/CMakeLists.txt clang-tidy/bugp

  1   2   >