[PATCH] D68377: [Builtins] Teach Clang about memccpy

2019-10-03 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 created this revision. xbolva00 added a reviewer: aaron.ballman. Herald added subscribers: cfe-commits, kristina. Herald added a project: clang. Hopefully, -fno-builtin-memccpy will work now. Repository: rC Clang https://reviews.llvm.org/D68377 Files: include/clang/Basic/Builtins.

[PATCH] D68377: [Builtins] Teach Clang about memccpy

2019-10-03 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 marked an inline comment as done. xbolva00 added inline comments. Comment at: include/clang/Basic/Builtins.def:903 LIBBUILTIN(memcpy, "v*v*vC*z","f", "string.h", ALL_LANGUAGES) +LIBBUILTIN(memccpy, "v*v*vC*iz", "f", "string.h", ALL_LANGUAGES) LIBBUILTIN(me

[PATCH] D68379: FunctionDecl::isThisDeclarationADefinition is useless in ProcessDeclAttribute

2019-10-03 Thread Guillaume Chatelet via Phabricator via cfe-commits
gchatelet created this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. This is for illustration purposes and not to be submitted Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D68379 Files: clang/lib/Sema/SemaDeclAttr.cpp Index: clang/lib/Se

[PATCH] D68380: [Driver] NFC: Remove duplicate call to getLibGccType

2019-10-03 Thread Cullen Rhodes via Phabricator via cfe-commits
c-rhodes created this revision. c-rhodes added a reviewer: saugustine. https://reviews.llvm.org/D68380 Files: clang/lib/Driver/ToolChains/CommonArgs.cpp Index: clang/lib/Driver/ToolChains/CommonArgs.cpp === --- clang/lib/Driver/T

[PATCH] D68028: [clang] Add no_builtin attribute

2019-10-03 Thread Guillaume Chatelet via Phabricator via cfe-commits
gchatelet marked 3 inline comments as done. gchatelet added inline comments. Comment at: clang/lib/Sema/SemaDeclAttr.cpp:1098-1099 + + if (D->hasAttr()) +D->dropAttr(); + gchatelet wrote: > aaron.ballman wrote: > > Just making sure I understand the semantics

[PATCH] D63932: [GlobalDCE] Dead Virtual Function Elimination

2019-10-03 Thread Oliver Stannard (Linaro) via Phabricator via cfe-commits
ostannard added a comment. Ping Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63932/new/ https://reviews.llvm.org/D63932 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/c

r373577 - [clang][NFC] Fix misspellings in ExternalASTMerger.h

2019-10-03 Thread Raphael Isemann via cfe-commits
Author: teemperor Date: Thu Oct 3 02:55:13 2019 New Revision: 373577 URL: http://llvm.org/viewvc/llvm-project?rev=373577&view=rev Log: [clang][NFC] Fix misspellings in ExternalASTMerger.h Modified: cfe/trunk/include/clang/AST/ExternalASTMerger.h Modified: cfe/trunk/include/clang/AST/Externa

[PATCH] D67156: [Analyzer] Debug Checkers for Container and Iterator Inspection

2019-10-03 Thread Balogh, Ádám via Phabricator via cfe-commits
baloghadamsoftware updated this revision to Diff 222984. baloghadamsoftware added a comment. Updated according to the comments. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D67156/new/ https://reviews.llvm.org/D67156 Files: include/clang/StaticAnalyzer/Checkers/Checkers.td lib/Stat

[PATCH] D67156: [Analyzer] Debug Checkers for Container and Iterator Inspection

2019-10-03 Thread Balogh, Ádám via Phabricator via cfe-commits
baloghadamsoftware marked 6 inline comments as done. baloghadamsoftware added inline comments. Comment at: include/clang/StaticAnalyzer/Checkers/Checkers.td:1328-1337 +def ContainerInspectionChecker : Checker<"ContainerInspection">, + HelpText<"Check the analyzer's understanding

r373584 - Silence static analyzer getAs null dereference warnings. NFCI.

2019-10-03 Thread Simon Pilgrim via cfe-commits
Author: rksimon Date: Thu Oct 3 04:22:48 2019 New Revision: 373584 URL: http://llvm.org/viewvc/llvm-project?rev=373584&view=rev Log: Silence static analyzer getAs null dereference warnings. NFCI. The static analyzer is warning about potential null dereferences, but in these cases we should be a

[PATCH] D67932: [analyzer] Fix accidentally skipping the call during inlined defensive check suppression.

2019-10-03 Thread Csaba Dabis via Phabricator via cfe-commits
Charusso accepted this revision. Charusso added a comment. > [...] one reason why we can't simply use the error node may be that the > binding to that variable might have already disappeared from the state by the > time the bug is found. Yes, that is pretty interesting. I have found error nodes

[PATCH] D68268: [Alignment][NFC] Remove StoreInst::setAlignment(unsigned)

2019-10-03 Thread Clement Courbet via Phabricator via cfe-commits
courbet added inline comments. Comment at: llvm/lib/Transforms/InstCombine/InstCombineCalls.cpp:189 + L->setAlignment( + MaybeAlign(CopySrcAlign)); // Check if we can use Align instead. if (CopyMD) FIXME Comment at: llvm/lib/Transforms

[PATCH] D68268: [Alignment][NFC] Remove StoreInst::setAlignment(unsigned)

2019-10-03 Thread Guillaume Chatelet via Phabricator via cfe-commits
gchatelet updated this revision to Diff 222991. gchatelet marked 6 inline comments as done. gchatelet added a comment. - Address comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D68268/new/ https://reviews.llvm.org/D68268 Files: clang/lib/C

[PATCH] D68274: [Alignment][Clang][NFC] Add CharUnits::getAsAlign

2019-10-03 Thread Clement Courbet via Phabricator via cfe-commits
courbet added inline comments. Comment at: clang/lib/CodeGen/CGObjCMac.cpp:2021 // of the string is via this class initializer. - GV->setAlignment(1); + GV->setAlignment(llvm::Align(1)); Fields.addBitCast(GV, CGM.Int8PtrTy); I think the semantic is None h

[PATCH] D68268: [Alignment][NFC] Remove StoreInst::setAlignment(unsigned)

2019-10-03 Thread Guillaume Chatelet via Phabricator via cfe-commits
gchatelet added inline comments. Comment at: llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp:4027 - ST->setAlignment(Alignment); + ST->setAlignment(Align(Alignment)); Value *V = propagateMetadata(ST, E->Scalars); courbet wrote: > I don't think

[PATCH] D68274: [Alignment][Clang][NFC] Add CharUnits::getAsAlign

2019-10-03 Thread Guillaume Chatelet via Phabricator via cfe-commits
gchatelet marked 5 inline comments as done. gchatelet added inline comments. Comment at: clang/lib/CodeGen/CGObjCMac.cpp:6323 GV->setSection("__DATA, __objc_data"); - GV->setAlignment( - CGM.getDataLayout().getABITypeAlignment(ObjCTypes.ClassnfABITy)); + GV->setAlignm

[PATCH] D68274: [Alignment][Clang][NFC] Add CharUnits::getAsAlign

2019-10-03 Thread Guillaume Chatelet via Phabricator via cfe-commits
gchatelet updated this revision to Diff 222994. gchatelet marked an inline comment as done. gchatelet added a comment. - Address comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D68274/new/ https://reviews.llvm.org/D68274 Files: clang/inclu

r373593 - [libTooling] Add various Stencil combinators for expressions.

2019-10-03 Thread Yitzhak Mandelbaum via cfe-commits
Author: ymandel Date: Thu Oct 3 06:01:00 2019 New Revision: 373593 URL: http://llvm.org/viewvc/llvm-project?rev=373593&view=rev Log: [libTooling] Add various Stencil combinators for expressions. Summary: This revision adds three new Stencil combinators: * `expression`, which idiomatically constr

r373592 - [Alignment][Clang][NFC] Add CharUnits::getAsAlign

2019-10-03 Thread Guillaume Chatelet via cfe-commits
Author: gchatelet Date: Thu Oct 3 06:00:29 2019 New Revision: 373592 URL: http://llvm.org/viewvc/llvm-project?rev=373592&view=rev Log: [Alignment][Clang][NFC] Add CharUnits::getAsAlign Summary: This is a prerequisite to removing `llvm::GlobalObject::setAlignment(unsigned)`. This is patch is part

[PATCH] D68315: [libTooling] Add various Stencil combinators for expressions.

2019-10-03 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. ymandel marked an inline comment as done. Closed by commit rL373593: [libTooling] Add various Stencil combinators for expressions. (authored by ymandel, committed by ). Herald added a project: LLVM. Herald added a subscriber

[PATCH] D68274: [Alignment][Clang][NFC] Add CharUnits::getAsAlign

2019-10-03 Thread Guillaume Chatelet via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL373592: [Alignment][Clang][NFC] Add CharUnits::getAsAlign (authored by gchatelet, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Changed prior to commit: https://

[PATCH] D62525: [Analyzer] Add new visitor to the iterator checkers

2019-10-03 Thread Balogh, Ádám via Phabricator via cfe-commits
baloghadamsoftware added a comment. In D62525#1609334 , @NoQ wrote: > Ok, so is it problematic to define a lambda that checks whether an > interesting iterator is invalidated? Or is it difficult to return the note > tag from many stack frames in order to

r373595 - [Alignment][NFC] Remove StoreInst::setAlignment(unsigned)

2019-10-03 Thread Guillaume Chatelet via cfe-commits
Author: gchatelet Date: Thu Oct 3 06:17:21 2019 New Revision: 373595 URL: http://llvm.org/viewvc/llvm-project?rev=373595&view=rev Log: [Alignment][NFC] Remove StoreInst::setAlignment(unsigned) Summary: This is patch is part of a series to introduce an Alignment type. See this thread for context:

[PATCH] D68268: [Alignment][NFC] Remove StoreInst::setAlignment(unsigned)

2019-10-03 Thread Guillaume Chatelet via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL373595: [Alignment][NFC] Remove StoreInst::setAlignment(unsigned) (authored by gchatelet, committed by ). Changed prior to commit: https://reviews.llvm.org/D68268?vs=222991&id=223000#toc Repository:

[PATCH] D68388: [PR41008][OpenCL] Support restrict keyword in C++ mode

2019-10-03 Thread Kévin Petit via Phabricator via cfe-commits
kpet created this revision. kpet added a reviewer: Anastasia. Herald added subscribers: cfe-commits, kristof.beyls, yaxunl. Herald added a project: clang. Just enable it in C++ for OpenCL but not in C++. Signed-off-by: Kevin Petit Repository: rC Clang https://reviews.llvm.org/D68388 Files:

RE: r373247 - Teach CallGraph to look into Generic Lambdas.

2019-10-03 Thread Keane, Erich via cfe-commits
Yep, I agree. I tend to figure if I can get it done in ~1-2 hours, that I could just fix it. Note that this was 1:30 😊 From: Nico Weber Sent: Wednesday, October 2, 2019 4:37 PM To: Keane, Erich Cc: cfe-commits Subject: Re: r373247 - Teach CallGraph to look into Generic Lambdas. Thanks! If

[PATCH] D68388: [PR41008][OpenCL] Support restrict keyword in C++ mode

2019-10-03 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added a comment. Is there a test that shows that that keyword is still not provided for C++ after this? Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D68388/new/ https://reviews.llvm.org/D68388 ___ cfe-com

[PATCH] D67980: [WIP][CLANG][BPF] do compile-once run-everywhere relocation for bitfields

2019-10-03 Thread Yonghong Song via Phabricator via cfe-commits
yonghong-song marked 9 inline comments as done. yonghong-song added inline comments. Comment at: clang/lib/CodeGen/CGBuiltin.cpp:9321-9322 + if (IsError) +return IsBitField ? EmitLValue(Arg).getBitFieldPointer() + : EmitLValue(Arg).getPointer(); + --

[PATCH] D67185: [RISCV] Add support for -ffixed-xX flags

2019-10-03 Thread Simon Cook via Phabricator via cfe-commits
simoncook updated this revision to Diff 223005. simoncook added a reviewer: luismarques. simoncook added a comment. Rebase on top of tree, add @luismarques as reviewer Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D67185/new/ https://reviews.llvm.or

[PATCH] D68300: [HIP] Add option -fno-link-builtin-bitcode to disable linking device lib

2019-10-03 Thread Michael Liao via Phabricator via cfe-commits
hliao added inline comments. Comment at: include/clang/Driver/Options.td:606 +def flink_builtin_bitcode : Flag<["-"], "flink-builtin-bitcode">, + Flags<[CC1Option]>, HelpText<"Link builtin bitcode for HIP device compilation.">; +def fno_link_builtin_bitcode : Flag<["-"], "fno-l

[PATCH] D68391: [RISCV] Improve sysroot computation if no GCC install detected

2019-10-03 Thread Edward Jones via Phabricator via cfe-commits
edward-jones created this revision. Herald added subscribers: cfe-commits, pzheng, simoncook, s.egerton, lenary, Jim, benna, psnobl, jocewei, PkmX, rkruppe, the_o, brucehoult, MartinMosbeck, rogfer01, zzheng, MaskRay, jrtc27, shiva0217, kito-cheng, niosHD, sabuasal, apazos, johnrusso, rbar, asb.

[PATCH] D68394: [HIP] Enable specifying different default gpu arch for HIP/CUDA.

2019-10-03 Thread Michael Liao via Phabricator via cfe-commits
hliao created this revision. hliao added reviewers: tra, yaxunl. Herald added a project: clang. Herald added a subscriber: cfe-commits. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D68394 Files: clang/lib/Driver/Driver.cpp clang/test/Driver/hip-default-gpu-arch.hip Index:

[PATCH] D68394: [HIP] Enable specifying different default gpu arch for HIP/CUDA.

2019-10-03 Thread Michael Liao via Phabricator via cfe-commits
hliao marked an inline comment as done. hliao added inline comments. Comment at: clang/lib/Driver/Driver.cpp:2655 +: CudaActionBuilderBase(C, Args, Inputs, Action::OFK_HIP) { + DefaultCudaArch = CudaArch::GFX600; +} Sam, could you let me know whi

[PATCH] D68165: [analyzer][MallocChecker][NFC] Split checkPostCall up, deploy CallDescriptionMap

2019-10-03 Thread Balogh, Ádám via Phabricator via cfe-commits
baloghadamsoftware added inline comments. Comment at: clang/lib/StaticAnalyzer/Checkers/MallocChecker.cpp:378-379 + + using CheckFn = void (MallocChecker::*)(CheckerContext &C, const CallExpr *CE, + ProgramStateRef State) const; + --

[PATCH] D68391: [RISCV] Improve sysroot computation if no GCC install detected

2019-10-03 Thread Edward Jones via Phabricator via cfe-commits
edward-jones added a comment. Before falling back to returning the empty string this first looks for a directory with the triple name up one level from the driver. This uses the Triple string in the path, however this Triple has been normalized so even if the user specifies "clang --target=risc

[PATCH] D68377: [Builtins] Teach Clang about memccpy

2019-10-03 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 updated this revision to Diff 223017. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D68377/new/ https://reviews.llvm.org/D68377 Files: include/clang/Basic/Builtins.def Index: include/clang/Basic/Builtins.def ===

[PATCH] D68364: Prototype implementation of P0784R7: mark all members of std::allocator and std::allocator_traits as constexpr.

2019-10-03 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists added a comment. Thanks for doing this, Richard. A few things: - Needs tests (as you said) - The config macro stuff is all wrong (we build that file from a template) - Use `__libcpp_is_constant_evaluated` instead of `__builtin_is_constant_evaluated` because it doesn't have to be `#if

[PATCH] D63960: [C++20] Add consteval-specific semantic for functions

2019-10-03 Thread Tyker via Phabricator via cfe-commits
Tyker updated this revision to Diff 223021. Tyker marked 16 inline comments as done. Tyker added a comment. i addressed almost all comments. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63960/new/ https://reviews.llvm.org/D63960 Files: clang/include/clang/AST/DeclCXX.h clang/inclu

[PATCH] D63960: [C++20] Add consteval-specific semantic for functions

2019-10-03 Thread Tyker via Phabricator via cfe-commits
Tyker added inline comments. Comment at: clang/lib/Sema/SemaDeclCXX.cpp:11188-11189 + ConstexprSpecKind ConstexprKind = DetermineSpecialMemberConstexprKind( + Constexpr, ClassDecl->hasDefaultedConstevalDefaultCtor()); + rsmith wrote: > I don't think this

r373611 - Remove duplicate P->getAs() call. NFCI.

2019-10-03 Thread Simon Pilgrim via cfe-commits
Author: rksimon Date: Thu Oct 3 08:08:20 2019 New Revision: 373611 URL: http://llvm.org/viewvc/llvm-project?rev=373611&view=rev Log: Remove duplicate P->getAs() call. NFCI. Modified: cfe/trunk/lib/AST/ASTContext.cpp Modified: cfe/trunk/lib/AST/ASTContext.cpp URL: http://llvm.org/viewvc/llv

r373612 - ExprConstant - silence static analyzer getAs<> null dereference warnings. NFCI.

2019-10-03 Thread Simon Pilgrim via cfe-commits
Author: rksimon Date: Thu Oct 3 08:08:30 2019 New Revision: 373612 URL: http://llvm.org/viewvc/llvm-project?rev=373612&view=rev Log: ExprConstant - silence static analyzer getAs<> null dereference warnings. NFCI. The static analyzer is warning about potential null dereferences, but in these cas

[PATCH] D68300: [HIP] Use option -nogpulib to disable linking device lib

2019-10-03 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl updated this revision to Diff 223024. yaxunl added a comment. use -nogpuarch CHANGES SINCE LAST ACTION https://reviews.llvm.org/D68300/new/ https://reviews.llvm.org/D68300 Files: include/clang/Driver/Options.td lib/Driver/ToolChains/Cuda.cpp lib/Driver/ToolChains/HIP.cpp test/

r373613 - Fix MSVC "result of 32-bit shift implicitly converted to 64 bits" warning. NFCI.

2019-10-03 Thread Simon Pilgrim via cfe-commits
Author: rksimon Date: Thu Oct 3 08:10:47 2019 New Revision: 373613 URL: http://llvm.org/viewvc/llvm-project?rev=373613&view=rev Log: Fix MSVC "result of 32-bit shift implicitly converted to 64 bits" warning. NFCI. Modified: cfe/trunk/lib/CodeGen/CodeGenModule.cpp Modified: cfe/trunk/lib/Cod

r373614 - [Diagnostics] Bitwise negation of a boolean expr always evaluates to true; warn with -Wbool-operation

2019-10-03 Thread David Bolvansky via cfe-commits
Author: xbolva00 Date: Thu Oct 3 08:17:59 2019 New Revision: 373614 URL: http://llvm.org/viewvc/llvm-project?rev=373614&view=rev Log: [Diagnostics] Bitwise negation of a boolean expr always evaluates to true; warn with -Wbool-operation Requested here: http://lists.llvm.org/pipermail/cfe-dev/201

[PATCH] D68388: [PR41008][OpenCL] Support restrict keyword in C++ mode

2019-10-03 Thread Kévin Petit via Phabricator via cfe-commits
kpet added a comment. There doesn't seem to be a test for this (enabling `restrict` in C++ doesn't make any existing test fail). I couldn't find any test checking that OpenCL or C++/OpenCL keywords generally aren't enabled in C or C++. Doing this generically would essentially equate to writing

Re: r373614 - [Diagnostics] Bitwise negation of a boolean expr always evaluates to true; warn with -Wbool-operation

2019-10-03 Thread Nico Weber via cfe-commits
../../clang/lib/Sema/SemaExpr.cpp:13481:25: error: no member named 'warn_bitwise_negation_bool' in namespace 'clang::diag' Diag(OpLoc, diag::warn_bitwise_negation_bool) ~~^ 1 error generated. On Thu, Oct 3, 2019 at 11:16 AM David Bolvansky via cfe-commits < cfe-commits@

r373616 - [NFC] Added missing changes for rL373614

2019-10-03 Thread David Bolvansky via cfe-commits
Author: xbolva00 Date: Thu Oct 3 08:26:26 2019 New Revision: 373616 URL: http://llvm.org/viewvc/llvm-project?rev=373616&view=rev Log: [NFC] Added missing changes for rL373614 Modified: cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td Modified: cfe/trunk/include/clang/Basic/DiagnosticSem

Re: r373614 - [Diagnostics] Bitwise negation of a boolean expr always evaluates to true; warn with -Wbool-operation

2019-10-03 Thread Dávid Bolvanský via cfe-commits
Fixed. I manually svncommited only specific files since I have other changes and forgot to add that file too. Sorry. Please evaluate this on Chromium. Since ~bool is always true, I dont think we are gonna have any false positives.. št 3. 10. 2019 o 17:23 Nico Weber napísal(a): > > ../../clang/lib

Re: r373614 - [Diagnostics] Bitwise negation of a boolean expr always evaluates to true; warn with -Wbool-operation

2019-10-03 Thread Nico Weber via cfe-commits
Thanks for the fix! This seems like a very safe warning from a distance, so I too hope that it won't fire. I'll let you know how it goes. If you're very curious, https://ci.chromium.org/p/chromium/g/chromium.clang/console are our bots that build trunk clang and then chromium with it. (Currently

[PATCH] D68401: [Hexagon] Fix clang driver to parse -mcpu/-mvXX and -march properly.

2019-10-03 Thread Sumanth Gundapaneni via Phabricator via cfe-commits
sgundapa created this revision. sgundapa added reviewers: bcain, bcahoon. Herald added a project: clang. Herald added a subscriber: cfe-commits. Before this patch if we pass "-mcpu=hexagonv65 -march=hexagon" in this order, the driver fails to figure out the correct cpu version. This patch fixed th

[PATCH] D68162: [analyzer][MallocChecker][NFC] Communicate the allocation family to auxiliary functions with parameters

2019-10-03 Thread Balogh, Ádám via Phabricator via cfe-commits
baloghadamsoftware added a comment. I like this change. If we can retrieve something with a simple getter, then do not carry extra parameters all over the code. However, if we have to recalculate something over and over again then it is much better to determine it once and pass it around as a p

[PATCH] D68394: [HIP] Enable specifying different default gpu arch for HIP/CUDA.

2019-10-03 Thread Artem Belevich via Phabricator via cfe-commits
tra added inline comments. Comment at: clang/lib/Driver/Driver.cpp:2538 +: CudaActionBuilderBase(C, Args, Inputs, Action::OFK_Cuda) { + DefaultCudaArch = CudaArch::SM_20; +} This technically depends on the CUDA version. We do have CUDA version in

r373620 - [OPENMP]Improve diagnostics for not found declare target entries.

2019-10-03 Thread Alexey Bataev via cfe-commits
Author: abataev Date: Thu Oct 3 09:20:34 2019 New Revision: 373620 URL: http://llvm.org/viewvc/llvm-project?rev=373620&view=rev Log: [OPENMP]Improve diagnostics for not found declare target entries. We can point to the target region + emit parent functions names/real var names if they were not f

[PATCH] D68403: [OpenCL] PR43145: preserve addrspace for class accesses

2019-10-03 Thread Sven van Haastregt via Phabricator via cfe-commits
svenvh created this revision. svenvh added a reviewer: Anastasia. Herald added subscribers: cfe-commits, yaxunl. Herald added a project: clang. PR43145 revealed two places where Clang was attempting to create a bitcast without considering the address space of class types during C++ class codegen.

[PATCH] D68394: [HIP] Enable specifying different default gpu arch for HIP/CUDA.

2019-10-03 Thread Michael Liao via Phabricator via cfe-commits
hliao marked an inline comment as done. hliao added inline comments. Comment at: clang/lib/Driver/Driver.cpp:2538 +: CudaActionBuilderBase(C, Args, Inputs, Action::OFK_Cuda) { + DefaultCudaArch = CudaArch::SM_20; +} tra wrote: > This technically

[PATCH] D68300: [HIP] Use option -nogpulib to disable linking device lib

2019-10-03 Thread Artem Belevich via Phabricator via cfe-commits
tra added inline comments. Comment at: include/clang/Driver/Options.td:606 +def flink_builtin_bitcode : Flag<["-"], "flink-builtin-bitcode">, + Flags<[CC1Option]>, HelpText<"Link builtin bitcode for HIP device compilation.">; +def fno_link_builtin_bitcode : Flag<["-"], "fno-lin

[PATCH] D68394: [HIP] Enable specifying different default gpu arch for HIP/CUDA.

2019-10-03 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added inline comments. Comment at: clang/lib/Driver/Driver.cpp:2655 +: CudaActionBuilderBase(C, Args, Inputs, Action::OFK_HIP) { + DefaultCudaArch = CudaArch::GFX600; +} hliao wrote: > Sam, could you let me know which reasonable default ar

[PATCH] D68300: [HIP] Use option -nogpulib to disable linking device lib

2019-10-03 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl marked an inline comment as done. yaxunl added inline comments. Comment at: include/clang/Driver/Options.td:606 +def flink_builtin_bitcode : Flag<["-"], "flink-builtin-bitcode">, + Flags<[CC1Option]>, HelpText<"Link builtin bitcode for HIP device compilation.">; +def fno

r373624 - [OPENMP]Fix emission of the declare target variables in device mode.

2019-10-03 Thread Alexey Bataev via cfe-commits
Author: abataev Date: Thu Oct 3 09:46:49 2019 New Revision: 373624 URL: http://llvm.org/viewvc/llvm-project?rev=373624&view=rev Log: [OPENMP]Fix emission of the declare target variables in device mode. Declare target variables must be emitted in device mode, target triples can be empty in this c

[PATCH] D68394: [HIP] Enable specifying different default gpu arch for HIP/CUDA.

2019-10-03 Thread Artem Belevich via Phabricator via cfe-commits
tra accepted this revision. tra added inline comments. This revision is now accepted and ready to land. Comment at: clang/lib/Driver/Driver.cpp:2538 +: CudaActionBuilderBase(C, Args, Inputs, Action::OFK_Cuda) { + DefaultCudaArch = CudaArch::SM_20; +}

r373626 - DeclBase/DeclCXX/DeclTemplate - silence static analyzer getAs<> null dereference warnings. NFCI.

2019-10-03 Thread Simon Pilgrim via cfe-commits
Author: rksimon Date: Thu Oct 3 09:58:01 2019 New Revision: 373626 URL: http://llvm.org/viewvc/llvm-project?rev=373626&view=rev Log: DeclBase/DeclCXX/DeclTemplate - silence static analyzer getAs<> null dereference warnings. NFCI. The static analyzer is warning about potential null dereferences,

[libunwind] r373628 - [libunwind] Adjust libunwind_01.pass.cpp test for ARM EHABI

2019-10-03 Thread John Brawn via cfe-commits
Author: john.brawn Date: Thu Oct 3 10:01:04 2019 New Revision: 373628 URL: http://llvm.org/viewvc/llvm-project?rev=373628&view=rev Log: [libunwind] Adjust libunwind_01.pass.cpp test for ARM EHABI ARM EHABI unwinding tables only store the start address of each function, so the last function is as

[PATCH] D20561: Warn when taking address of packed member

2019-10-03 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan added a comment. Herald added a project: LLVM. Herald added a subscriber: llvm-commits. I think I found a false negative with this where if the member is accessed from a packed struct type returned from a function, the warning does not appear: typedef struct { uint8_t a; ui

[PATCH] D68407: [WIP][RISCV] Use compiler-rt if no GCC installation detected

2019-10-03 Thread Edward Jones via Phabricator via cfe-commits
edward-jones created this revision. edward-jones added a reviewer: asb. Herald added subscribers: cfe-commits, pzheng, simoncook, s.egerton, lenary, Jim, benna, psnobl, jocewei, PkmX, rkruppe, the_o, brucehoult, MartinMosbeck, rogfer01, zzheng, MaskRay, jrtc27, shiva0217, kito-cheng, niosHD, sabu

[PATCH] D68407: [WIP][RISCV] Use compiler-rt if no GCC installation detected

2019-10-03 Thread Edward Jones via Phabricator via cfe-commits
edward-jones added a comment. Work in progress because this needs tests (and probably clang-format too). My assumption is that libgcc should be used in preference if it is available. At the moment this either uses libgcc and libgcc's crtbegin/crtend, or the Clang equivalents. Potentially a user

[PATCH] D68300: [HIP] Use option -nogpulib to disable linking device lib

2019-10-03 Thread Aaron Enye Shi via Phabricator via cfe-commits
ashi1 accepted this revision. ashi1 added a comment. LGTM - Thanks for generalizing CHANGES SINCE LAST ACTION https://reviews.llvm.org/D68300/new/ https://reviews.llvm.org/D68300 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lis

r373634 - [HIP] Enable specifying different default gpu arch for HIP/CUDA.

2019-10-03 Thread Michael Liao via cfe-commits
Author: hliao Date: Thu Oct 3 10:49:20 2019 New Revision: 373634 URL: http://llvm.org/viewvc/llvm-project?rev=373634&view=rev Log: [HIP] Enable specifying different default gpu arch for HIP/CUDA. Reviewers: tra, yaxunl Subscribers: cfe-commits Tags: #clang Differential Revision: https://revie

[PATCH] D68394: [HIP] Enable specifying different default gpu arch for HIP/CUDA.

2019-10-03 Thread Michael Liao via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL373634: [HIP] Enable specifying different default gpu arch for HIP/CUDA. (authored by hliao, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Changed prior to commit:

r373643 - PR43547: substitute into the type of a non-type template parameter if

2019-10-03 Thread Richard Smith via cfe-commits
Author: rsmith Date: Thu Oct 3 11:24:40 2019 New Revision: 373643 URL: http://llvm.org/viewvc/llvm-project?rev=373643&view=rev Log: PR43547: substitute into the type of a non-type template parameter if it's instantiation-dependent, even if it's not dependent. There might be a SFINAE check in the

[PATCH] D68296: [clang-format] Add ability to wrap braces after multi-line control statements

2019-10-03 Thread Mitchell via Phabricator via cfe-commits
mitchell-stellar updated this revision to Diff 223058. mitchell-stellar added a comment. Rebased against master, and also added test case for 'do' statements. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D68296/new/ https://reviews.llvm.org/D68296 Files: clang

[PATCH] D68242: [clang-format] [PR42417] clang-format inserts a space after '->' for operator->() overloading

2019-10-03 Thread Mitchell via Phabricator via cfe-commits
mitchell-stellar added a comment. LGTM Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D68242/new/ https://reviews.llvm.org/D68242 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/m

[PATCH] D68410: [AttrDocs] document always_inline

2019-10-03 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers created this revision. nickdesaulniers added reviewers: chandlerc, rsmith. Herald added a project: clang. Herald added a subscriber: cfe-commits. GNU documentaion for always_inline: https://gcc.gnu.org/onlinedocs/gcc/Inline.html GNU documentation for function attributes: https://g

r373647 - [clang-format] Add ability to wrap braces after multi-line control statements

2019-10-03 Thread Paul Hoad via cfe-commits
Author: paulhoad Date: Thu Oct 3 11:42:31 2019 New Revision: 373647 URL: http://llvm.org/viewvc/llvm-project?rev=373647&view=rev Log: [clang-format] Add ability to wrap braces after multi-line control statements Summary: Change the BraceWrappingFlags' AfterControlStatement from a bool to an enum

[PATCH] D68410: [AttrDocs] document always_inline

2019-10-03 Thread James Y Knight via Phabricator via cfe-commits
jyknight added inline comments. Comment at: clang/include/clang/Basic/AttrDocs.td:4399-4400 + let Content = [{ +Hint that inline substitution should be attempted when optimizations are +disabled. Does not guarantee that inline substitution actually occurs. +}];

[PATCH] D68413: [clang] [cmake] Add distribution install targets for remaining components

2019-10-03 Thread Michał Górny via Phabricator via cfe-commits
mgorny created this revision. mgorny added reviewers: compnerd, phosek, smeenai, beanz, tstellar. Add install targets as necessary to install bash-autocomplete, scan-build and scan-view via LLVM_DISTRIBUTION_TARGETS. https://reviews.llvm.org/D68413 Files: clang/CMakeLists.txt clang/tools/sc

[PATCH] D68410: [AttrDocs] document always_inline

2019-10-03 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added a reviewer: aaron.ballman. lebedev.ri added inline comments. Comment at: clang/include/clang/Basic/AttrDocs.td:4394-4395 } + + +def AlwaysInlineDocs : Documentation { One too many lines Repository: rG LLVM Github Monorepo CHANGES SINCE LAST

[PATCH] D68412: [clang] [cmake] Support LLVM_DISTRIBUTION_COMPONENTS in stand-alone build

2019-10-03 Thread Michał Górny via Phabricator via cfe-commits
mgorny created this revision. mgorny added reviewers: compnerd, tstellar, phosek, beanz, smeenai. https://reviews.llvm.org/D68412 Files: clang/CMakeLists.txt Index: clang/CMakeLists.txt === --- clang/CMakeLists.txt +++ clang/CMak

[PATCH] D68296: [clang-format] Add ability to wrap braces after multi-line control statements

2019-10-03 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL373647: [clang-format] Add ability to wrap braces after multi-line control statements (authored by paulhoad, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Changed

[PATCH] D68410: [AttrDocs] document always_inline

2019-10-03 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/include/clang/Basic/AttrDocs.td:4400 +Hint that inline substitution should be attempted when optimizations are +disabled. Does not guarantee that inline substitution actually occurs. +}]; It may make sense to

[PATCH] D67660: [clang-format] [PR43338] C# clang format has space issues betweern C# only keywords

2019-10-03 Thread Mitchell via Phabricator via cfe-commits
mitchell-stellar accepted this revision. mitchell-stellar added a comment. This revision is now accepted and ready to land. LGTM Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D67660/new/ https://reviews.llvm.org/D67660 __

r373648 - Check for qualified function types after substituting into the operand

2019-10-03 Thread Richard Smith via cfe-commits
Author: rsmith Date: Thu Oct 3 11:55:23 2019 New Revision: 373648 URL: http://llvm.org/viewvc/llvm-project?rev=373648&view=rev Log: Check for qualified function types after substituting into the operand of 'typeid'. This is a rare place where it's valid for a function type to be substituted but

r373649 - [HIP] Use option -nogpulib to disable linking device lib

2019-10-03 Thread Yaxun Liu via cfe-commits
Author: yaxunl Date: Thu Oct 3 11:59:56 2019 New Revision: 373649 URL: http://llvm.org/viewvc/llvm-project?rev=373649&view=rev Log: [HIP] Use option -nogpulib to disable linking device lib Differential Revision: https://reviews.llvm.org/D68300 Added: cfe/trunk/test/Driver/hip-no-device-libs

[PATCH] D68300: [HIP] Use option -nogpulib to disable linking device lib

2019-10-03 Thread Yaxun Liu via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL373649: [HIP] Use option -nogpulib to disable linking device lib (authored by yaxunl, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Changed prior to commit: http

[PATCH] D67629: [clang-format] [PR43333] Fix C# breaking before function name when using Attributes

2019-10-03 Thread Mitchell via Phabricator via cfe-commits
mitchell-stellar accepted this revision. mitchell-stellar added a comment. This revision is now accepted and ready to land. LGTM Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D67629/new/ https://reviews.llvm.org/D67629 __

[PATCH] D67159: [clang] New __attribute__((__clang_arm_mve_alias)).

2019-10-03 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman marked 2 inline comments as done. aaron.ballman added inline comments. Comment at: clang/lib/AST/Decl.cpp:3082 +static bool ArmMveAliasValid(unsigned BuiltinID, StringRef AliasName) { + // This will be filled in by Tablegen which isn't written yet + return false;

[PATCH] D68415: [clang-format] C++11 braced lists should respect the SpacesInParentheses setting

2019-10-03 Thread Mitchell via Phabricator via cfe-commits
mitchell-stellar created this revision. mitchell-stellar added reviewers: MyDeveloperDay, reuk, owenpan. mitchell-stellar added a project: clang-format. Herald added a project: clang. Herald added a subscriber: cfe-commits. According to the clang-format documentation, "Fundamentally, C++11 braced

[PATCH] D68410: [AttrDocs] document always_inline

2019-10-03 Thread Miguel Ojeda via Phabricator via cfe-commits
ojeda added a comment. Note that the latest GCC docs (rather than 4.1.2) are at: https://gcc.gnu.org/onlinedocs/gcc/Common-Function-Attributes.html For reference, this was triggered from: https://lore.kernel.org/lkml/cakwvodm_gouedjayxtqctuvdl+9vwvfeofhv06mlmyva75c...@mail.gmail.com/ Reposito

[PATCH] D67775: [Sema] Split out -Wformat-type-confusion from -Wformat-pedantic

2019-10-03 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D67775#1691999 , @erik.pilkington wrote: > Ping! Sorry for the delayed review -- thank you for working on clearing this up! Comment at: clang/include/clang/AST/FormatString.h:259 +NoMatch = 0, +

[PATCH] D68028: [clang] Add no_builtin attribute

2019-10-03 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a subscriber: rsmith. aaron.ballman added inline comments. Comment at: clang/lib/Sema/SemaDeclAttr.cpp:1072 +NoBuiltinAttr * +Sema::mergeNoBuiltinAttr(Sema &S, Decl *D, const AttributeCommonInfo &CI, + llvm::ArrayRef FunctionNames) { --

[PATCH] D67847: [Support] make report_fatal_error `abort` instead of `exit`

2019-10-03 Thread James Y Knight via Phabricator via cfe-commits
jyknight added a comment. The `abort()` function raises SIGABRT, for which the default behavior is to trigger a coredump. Do we actually want that behavior? Either `_exit()` (long available extension, which lld already uses) or `quick_exit()` (the new C standard way) seem possibly preferable?

[PATCH] D68377: [Builtins] Teach Clang about memccpy

2019-10-03 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. Test cases? Comment at: include/clang/Basic/Builtins.def:483 BUILTIN(__builtin_memcpy, "v*v*vC*z", "nF") +BUILTIN(__builtin_memccpy, "v*v*vC*iz", "nF") BUILTIN(__builtin_memmove, "v*v*vC*z", "nF") GCC doesn't seem to have `__bui

[PATCH] D67847: [Support] make report_fatal_error `abort` instead of `exit`

2019-10-03 Thread Yuanfang Chen via Phabricator via cfe-commits
ychen added a comment. In D67847#1691898 , @jyknight wrote: > The `abort()` function raises SIGABRT, for which the default behavior is to > trigger a coredump. Do we actually want that behavior? > > Either `_exit()` (long available extension, which lld al

[PATCH] D68332: [clang-format] [PR43531] clang-format damages "alternative representations" for operators

2019-10-03 Thread Mitchell via Phabricator via cfe-commits
mitchell-stellar requested changes to this revision. mitchell-stellar added inline comments. This revision now requires changes to proceed. Comment at: clang/lib/Format/TokenAnnotator.cpp:2892 + if (Left.is(TT_UnaryOperator)) { +// Don't combine the unary operators !~ into "

[PATCH] D68415: [clang-format] C++11 braced lists should respect the SpacesInParentheses setting

2019-10-03 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay added a comment. Should we have `SpacesInBraces`? as a first class formatting option, given that we have? SpaceBetweenBraces.SpacesInAngles = true; SpaceBetweenBraces.SpacesInParentheses = true; SpaceBetweenBraces.SpacesInSquareBrackets = true; Repository: rC Clang CH

[PATCH] D68415: [clang-format] C++11 braced lists should respect the SpacesInParentheses setting

2019-10-03 Thread Mitchell via Phabricator via cfe-commits
mitchell-stellar added a comment. I don't think that's a good idea, considering the fact that braces can mean different things in different contexts, and it would cause trouble for existing clang-format settings. If a hypothetical `SpacesInBraces` were `false` by default, then you could have c

[PATCH] D68377: [Builtins] Teach Clang about memccpy

2019-10-03 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 marked an inline comment as done. xbolva00 added a comment. It is not very obvious for me what kind of test should be done here. I would be grateful if you could show me an example in tree. Comment at: include/clang/Basic/Builtins.def:483 BUILTIN(__builtin_memcpy, "v

[PATCH] D68415: [clang-format] C++11 braced lists should respect the SpacesInParentheses setting

2019-10-03 Thread Mitchell via Phabricator via cfe-commits
mitchell-stellar updated this revision to Diff 223077. mitchell-stellar added a comment. Added additional unit tests to verify that the `SpaceInEmptyParentheses` setting is also correctly adhered to. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D68415/new/ https

[PATCH] D68346: [clang-format] Add new option to add spaces around conditions

2019-10-03 Thread Mitchell via Phabricator via cfe-commits
mitchell-stellar requested changes to this revision. mitchell-stellar added inline comments. Comment at: clang/docs/ClangFormatStyleOptions.rst:2290 +**SpacesAroundConditions** (``bool``) + If ``true``, spaces will be inserted around if/for/while (and similar) conditions. ---

[PATCH] D68415: [clang-format] C++11 braced lists should respect the SpacesInParentheses setting

2019-10-03 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay added a comment. what if you have this vector{1, 2, 3}; new int[3]{1, 2, 3}; foo(int f); but want this: vector{ 1, 2, 3 }; new int[3]{ 1, 2, 3 }; foo(int f); wouldn't turning on `SpacesInParentheses: true` now mean you get vector{ 1, 2, 3 }; new int[3]{ 1, 2, 3

[PATCH] D68415: [clang-format] C++11 braced lists should respect the SpacesInParentheses setting

2019-10-03 Thread Mitchell via Phabricator via cfe-commits
mitchell-stellar added a comment. If you want spaces in your C++11 initializers and nothing else, then you don't want the `Cpp11BracedListStyle` setting enabled. Turning it off gives you spaces inside without affecting anything else. Repository: rC Clang CHANGES SINCE LAST ACTION https://

  1   2   >