[PATCH] D49348: Harden/relax clang/test/CodeGen/opt-record-MIR.c test

2018-07-17 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL337249: Harden/relax clang/test/CodeGen/opt-record-MIR.c test (authored by lebedevri, committed by ). Changed prior to commit: https://reviews.llvm.org/D49348?vs=155591&id=155820#toc Repository: rL L

r337249 - Harden/relax clang/test/CodeGen/opt-record-MIR.c test

2018-07-17 Thread Roman Lebedev via cfe-commits
Author: lebedevri Date: Tue Jul 17 00:12:08 2018 New Revision: 337249 URL: http://llvm.org/viewvc/llvm-project?rev=337249&view=rev Log: Harden/relax clang/test/CodeGen/opt-record-MIR.c test Summary: If the build path is short, `Line` field can end up fitting on the same line as `File`, but the `

[PATCH] D49296: [ASTImporter] Fix import of unnamed structs

2018-07-17 Thread Balázs Kéri via Phabricator via cfe-commits
balazske added inline comments. Comment at: unittests/AST/StructuralEquivalenceTest.cpp:615 + ASSERT_TRUE(R0); + ASSERT_TRUE(R1); + ASSERT_NE(R0, R1); These asserts can be removed too. Repository: rC Clang https://reviews.llvm.org/D49296 __

[PATCH] D47196: [Time-report ](2): Recursive timers in Clang

2018-07-17 Thread Andrew V. Tischenko via Phabricator via cfe-commits
avt77 added a comment. In https://reviews.llvm.org/D47196#1162321, @efriedma wrote: > Adding startFrontendTimer/stopFrontendTimer helps a little, but it's still > difficult to match a given startFrontendTimer to the corresponding > stopFrontendTimer because they're in completely different funct

[PATCH] D45444: [clang-tidy] implement new check for const-correctness

2018-07-17 Thread Jonas Toth via Phabricator via cfe-commits
JonasToth added a comment. @0x8000- are you interested in working on the check? If i recall correctly the branch for 7.0 will happen on 1. august. That would be the timewindow in which it makes sense to give you the patch. I will have time in september following, but not right now. I try to

[PATCH] D45444: [clang-tidy] implement new check for const-correctness

2018-07-17 Thread Jonas Toth via Phabricator via cfe-commits
JonasToth marked an inline comment as done. JonasToth added a comment. Removed one unresolved comment, probably thats why it was stuck :D Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D45444 ___ cfe-commits mailing list cfe-commits@

[PATCH] D45444: [clang-tidy] implement new check for const-correctness

2018-07-17 Thread Jonas Toth via Phabricator via cfe-commits
JonasToth updated this revision to Diff 155821. JonasToth added a comment. - Merge branch 'master' into check_const - [Misc] remove comment and iostream Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D45444 Files: clang-tidy/cppcoreguidelines/CMakeLists.txt clang-tidy/cppcor

[PATCH] D49417: [clangd] Implement trigram generation algorithm for new symbol index

2018-07-17 Thread Kirill Bobyrev via Phabricator via cfe-commits
omtcyfz created this revision. omtcyfz added a reviewer: ioeric. omtcyfz added a project: clang-tools-extra. Herald added subscribers: jkorous, MaskRay, mgorny. This patch introduces trigram generation algorithm for the symbol index proposed in a recent design document. RFC in the mailing list:

[PATCH] D49417: [clangd] Implement trigram generation algorithm for new symbol index

2018-07-17 Thread Kirill Bobyrev via Phabricator via cfe-commits
omtcyfz updated this revision to Diff 155824. omtcyfz added a comment. Fix documentation indentation in SearchAtom description. https://reviews.llvm.org/D49417 Files: clang-tools-extra/clangd/CMakeLists.txt clang-tools-extra/clangd/index/noctem/SearchAtom.cpp clang-tools-extra/clangd/inde

r337255 - Temporarily revert r337226 "Restructure checking for, and warning on, lifetime extension."

2018-07-17 Thread Florian Hahn via cfe-commits
Author: fhahn Date: Tue Jul 17 02:23:31 2018 New Revision: 337255 URL: http://llvm.org/viewvc/llvm-project?rev=337255&view=rev Log: Temporarily revert r337226 "Restructure checking for, and warning on, lifetime extension." This change breaks on ARM because pointers to clang::InitializedEntity ar

[PATCH] D49417: [clangd] Implement trigram generation algorithm for new symbol index

2018-07-17 Thread Kirill Bobyrev via Phabricator via cfe-commits
omtcyfz updated this revision to Diff 155828. https://reviews.llvm.org/D49417 Files: clang-tools-extra/clangd/CMakeLists.txt clang-tools-extra/clangd/index/noctem/SearchAtom.cpp clang-tools-extra/clangd/index/noctem/SearchAtom.h clang-tools-extra/unittests/clangd/CMakeLists.txt clang-to

[PATCH] D49417: [clangd] Implement trigram generation algorithm for new symbol index

2018-07-17 Thread Kirill Bobyrev via Phabricator via cfe-commits
omtcyfz updated this revision to Diff 155827. omtcyfz added a comment. Wipe redundant FIXMEs. https://reviews.llvm.org/D49417 Files: clang-tools-extra/clangd/CMakeLists.txt clang-tools-extra/clangd/index/noctem/SearchAtom.cpp clang-tools-extra/clangd/index/noctem/SearchAtom.h clang-tool

[PATCH] D49417: [clangd] Implement trigram generation algorithm for new symbol index

2018-07-17 Thread Kirill Bobyrev via Phabricator via cfe-commits
omtcyfz updated this revision to Diff 155830. omtcyfz added a comment. Fix unittest file name in header. https://reviews.llvm.org/D49417 Files: clang-tools-extra/clangd/CMakeLists.txt clang-tools-extra/clangd/index/noctem/SearchAtom.cpp clang-tools-extra/clangd/index/noctem/SearchAtom.h

[PATCH] D49235: [ASTImporter] Import described template (if any) of function.

2018-07-17 Thread Balázs Kéri via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC337260: [ASTImporter] Import described template (if any) of function. (authored by balazske, committed by ). Changed prior to commit: https://reviews.llvm.org/D49235?vs=155630&id=155832#toc Repository:

r337260 - [ASTImporter] Import described template (if any) of function.

2018-07-17 Thread Balazs Keri via cfe-commits
Author: balazske Date: Tue Jul 17 02:52:41 2018 New Revision: 337260 URL: http://llvm.org/viewvc/llvm-project?rev=337260&view=rev Log: [ASTImporter] Import described template (if any) of function. Summary: When a function is imported, check if it has a described template. The name lookup is corre

[PATCH] D49296: [ASTImporter] Fix import of unnamed structs

2018-07-17 Thread Gabor Marton via Phabricator via cfe-commits
martong updated this revision to Diff 155835. martong marked an inline comment as done. martong added a comment. Remove unneeded assert Repository: rC Clang https://reviews.llvm.org/D49296 Files: lib/AST/ASTStructuralEquivalence.cpp unittests/AST/ASTImporterTest.cpp unittests/AST/Struc

[PATCH] D45444: [clang-tidy] implement new check for const-correctness

2018-07-17 Thread Florin Iucha via Phabricator via cfe-commits
0x8000- added a comment. In https://reviews.llvm.org/D45444#1164671, @JonasToth wrote: > @0x8000- are you interested in working on the check? If i recall > correctly the branch for 7.0 will happen on 1. august. That would be the > timewindow in which it makes sense to give you the patch

[PATCH] D49114: [clang-tidy] Add a check for "magic numbers"

2018-07-17 Thread Florin Iucha via Phabricator via cfe-commits
0x8000- added a comment. @aaron.ballman , @JonasToth , @Eugene.Zelenko Is there anything missing from this patch? What do I need to do to get it merged? This is my first contribution to LLVM so I'm not quite sure. Thank you! Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D4

[PATCH] D49293: [ASTImporter] Add support for import of CXXInheritedCtorInitExpr.

2018-07-17 Thread Balázs Kéri via Phabricator via cfe-commits
balazske updated this revision to Diff 155838. balazske added a comment. - Using cast_or_null Repository: rC Clang https://reviews.llvm.org/D49293 Files: lib/AST/ASTImporter.cpp test/Import/inherited-ctor-init-expr/Inputs/A.cpp test/Import/inherited-ctor-init-expr/test.cpp Index: tes

Re: r337152 - [Sema] Reword warning for constant captures that are not required

2018-07-17 Thread Malcolm Parsons via cfe-commits
On Mon, 16 Jul 2018 at 10:57, Benjamin Kramer via cfe-commits wrote: > - auto explicit_by_value_unused_sizeof = [i] { return sizeof(i); }; // > expected-warning{{lambda capture 'i' is not required to be captured for this > use}} > + auto explicit_by_value_unused_sizeof = [i] { return sizeof(i)

[PATCH] D48845: [Sema] Add fixit for unused lambda captures

2018-07-17 Thread Malcolm Parsons via Phabricator via cfe-commits
malcolm.parsons added a comment. In https://reviews.llvm.org/D48845#1158103, @alexshap wrote: > I'm kind of interested in this fixit, but one thought which i have - probably > it should be more conservative (i.e. fix captures by reference, integral > types, etc) (since the code might rely on si

[PATCH] D48845: [Sema] Add fixit for unused lambda captures

2018-07-17 Thread Malcolm Parsons via Phabricator via cfe-commits
malcolm.parsons added inline comments. Comment at: lib/Sema/SemaLambda.cpp:1567 +if (!CurHasPreviousCapture && !IsLast) { + // If there are no captures preceding this capture, remove the + // following comma. In clang-tidy ch

r337232 - [Driver] Add -fno-digraphs

2018-07-17 Thread Jacob Bandes-Storch via cfe-commits
Author: jtbandes Date: Mon Jul 16 21:56:22 2018 New Revision: 337232 URL: http://llvm.org/viewvc/llvm-project?rev=337232&view=rev Log: [Driver] Add -fno-digraphs Summary: Add a flag `-fno-digraphs` to disable digraphs in the lexer, similar to `-fno-operator-names` which disables alternative name

[PATCH] D49296: [ASTImporter] Fix import of unnamed structs

2018-07-17 Thread Gabor Marton via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL337267: [ASTImporter] Fix import of unnamed structs (authored by martong, committed by ). Herald added a subscriber: llvm-commits. Repository: rL LLVM https://reviews.llvm.org/D49296 Files: cfe/trun

r337267 - [ASTImporter] Fix import of unnamed structs

2018-07-17 Thread Gabor Marton via cfe-commits
Author: martong Date: Tue Jul 17 05:06:36 2018 New Revision: 337267 URL: http://llvm.org/viewvc/llvm-project?rev=337267&view=rev Log: [ASTImporter] Fix import of unnamed structs Summary: D48773 simplified ASTImporter nicely, but it introduced a new error: Unnamed structs are not imported correctl

[PATCH] D49300: [ASTImporter] Fix poisonous structural equivalence cache

2018-07-17 Thread Gabor Marton via Phabricator via cfe-commits
martong added a comment. @a_sidorin Ok, thanks Aleksei for the review. I added the explanation as file comments into `StructuralEquivalence.cpp`. Repository: rC Clang https://reviews.llvm.org/D49300 ___ cfe-commits mailing list cfe-commits@list

[PATCH] D49300: [ASTImporter] Fix poisonous structural equivalence cache

2018-07-17 Thread Gabor Marton via Phabricator via cfe-commits
martong updated this revision to Diff 155858. martong added a comment. - Add comment about structural eq and BFS Repository: rC Clang https://reviews.llvm.org/D49300 Files: include/clang/AST/ASTStructuralEquivalence.h lib/AST/ASTImporter.cpp lib/AST/ASTStructuralEquivalence.cpp lib/S

r337271 - By popular demand, switch in64_t on NetBSD/AArch64 and NetBSD/PowerPC64

2018-07-17 Thread Joerg Sonnenberger via cfe-commits
Author: joerg Date: Tue Jul 17 05:33:19 2018 New Revision: 337271 URL: http://llvm.org/viewvc/llvm-project?rev=337271&view=rev Log: By popular demand, switch in64_t on NetBSD/AArch64 and NetBSD/PowerPC64 to long for consistency with other 64bit platforms. Modified: cfe/trunk/lib/Basic/Targets

r337274 - For NetBSD, unwind data is emitted by default, so also enable frame

2018-07-17 Thread Joerg Sonnenberger via cfe-commits
Author: joerg Date: Tue Jul 17 05:38:57 2018 New Revision: 337274 URL: http://llvm.org/viewvc/llvm-project?rev=337274&view=rev Log: For NetBSD, unwind data is emitted by default, so also enable frame pointer optimisation by default when using optimisation. Modified: cfe/trunk/lib/Driver/ToolC

r337275 - [ASTImporter] Fix poisonous structural equivalence cache

2018-07-17 Thread Gabor Marton via cfe-commits
Author: martong Date: Tue Jul 17 05:39:27 2018 New Revision: 337275 URL: http://llvm.org/viewvc/llvm-project?rev=337275&view=rev Log: [ASTImporter] Fix poisonous structural equivalence cache Summary: Implementation functions call into the member functions of ASTStructuralEquivalence, thus they ca

[PATCH] D49300: [ASTImporter] Fix poisonous structural equivalence cache

2018-07-17 Thread Gabor Marton via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC337275: [ASTImporter] Fix poisonous structural equivalence cache (authored by martong, committed by ). Changed prior to commit: https://reviews.llvm.org/D49300?vs=155858&id=155863#toc Repository: rC

[PATCH] D49421: [CodeComplete] Fix accessibilty of protected members from base class.

2018-07-17 Thread Eric Liu via Phabricator via cfe-commits
ioeric created this revision. ioeric added reviewers: aaron.ballman, sammccall. Herald added a subscriber: cfe-commits. Currently, protected members from base classes are marked as inaccessible when completing in derived class. This patch fixes the problem by setting the naming class correctly whe

r337277 - Always use __mcount on NetBSD. Some platforms don't provide _mcount.

2018-07-17 Thread Joerg Sonnenberger via cfe-commits
Author: joerg Date: Tue Jul 17 06:13:34 2018 New Revision: 337277 URL: http://llvm.org/viewvc/llvm-project?rev=337277&view=rev Log: Always use __mcount on NetBSD. Some platforms don't provide _mcount. Modified: cfe/trunk/lib/Basic/Targets/OSTargets.h cfe/trunk/test/CodeGen/mcount.c cf

r337278 - Revert "[Sema] Reword warning for constant captures that are not required"

2018-07-17 Thread Benjamin Kramer via cfe-commits
Author: d0k Date: Tue Jul 17 06:17:01 2018 New Revision: 337278 URL: http://llvm.org/viewvc/llvm-project?rev=337278&view=rev Log: Revert "[Sema] Reword warning for constant captures that are not required" This reverts commit r337152. This applies to non-constants too. The real explanation is that

[PATCH] D49424: [PowerPC] Handle __builtin_xxpermdi the same way as GCC does

2018-07-17 Thread Nemanja Ivanovic via Phabricator via cfe-commits
nemanjai created this revision. nemanjai added reviewers: lu-zero, hfinkel. Herald added a subscriber: kbarton. The codegen for this builtin was initially implemented to match GCC. However, due to interest from users GCC changed behaviour to account for the big endian bias of the instruction and

Re: r337152 - [Sema] Reword warning for constant captures that are not required

2018-07-17 Thread Benjamin Kramer via cfe-commits
Thanks for noticing. Reverted for now in r337278. The wording is still bad, but talking about ODR uses in there feels worse. On Tue, Jul 17, 2018 at 1:02 PM Malcolm Parsons wrote: > On Mon, 16 Jul 2018 at 10:57, Benjamin Kramer via cfe-commits > wrote: > > - auto explicit_by_value_unused_sizeo

[PATCH] D49424: [PowerPC] Handle __builtin_xxpermdi the same way as GCC does

2018-07-17 Thread Luca Barbato via Phabricator via cfe-commits
lu-zero accepted this revision. lu-zero added a comment. This revision is now accepted and ready to land. Looks good, thank you! Repository: rC Clang https://reviews.llvm.org/D49424 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://l

[PATCH] D45444: [clang-tidy] implement new check for const-correctness

2018-07-17 Thread Jonas Toth via Phabricator via cfe-commits
JonasToth added a comment. What do you mean by "The code is a bit more intimidating", the check itself or the amount of tests? In general the utility piece that was commited before this check should already analyze the constness good, given that this check builds upon it the functionality should

r337284 - [Tooling] Add operator== to CompileCommand

2018-07-17 Thread Simon Marchi via cfe-commits
Author: simark Date: Tue Jul 17 07:13:05 2018 New Revision: 337284 URL: http://llvm.org/viewvc/llvm-project?rev=337284&view=rev Log: [Tooling] Add operator== to CompileCommand Summary: It does the obvious thing of comparing all fields. This will be needed for a clangd patch I have in the pipelin

[PATCH] D49265: [Tooling] Add operator== to CompileCommand

2018-07-17 Thread Simon Marchi via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC337284: [Tooling] Add operator== to CompileCommand (authored by simark, committed by ). Changed prior to commit: https://reviews.llvm.org/D49265?vs=155773&id=155883#toc Repository: rL LLVM https://r

[PATCH] D49265: [Tooling] Add operator== to CompileCommand

2018-07-17 Thread Simon Marchi via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL337284: [Tooling] Add operator== to CompileCommand (authored by simark, committed by ). Herald added a subscriber: llvm-commits. Repository: rL LLVM https://reviews.llvm.org/D49265 Files: cfe/trunk/

[PATCH] D49398: clang-cl: Postpone Wmsvc-not-found emission until link.exe gets used.

2018-07-17 Thread Nico Weber via Phabricator via cfe-commits
thakis added inline comments. Comment at: lib/Driver/ToolChains/MSVC.cpp:467-468 if (Linker.equals_lower("link")) { +if (!TC.FoundMSVCInstall()) + C.getDriver().Diag(clang::diag::warn_drv_msvc_not_found); + zturner wrote: > It looks like it's possible

r337285 - Remove superfluous ; to fix -Wpedantic warning from gcc

2018-07-17 Thread Nico Weber via cfe-commits
Author: nico Date: Tue Jul 17 07:20:02 2018 New Revision: 337285 URL: http://llvm.org/viewvc/llvm-project?rev=337285&view=rev Log: Remove superfluous ; to fix -Wpedantic warning from gcc Modified: cfe/trunk/unittests/AST/ASTImporterTest.cpp Modified: cfe/trunk/unittests/AST/ASTImporterTest.c

[PATCH] D49398: clang-cl: Postpone Wmsvc-not-found emission until link.exe gets used.

2018-07-17 Thread Nico Weber via Phabricator via cfe-commits
thakis updated this revision to Diff 155885. thakis added a comment. address comment https://reviews.llvm.org/D49398 Files: lib/Driver/ToolChains/MSVC.cpp lib/Driver/ToolChains/MSVC.h Index: lib/Driver/ToolChains/MSVC.h === -

[PATCH] D49114: [clang-tidy] Add a check for "magic numbers"

2018-07-17 Thread Jonas Toth via Phabricator via cfe-commits
JonasToth added a comment. In https://reviews.llvm.org/D49114#1164788, @0x8000- wrote: > @aaron.ballman , @JonasToth , @Eugene.Zelenko Is there anything missing from > this patch? What do I need to do to get it merged? This is my first > contribution to LLVM so I'm not quite sure. Thank you

[PATCH] D49356: [clang-tidy: modernize] Fix modernize-use-equals-default with {} brackets list initialization: patch

2018-07-17 Thread Idriss via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. IdrissRio marked an inline comment as done. Closed by commit rCTE337286: [clang-tidy: modernize] Fix modernize-use-equals-default with {} brackets list… (authored by IdrissRio, committed by ). Changed prior to commit: ht

[clang-tools-extra] r337286 - [clang-tidy: modernize] Fix modernize-use-equals-default with {} brackets list initialization: patch

2018-07-17 Thread Idriss Riouak via cfe-commits
Author: idrissrio Date: Tue Jul 17 07:35:15 2018 New Revision: 337286 URL: http://llvm.org/viewvc/llvm-project?rev=337286&view=rev Log: [clang-tidy: modernize] Fix modernize-use-equals-default with {} brackets list initialization: patch Summary: Hello, i would like to suggest a fix for one of th

Re: [PATCH] D49398: clang-cl: Postpone Wmsvc-not-found emission until link.exe gets used.

2018-07-17 Thread Zachary Turner via cfe-commits
Lgtm. I also have a hard time saying which is best, we’re basically trying to help people who have already strayed from the path, so there’s probably no objectively correct answer On Tue, Jul 17, 2018 at 7:26 AM Nico Weber via Phabricator < revi...@reviews.llvm.org> wrote: > thakis updated this re

[PATCH] D49398: clang-cl: Postpone Wmsvc-not-found emission until link.exe gets used.

2018-07-17 Thread Zachary Turner via Phabricator via cfe-commits
zturner added a comment. Lgtm. I also have a hard time saying which is best, we’re basically trying to help people who have already strayed from the path, so there’s probably no objectively correct answer https://reviews.llvm.org/D49398 ___ cfe-comm

r337289 - [Fixed Point Arithmetic] Fix for bug where integer literals could be treated as fixed point literals

2018-07-17 Thread Leonard Chan via cfe-commits
Author: leonardchan Date: Tue Jul 17 07:58:49 2018 New Revision: 337289 URL: http://llvm.org/viewvc/llvm-project?rev=337289&view=rev Log: [Fixed Point Arithmetic] Fix for bug where integer literals could be treated as fixed point literals This addresses a bug brought up in https://bugs.llvm.org/

[PATCH] D49327: [Fixed Point Arithmetic] Fix for bug where integer literals could be treated as fixed point literals

2018-07-17 Thread Leonard Chan via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC337289: [Fixed Point Arithmetic] Fix for bug where integer literals could be treated as… (authored by leonardchan, committed by ). Changed prior to commit: https://reviews.llvm.org/D49327?vs=155519&id=1

[PATCH] D47894: [clang]: Add support for "-fno-delete-null-pointer-checks"

2018-07-17 Thread Manoj Gupta via Phabricator via cfe-commits
manojgupta updated this revision to Diff 155891. manojgupta added a comment. Added helper text, updated tests. Repository: rC Clang https://reviews.llvm.org/D47894 Files: docs/ClangCommandLineReference.rst include/clang/Driver/Options.td include/clang/Frontend/CodeGenOptions.def lib/

[PATCH] D49398: clang-cl: Postpone Wmsvc-not-found emission until link.exe gets used.

2018-07-17 Thread Nico Weber via Phabricator via cfe-commits
thakis accepted this revision. thakis added a comment. This revision is now accepted and ready to land. r337290, thanks! https://reviews.llvm.org/D49398 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/li

r337290 - clang-cl: Postpone Wmsvc-not-found emission until link.exe gets used.

2018-07-17 Thread Nico Weber via cfe-commits
Author: nico Date: Tue Jul 17 08:07:40 2018 New Revision: 337290 URL: http://llvm.org/viewvc/llvm-project?rev=337290&view=rev Log: clang-cl: Postpone Wmsvc-not-found emission until link.exe gets used. Wmsvc-not-found was added in r297851 to help diagnose why link.exe can't be executed. However, i

[PATCH] D47894: [clang]: Add support for "-fno-delete-null-pointer-checks"

2018-07-17 Thread James Y Knight via Phabricator via cfe-commits
jyknight accepted this revision. jyknight added a comment. This revision is now accepted and ready to land. Please refer to the commit for the LLVM half of the change in the commit message for this. LGTM, other than some minor suggestions for the help texts. Comment at: docs/

[PATCH] D48559: [clangd] refactoring for XPC transport layer [NFCI]

2018-07-17 Thread Jan Korous via Phabricator via cfe-commits
jkorous added a comment. Hi Sam, thanks for your feedback! In general I agree that explicitly factoring out the transport layer and improving layering would be a good thing. Unfortunately it's highly probable that we'd like to drop JSON completely from XPC dispatch (XPC -> JSON -> ProtocolCall

[PATCH] D41412: [libcxx] implement concat() and split()

2018-07-17 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists added inline comments. Herald added subscribers: bixia, jlebar. Comment at: libcxx/include/experimental/simd:994 + +// NOTE: _Abis... is the extension proposed by P0820, allowing the APIs to +// propagate _StorageKind during transforming input type(s) to the output ty

[PATCH] D45124: [CodeGen] Record if a C++ record is a trivial type when emitting Codeview

2018-07-17 Thread Zachary Turner via Phabricator via cfe-commits
zturner added a comment. Why do we only want this for CodeView? Repository: rC Clang https://reviews.llvm.org/D45124 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D49244: Always search sysroot for GCC installs

2018-07-17 Thread David Greene via Phabricator via cfe-commits
greened added a comment. Ping. Repository: rC Clang https://reviews.llvm.org/D49244 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D45444: [clang-tidy] implement new check for const-correctness

2018-07-17 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added a comment. > But you could also take a look at the enforcement of some coding > guidelines (my personal todolists: > https://github.com/JonasToth/CppCoreGuidelinesTooling  > https://github.com/JonasToth/HighIntegrityTooling). There are always low > hanging fruit checks. Im

[PATCH] D49112: [Sema] Implement -Wmemset-transposed-args

2018-07-17 Thread Erik Pilkington via Phabricator via cfe-commits
erik.pilkington planned changes to this revision. erik.pilkington added a comment. In https://reviews.llvm.org/D49112#1158793, @thakis wrote: > lgtm assuming you ran this on some large code base to make sure it doesn't > have false positives. Sorry for the delay here, I was running this on som

[PATCH] D49114: [clang-tidy] Add a check for "magic numbers"

2018-07-17 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added a comment. Adding C++ Core Guidelines alias is definitely low-hanging fruit which could be implemented within this patch. Comment at: clang-tidy/readability/MagicNumbersCheck.cpp:14 +#include "clang/ASTMatchers/ASTMatchFinder.h" + +#include --

[PATCH] D48562: [clangd] XPC transport layer

2018-07-17 Thread Jan Korous via Phabricator via cfe-commits
jkorous added a reviewer: sammccall. jkorous added a comment. Hi Sam, I am definitely open to discussion about the right abstraction. I will push patches rebased on TOT and changes based on your comments today or tomorrow and I am trying to figure out how could we use your Transport abstraction

[PATCH] D49199: [analyzer][UninitializedObjectChecker] Pointer/reference objects are dereferenced according to dynamic type

2018-07-17 Thread Umann Kristóf via Phabricator via cfe-commits
Szelethus updated this revision to Diff 155913. Szelethus added a comment. Rebased to the latest trunk. https://reviews.llvm.org/D49199 Files: lib/StaticAnalyzer/Checkers/UninitializedObjectChecker.cpp test/Analysis/cxx-uninitialized-object-inheritance.cpp test/Analysis/cxx-uninitialized-

[PATCH] D49228: [analyzer][UninitializedObjectChecker] Void pointer objects are casted back to their dynmic type in note message

2018-07-17 Thread Umann Kristóf via Phabricator via cfe-commits
Szelethus updated this revision to Diff 155915. Szelethus added a comment. Rebased to the latest trunk. https://reviews.llvm.org/D49228 Files: lib/StaticAnalyzer/Checkers/UninitializedObjectChecker.cpp test/Analysis/cxx-uninitialized-object-ptr-ref.cpp Index: test/Analysis/cxx-uninitialize

[PATCH] D49112: [Sema] Implement -Wmemset-transposed-args

2018-07-17 Thread Arthur O'Dwyer via Phabricator via cfe-commits
Quuxplusone added inline comments. Comment at: clang/lib/Sema/SemaChecking.cpp:7984 + if (isa(ThirdArg) && + cast(ThirdArg)->getValue() == 0) { +WarningKind = 0; > Suppress the diagnostic in cases like `memset(ptr, 0xff, PADDING)`, when > `PADDING` is

r337304 - [analyzer] Fix Z3 backend after D48205

2018-07-17 Thread Mikhail R. Gadelha via cfe-commits
Author: mramalho Date: Tue Jul 17 10:40:34 2018 New Revision: 337304 URL: http://llvm.org/viewvc/llvm-project?rev=337304&view=rev Log: [analyzer] Fix Z3 backend after D48205 Summary: An assertion was added in D48205 to catch places where a `nonloc::SymbolVal` was wrapping a `loc` object. This p

[PATCH] D49228: [analyzer][UninitializedObjectChecker] Void pointer objects are casted back to their dynmic type in note message

2018-07-17 Thread George Karpenkov via Phabricator via cfe-commits
george.karpenkov requested changes to this revision. george.karpenkov added a comment. This revision now requires changes to proceed. Cf. my comments to https://reviews.llvm.org/D49437: while this change looks great, is it possible to separate the pointer chasing from the rest of the checker?

[PATCH] D49199: [analyzer][UninitializedObjectChecker] Pointer/reference objects are dereferenced according to dynamic type

2018-07-17 Thread George Karpenkov via Phabricator via cfe-commits
george.karpenkov requested changes to this revision. george.karpenkov added a comment. This revision now requires changes to proceed. Cf. my comments to https://reviews.llvm.org/D49437: is it possible to separate pointer-chasing from the rest of the checker? https://reviews.llvm.org/D49199 _

[PATCH] D49438: [analyzer][UninitializedObjectChecker] New flag to turn off dereferencing

2018-07-17 Thread Umann Kristóf via Phabricator via cfe-commits
Szelethus created this revision. Szelethus added reviewers: NoQ, george.karpenkov, rnkovacs, xazax.hun. Herald added subscribers: cfe-commits, mikhail.ramalho, a.sidorin, szepet, whisperity. The idea came from both @george.karpenkov (https://reviews.llvm.org/D45532#1145592) and from bugzilla (h

[PATCH] D49317: Move __construct_forward (etc.) out of std::allocator_traits.

2018-07-17 Thread Volodymyr Sapsai via Phabricator via cfe-commits
vsapsai added inline comments. Comment at: include/vector:300 +{ +using _Alloc_traits = allocator_traits<_Alloc>; +for (; __begin1 != __end1; ++__begin1, (void)++__begin2) Quuxplusone wrote: > vsapsai wrote: > > Have you checked why `using` is accepted in

[PATCH] D49438: [analyzer][UninitializedObjectChecker] New flag to turn off dereferencing

2018-07-17 Thread George Karpenkov via Phabricator via cfe-commits
george.karpenkov added a comment. @Szelethus false positives are a single biggest problem of the analyzer. By a *huge* margin, most projects would prefer to err on the side of less, more precise, warnings. Given that currently in my understanding no actual bugs we are sure about were found by th

[PATCH] D49438: [analyzer][UninitializedObjectChecker] New flag to turn off dereferencing

2018-07-17 Thread Umann Kristóf via Phabricator via cfe-commits
Szelethus added a comment. I left a comment on this issue already: https://reviews.llvm.org/D49437#1165462. But in short, definitely yes! It's been very painful to work around pointer/reference objects, too bad I didn't come up with this idea sooner :) Repository: rC Clang https://reviews.

[PATCH] D49438: [analyzer][UninitializedObjectChecker] New flag to turn off dereferencing

2018-07-17 Thread George Karpenkov via Phabricator via cfe-commits
george.karpenkov requested changes to this revision. george.karpenkov added inline comments. This revision now requires changes to proceed. Comment at: lib/StaticAnalyzer/Checkers/UninitializedObjectChecker.cpp:715 void ento::registerUninitializedObjectChecker(CheckerManager &Mg

[PATCH] D49213: [analyzer] pr38072: Suppress an assertion failure for eliding the same destructor twice due to the default argument problem.

2018-07-17 Thread George Karpenkov via Phabricator via cfe-commits
george.karpenkov accepted this revision. george.karpenkov added a comment. This revision is now accepted and ready to land. LGTM with a nit. Comment at: test/Analysis/temporaries.cpp:472 + for (int i = 0;;) +F j(i ? j : h); +} // no-crash? Repository:

[PATCH] D15225: [Driver] Sanitizer support based on runtime library presence

2018-07-17 Thread George Karpenkov via Phabricator via cfe-commits
george.karpenkov added a comment. @delcypher Could you take a look? @kcc Any objections? https://reviews.llvm.org/D15225 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D49439: [Sema] Fix a crash while converting constructors to deduction guides

2018-07-17 Thread Erik Pilkington via Phabricator via cfe-commits
erik.pilkington created this revision. erik.pilkington added a reviewer: rsmith. Herald added a reviewer: javed.absar. Herald added subscribers: dexonsmith, kristof.beyls. The problem was with constructors that have parameters that refer to previous ones, such as `D` below: template struct A

[PATCH] D49424: [PowerPC] Handle __builtin_xxpermdi the same way as GCC does

2018-07-17 Thread Eli Friedman via Phabricator via cfe-commits
efriedma added inline comments. Comment at: lib/CodeGen/CGBuiltin.cpp:10780 // endian order so the shuffle mask must be adjusted for this on little // endian platforms (i.e. index is complemented and source vector reversed). +unsigned ElemIdx0 = (Index & 2) >> 1;;

[libunwind] r337312 - The semantics of DW_CFA_GNU_args_size have changed subtile over the

2018-07-17 Thread Joerg Sonnenberger via cfe-commits
Author: joerg Date: Tue Jul 17 12:00:51 2018 New Revision: 337312 URL: http://llvm.org/viewvc/llvm-project?rev=337312&view=rev Log: The semantics of DW_CFA_GNU_args_size have changed subtile over the years. Adopt the new convention that it is call-site specific and that it should be applied before

[PATCH] D38680: [libunwind] Fix handling of DW_CFA_GNU_args_size

2018-07-17 Thread Joerg Sonnenberger via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL337312: The semantics of DW_CFA_GNU_args_size have changed subtile over the (authored by joerg, committed by ). Herald added subscribers: llvm-commits, christof. Changed prior to commit: https://reviews

[PATCH] D49360: [analyzer] Add support for more basic_string API in DanglingInternalBufferChecker

2018-07-17 Thread Reka Kovacs via Phabricator via cfe-commits
rnkovacs added inline comments. Comment at: test/Analysis/dangling-internal-buffer.cpp:175 std::string s; - { -c = s.c_str(); - } - consume(c); // no-warning + c = s.c_str(); // expected-note {{Pointer to dangling buffer was obtained here}} + s.clear(); // expect

[PATCH] D49360: [analyzer] Add support for more basic_string API in DanglingInternalBufferChecker

2018-07-17 Thread Reka Kovacs via Phabricator via cfe-commits
rnkovacs updated this revision to Diff 155944. rnkovacs marked 2 inline comments as done. rnkovacs added a reviewer: dcoughlin. rnkovacs added a comment. Note messages updated. https://reviews.llvm.org/D49360 Files: lib/StaticAnalyzer/Checkers/DanglingInternalBufferChecker.cpp lib/StaticAna

[PATCH] D48559: [clangd] refactoring for XPC transport layer [NFCI]

2018-07-17 Thread Sam McCall via Phabricator via cfe-commits
sammccall added a comment. In https://reviews.llvm.org/D48559#1165172, @jkorous wrote: > Hi Sam, thanks for your feedback! > > In general I agree that explicitly factoring out the transport layer and > improving layering would be a good thing. Unfortunately it's highly probable > that we'd like

[PATCH] D45015: [Preprocessor] Allow libc++ to detect when aligned allocation is unavailable.

2018-07-17 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF added a reviewer: dexonsmith. EricWF added a comment. Ping. Are there any more reviewers I should add to this? https://reviews.llvm.org/D45015 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/list

r337321 - Remove unnecessary trailing ; in macro intrinsic definition.

2018-07-17 Thread Eric Christopher via cfe-commits
Author: echristo Date: Tue Jul 17 13:22:17 2018 New Revision: 337321 URL: http://llvm.org/viewvc/llvm-project?rev=337321&view=rev Log: Remove unnecessary trailing ; in macro intrinsic definition. Modified: cfe/trunk/lib/Headers/avx512dqintrin.h Modified: cfe/trunk/lib/Headers/avx512dqintrin.

[PATCH] D49396: [WebAssembly] Support for atomic.wait / atomic.wake builtins

2018-07-17 Thread Heejin Ahn via Phabricator via cfe-commits
aheejin updated this revision to Diff 155958. aheejin added a comment. - Type fix Repository: rC Clang https://reviews.llvm.org/D49396 Files: include/clang/Basic/BuiltinsWebAssembly.def lib/CodeGen/CGBuiltin.cpp test/CodeGen/builtins-wasm.c Index: test/CodeGen/builtins-wasm.c ===

[PATCH] D45015: [Preprocessor] Allow libc++ to detect when aligned allocation is unavailable.

2018-07-17 Thread Arthur O'Dwyer via Phabricator via cfe-commits
Quuxplusone added inline comments. Comment at: include/clang/Basic/DiagnosticSemaKinds.td:6425 + "available on %2 %3 or newer">; def note_silence_unligned_allocation_unavailable : Note< "if you supply your own aligned allocation functions, use " I observe th

[PATCH] D49360: [analyzer] Add support for more basic_string API in DanglingInternalBufferChecker

2018-07-17 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added a comment. I showed the bug mentioned in https://reviews.llvm.org/D49058 to a friend who didn't do much C++ recently, for a fresh look, and he provided a bunch of interesting feedback by explaining the way he didn't understand what the analyzer was trying to say. 1. When we call `c_s

[PATCH] D15225: [Driver] Sanitizer support based on runtime library presence

2018-07-17 Thread Dan Liew via Phabricator via cfe-commits
delcypher requested changes to this revision. delcypher added a comment. This revision now requires changes to proceed. Seems mostly fine apart from some minor nits. If I'm honest I don't see any reason why this should be Darwin specific. Sure the naming convention and location of the runtime li

[PATCH] D15225: [Driver] Sanitizer support based on runtime library presence

2018-07-17 Thread Dan Liew via Phabricator via cfe-commits
delcypher added inline comments. Comment at: clang/lib/Driver/ToolChains/Darwin.cpp:2298 SanitizerMask Res = ToolChain::getSupportedSanitizers(); - Res |= SanitizerKind::Address; - Res |= SanitizerKind::Leak; - Res |= SanitizerKind::Fuzzer; - Res |= SanitizerKind::FuzzerNo

r337327 - [COFF] Add more missing MSVC ARM64 intrinsics

2018-07-17 Thread Mandeep Singh Grang via cfe-commits
Author: mgrang Date: Tue Jul 17 15:03:24 2018 New Revision: 337327 URL: http://llvm.org/viewvc/llvm-project?rev=337327&view=rev Log: [COFF] Add more missing MSVC ARM64 intrinsics Summary: Added the following intrinsics: _BitScanForward, _BitScanReverse, _BitScanForward64, _BitScanReverse64 _Inter

[PATCH] D49148: [DEBUGINFO] Disable unsupported debug info options for NVPTX target.

2018-07-17 Thread Eric Christopher via Phabricator via cfe-commits
echristo added a comment. I think you should break it out on an option by option basis. Just warning on "non-standard" options doesn't really make sense. Repository: rC Clang https://reviews.llvm.org/D49148 ___ cfe-commits mailing list cfe-commi

[PATCH] D49083: [HIP] Register/unregister device fat binary only once

2018-07-17 Thread John McCall via Phabricator via cfe-commits
rjmccall added inline comments. Comment at: lib/CodeGen/CGCUDANV.cpp:444 +auto HandleValue = +CtorBuilder.CreateAlignedLoad(GpuBinaryHandle, CGM.getPointerAlign()); +llvm::Constant *Zero = llvm::Constant::getNullValue(HandleValue->getType()); Do

[PATCH] D49294: Sema: Fix explicit address space cast in C++

2018-07-17 Thread John McCall via Phabricator via cfe-commits
rjmccall added inline comments. Comment at: lib/Sema/SemaCast.cpp:2171 + ->getPointeeType() + .getAddressSpace()) { +Kind = CK_AddressSpaceConversion; Please extract t

r337329 - Restructure checking for, and warning on, lifetime extension.

2018-07-17 Thread Richard Smith via cfe-commits
Author: rsmith Date: Tue Jul 17 15:24:09 2018 New Revision: 337329 URL: http://llvm.org/viewvc/llvm-project?rev=337329&view=rev Log: Restructure checking for, and warning on, lifetime extension. This change implements C++ DR1696, which makes initialization of a reference member of a class from a

r337330 - Replace LLVM_ALIGNAS with just alignas.

2018-07-17 Thread Richard Smith via cfe-commits
Author: rsmith Date: Tue Jul 17 15:24:11 2018 New Revision: 337330 URL: http://llvm.org/viewvc/llvm-project?rev=337330&view=rev Log: Replace LLVM_ALIGNAS with just alignas. Various places in Clang and LLVM are already using alignas; it seems our minimum host configuration now requires it. Modifi

[PATCH] D48661: [Fixed Point Arithmetic] Fixed Point Constant

2018-07-17 Thread John McCall via Phabricator via cfe-commits
rjmccall added inline comments. Comment at: include/clang/AST/ASTContext.h:1953 unsigned char getFixedPointIBits(QualType Ty) const; + FixedPointSemantics getFixedPointSema(QualType Ty) const; + APFixedPoint getFixedPointMax(QualType Ty) const; rjmccall wrot

[PATCH] D49403: More aggressively complete RecordTypes with Function Pointers

2018-07-17 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. Can you explain why this is important for the optimizer? https://reviews.llvm.org/D49403 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D48808: [CodeGen] Emit parallel_loop_access for each loop in the loop stack.

2018-07-17 Thread Michael Kruse via Phabricator via cfe-commits
Meinersbur added a comment. ping Repository: rC Clang https://reviews.llvm.org/D48808 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D47233: [CodeGen] Emit MSVC RTTI for Obj-C EH types

2018-07-17 Thread John McCall via Phabricator via cfe-commits
rjmccall added inline comments. Comment at: lib/CodeGen/CGObjCMac.cpp:7457-7460 CGObjCNonFragileABIMac::GetEHType(QualType T) { // There's a particular fixed type info for 'id'. if (T->isObjCIdType() || T->isObjCQualifiedIdType()) { +if (CGM.getTriple().isWindowsMSVCEn

  1   2   >