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

2018-07-16 Thread Balázs Kéri via Phabricator via cfe-commits
balazske added inline comments. Comment at: lib/AST/ASTStructuralEquivalence.cpp:913 - if (D1->isAnonymousStructOrUnion() && D2->isAnonymousStructOrUnion()) { + if (!D1->getDeclName() && !D2->getDeclName()) { // If both anonymous structs/unions are in a record context, m

r337148 - [Sema] Add fixit for unused lambda captures

2018-07-16 Thread Alexander Shaposhnikov via cfe-commits
Author: alexshap Date: Mon Jul 16 00:23:47 2018 New Revision: 337148 URL: http://llvm.org/viewvc/llvm-project?rev=337148&view=rev Log: [Sema] Add fixit for unused lambda captures This diff adds a fixit to suggest removing unused lambda captures in the appropriate diagnostic. Patch by Andrew Com

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

2018-07-16 Thread Alexander Shaposhnikov via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC337148: [Sema] Add fixit for unused lambda captures (authored by alexshap, committed by ). Changed prior to commit: https://reviews.llvm.org/D48845?vs=155616&id=155624#toc Repository: rC Clang https

[PATCH] D49245: [ASTImporter] Import implicit methods of existing class.

2018-07-16 Thread Balázs Kéri via Phabricator via cfe-commits
balazske updated this revision to Diff 155625. balazske added a comment. - Small style and comment changes. Repository: rC Clang https://reviews.llvm.org/D49245 Files: lib/AST/ASTImporter.cpp unittests/AST/ASTImporterTest.cpp Index: unittests/AST/ASTImporterTest.cpp

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

2018-07-16 Thread Balázs Kéri via Phabricator via cfe-commits
balazske added inline comments. Comment at: lib/AST/ASTImporter.cpp:6741 + + auto *Ctor = dyn_cast(Importer.Import( + E->getConstructor())); a_sidorin wrote: > cast_or_null? dyn_cast_or_null: Import may return nullptr, but if not, the cast should succeed (

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

2018-07-16 Thread Balázs Kéri via Phabricator via cfe-commits
balazske added inline comments. Comment at: lib/AST/ASTImporter.cpp:2715 +if (auto *ToFT = dyn_cast(Importer.Import(FromFT))) + ToFunction->setDescribedFunctionTemplate(ToFT); +else a_sidorin wrote: > The function template should be already set after

[PATCH] D48395: Added PublicOnly flag

2018-07-16 Thread Eric Liu via Phabricator via cfe-commits
ioeric added a comment. In https://reviews.llvm.org/D48395#1158869, @juliehockett wrote: > Remember to mark comments as done when they are. Otherwise, LGTM unless > @ioeric has any concerns. No concern if this looks good to Julie. Comment at: clang-tools-extra/test/clang-do

[PATCH] D46013: [ARM] Conform to AAPCS when passing overaligned composites as arguments

2018-07-16 Thread Momchil Velikov via Phabricator via cfe-commits
chill added a comment. Ping? https://reviews.llvm.org/D46013 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2018-07-16 Thread Balázs Kéri via Phabricator via cfe-commits
balazske updated this revision to Diff 155630. balazske added a comment. - Removed setDescribedFunctionTemplate call. Repository: rC Clang https://reviews.llvm.org/D49235 Files: lib/AST/ASTImporter.cpp unittests/AST/ASTImporterTest.cpp Index: unittests/AST/ASTImporterTest.cpp =

r337151 - [Analyzer] Mark `SymbolData` parts of iterator position as live in program state maps

2018-07-16 Thread Adam Balogh via cfe-commits
Author: baloghadamsoftware Date: Mon Jul 16 02:27:27 2018 New Revision: 337151 URL: http://llvm.org/viewvc/llvm-project?rev=337151&view=rev Log: [Analyzer] Mark `SymbolData` parts of iterator position as live in program state maps Marking a symbolic expression as live is non-recursive. In our ch

[PATCH] D48764: [Analyzer] Hotfix for iterator checkers: Mark left-hand side of `SymIntExpr` objects as live in the program state maps.

2018-07-16 Thread Balogh , Ádám via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL337151: [Analyzer] Mark `SymbolData` parts of iterator position as live in program… (authored by baloghadamsoftware, committed by ). Herald added a subscriber: llvm-commits. Changed prior to commit: htt

[PATCH] D48560: [clangd] JSON <-> XPC conversions

2018-07-16 Thread Sam McCall via Phabricator via cfe-commits
sammccall accepted this revision. sammccall added a comment. This revision is now accepted and ready to land. Sorry it took so long for these to get attention. Starting here because it's simple and helps me understand the bigger patches This one looks good, really just nits. ===

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

2018-07-16 Thread Benjamin Kramer via cfe-commits
Author: d0k Date: Mon Jul 16 02:52:02 2018 New Revision: 337152 URL: http://llvm.org/viewvc/llvm-project?rev=337152&view=rev Log: [Sema] Reword warning for constant captures that are not required This is one of the darker corners of C++, make it clear that this is about constants and rephrase it

[PATCH] D48562: [clangd] XPC transport layer

2018-07-16 Thread Sam McCall via Phabricator via cfe-commits
sammccall added a comment. Just an initial couple of thoughts here, haven't yet been through in detail. Mostly I wonder if we can use slightly different abstractions in https://reviews.llvm.org/D48559 to so the JSON/XPC parts get the code reuse we want but the work required to call one vs the o

[PATCH] D49074: [Analyzer] [WIP] Basic support for multiplication and division in the constraint manager

2018-07-16 Thread Balogh , Ádám via Phabricator via cfe-commits
baloghadamsoftware added a comment. In https://reviews.llvm.org/D49074#1160793, @NoQ wrote: > I'd also rather stick to integer arithmetic and avoid using floats even in > intermediate calculations. It'd be hard to make sure that no rounding errors > kick in if we use floats. Yes, I agree. I t

r337162 - [ASTImporter] Import implicit methods of existing class.

2018-07-16 Thread Balazs Keri via cfe-commits
Author: balazske Date: Mon Jul 16 05:16:39 2018 New Revision: 337162 URL: http://llvm.org/viewvc/llvm-project?rev=337162&view=rev Log: [ASTImporter] Import implicit methods of existing class. Summary: When an already existing class is encountered during import, check if it has implicit methods th

[PATCH] D49245: [ASTImporter] Import implicit methods of existing class.

2018-07-16 Thread Balázs Kéri via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC337162: [ASTImporter] Import implicit methods of existing class. (authored by balazske, committed by ). Changed prior to commit: https://reviews.llvm.org/D49245?vs=155625&id=155648#toc Repository: rC

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

2018-07-16 Thread Jonas Toth via Phabricator via cfe-commits
JonasToth added a comment. Yes. https://github.com/JonasToth/clang-tools-extra/tree/check_const This is the branch i work on. I got it up to date with the current master for CTE. :) Am 14.07.2018 um 20:59 schrieb Florin Iucha via Phabricator: > 0x8000- added a comment. > > In https://revi

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

2018-07-16 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman accepted this revision. aaron.ballman added a comment. This revision is now accepted and ready to land. LGTM with a formatting nit. Comment at: clang-tidy/modernize/UseEqualsDefaultCheck.cpp:100 AccessToFieldInParam, +

r337167 - [analyzer] Fix constraint being dropped when analyzing a program without taint tracking enabled

2018-07-16 Thread Mikhail R. Gadelha via cfe-commits
Author: mramalho Date: Mon Jul 16 06:14:46 2018 New Revision: 337167 URL: http://llvm.org/viewvc/llvm-project?rev=337167&view=rev Log: [analyzer] Fix constraint being dropped when analyzing a program without taint tracking enabled Summary: This patch removes the constraint dropping when taint tr

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

2018-07-16 Thread Gabor Marton via Phabricator via cfe-commits
martong updated this revision to Diff 155660. martong marked 6 inline comments as done. martong added a comment. Address review comments Repository: rC Clang https://reviews.llvm.org/D49296 Files: lib/AST/ASTStructuralEquivalence.cpp unittests/AST/ASTImporterTest.cpp unittests/AST/Stru

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

2018-07-16 Thread Gabor Marton via Phabricator via cfe-commits
martong added inline comments. Comment at: lib/AST/ASTStructuralEquivalence.cpp:913 - if (D1->isAnonymousStructOrUnion() && D2->isAnonymousStructOrUnion()) { + if (!D1->getDeclName() && !D2->getDeclName()) { // If both anonymous structs/unions are in a record context, ma

r337169 - [analyzer] Fix the Z3 backend always generating unsigned APSInt

2018-07-16 Thread Mikhail R. Gadelha via cfe-commits
Author: mramalho Date: Mon Jul 16 06:32:22 2018 New Revision: 337169 URL: http://llvm.org/viewvc/llvm-project?rev=337169&view=rev Log: [analyzer] Fix the Z3 backend always generating unsigned APSInt Summary: In `toAPSInt`, the Z3 backend was not checking the variable `Int`'s type and was always

[PATCH] D49305: [analyzer] Fix the Z3 backend always generating unsigned APSInt

2018-07-16 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC337169: [analyzer] Fix the Z3 backend always generating unsigned APSInt (authored by mramalho, committed by ). Herald added a subscriber: cfe-commits. Repository: rC Clang https://reviews.llvm.org/D493

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

2018-07-16 Thread Gabor Marton via Phabricator via cfe-commits
martong added a comment. Hi Aleksei, Unfortunately, it seems that it is very to hard synthesize a lit or unit test for this fix. I have found this flaw during the CTU analysis of Bitcoin, where the AST was immense. Because of the lack of tests, now I am trying to persuade you based on some th

r337172 - [ASTImporter] Changed constant int to unsigned int in test code.

2018-07-16 Thread Balazs Keri via cfe-commits
Author: balazske Date: Mon Jul 16 07:05:18 2018 New Revision: 337172 URL: http://llvm.org/viewvc/llvm-project?rev=337172&view=rev Log: [ASTImporter] Changed constant int to unsigned int in test code. Modified: cfe/trunk/unittests/AST/ASTImporterTest.cpp Modified: cfe/trunk/unittests/AST/ASTI

[PATCH] D49375: [NEON] Define half-precision vmaxnm intrinsics only when available

2018-07-16 Thread Ivan Kosarev via Phabricator via cfe-commits
kosarev created this revision. kosarev added reviewers: SjoerdMeijer, jgreenhalgh, rengolin. kosarev added a project: clang. Herald added a reviewer: javed.absar. https://reviews.llvm.org/D49375 Files: include/clang/Basic/arm_neon.td test/Sema/arm-no-fp16.c Index: test/Sema/arm-no-fp16.c ==

[PATCH] D49376: [NEON] Define half-precision vrnd intrinsics only when available

2018-07-16 Thread Ivan Kosarev via Phabricator via cfe-commits
kosarev created this revision. kosarev added reviewers: SjoerdMeijer, jgreenhalgh, rengolin. kosarev added a project: clang. Herald added a reviewer: javed.absar. https://reviews.llvm.org/D49376 Files: include/clang/Basic/arm_neon.td test/Sema/arm-no-fp16.c Index: test/Sema/arm-no-fp16.c ==

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

2018-07-16 Thread Gabor Marton via Phabricator via cfe-commits
martong updated this revision to Diff 155678. martong added a comment. RecordDecl* -> RecordDecl * Repository: rC Clang https://reviews.llvm.org/D49296 Files: lib/AST/ASTStructuralEquivalence.cpp unittests/AST/ASTImporterTest.cpp unittests/AST/StructuralEquivalenceTest.cpp Index: unit

r337185 - Restore "[ThinLTO] Ensure we always select the same function copy to import"

2018-07-16 Thread Teresa Johnson via cfe-commits
Author: tejohnson Date: Mon Jul 16 08:30:36 2018 New Revision: 337185 URL: http://llvm.org/viewvc/llvm-project?rev=337185&view=rev Log: Restore "[ThinLTO] Ensure we always select the same function copy to import" This reverts commit r337082, restoring r337051, since the LLVM side patch has been r

[PATCH] D49338: Implement - P0122R7

2018-07-16 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists added a comment. Need to add an entry to `include/CMakeLists.txt` as well. https://reviews.llvm.org/D49338 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D41458: [libc++][C++17] Elementary string conversions for integral types

2018-07-16 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists added inline comments. Comment at: include/charconv:372 + +auto __len = __last - __p; +if (__value != 0 || !__len) Are you missing an edge case here? What happens if `__last == __first && __value == 0`? Comment at: test/su

[PATCH] D45805: [libcxx] Remove redundant specializations in type_traits.

2018-07-16 Thread Louis Dionne via Phabricator via cfe-commits
ldionne added a subscriber: mclow.lists. ldionne added inline comments. Comment at: include/type_traits:595 -template -struct __and_<_B0, _B1> : conditional<_B0::value, _B1, _B0>::type {}; - It is not impossible that this was a compile-time optimization for the

[PATCH] D41458: [libc++][C++17] Elementary string conversions for integral types

2018-07-16 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists added inline comments. Comment at: include/charconv:244 +static _LIBCPP_INLINE_VISIBILITY char const* +read(char const* __p, char const* __ep, type& __a, type& __b) +{ Same comment as above about `read` and `inner_product` - they need to b

[PATCH] D41458: [libc++][C++17] Elementary string conversions for integral types

2018-07-16 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists added inline comments. Comment at: include/charconv:359 +auto __gen_digit = [](_Tp __c) { +return "0123456789abcdefghijklmnopqrstuvwxyz"[__c]; +}; Thinking some more - did this used to do more? Because I don't see why having a lambda

[PATCH] D41458: [libc++][C++17] Elementary string conversions for integral types

2018-07-16 Thread Zhihao Yuan via Phabricator via cfe-commits
lichray added inline comments. Comment at: include/charconv:244 +static _LIBCPP_INLINE_VISIBILITY char const* +read(char const* __p, char const* __ep, type& __a, type& __b) +{ mclow.lists wrote: > Same comment as above about `read` and `inner_product`

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

2018-07-16 Thread David Blaikie via Phabricator via cfe-commits
dblaikie added a comment. Any chance this can/should be unit tested? (also, in general (though might not matter in this instance), symmetric operators like == should be implemented as non-members (though they can still be friends and if they are, can be defined inline in the class definition as a

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

2018-07-16 Thread David Blaikie via cfe-commits
Any chance this can/should be unit tested? (also, in general (though might not matter in this instance), symmetric operators like == should be implemented as non-members (though they can still be friends and if they are, can be defined inline in the class definition as a member could be), so any im

r337191 - [OPENMP, NVPTX] Globalize only captured variables.

2018-07-16 Thread Alexey Bataev via cfe-commits
Author: abataev Date: Mon Jul 16 09:49:20 2018 New Revision: 337191 URL: http://llvm.org/viewvc/llvm-project?rev=337191&view=rev Log: [OPENMP, NVPTX] Globalize only captured variables. Sometimes we can try to globalize non-variable declarations, which may lead to compiler crash. Modified: cf

[PATCH] D49058: [analyzer] Move DanglingInternalBufferChecker out of alpha

2018-07-16 Thread Reka Kovacs via Phabricator via cfe-commits
rnkovacs added a comment. In https://reviews.llvm.org/D49058#1159533, @george.karpenkov wrote: > @rnkovacs Do you have evaluation statistics handy for this checker? How many > bugs it finds, on which projects? How many of those are real bugs? In its present form, it does not produce many repor

[PATCH] D41458: [libc++][C++17] Elementary string conversions for integral types

2018-07-16 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists added inline comments. Comment at: include/charconv:372 + +auto __len = __last - __p; +if (__value != 0 || !__len) mclow.lists wrote: > Are you missing an edge case here? What happens if `__last == __first && > __value == 0`? > Nevermind. Ap

[PATCH] D48436: [analyzer][UninitializedObjectChecker] Fixed a false negative by no longer filtering out certain constructor calls

2018-07-16 Thread Umann Kristóf via Phabricator via cfe-commits
Szelethus added inline comments. Comment at: lib/StaticAnalyzer/Checkers/UninitializedObjectChecker.cpp:674 + const LocationContext *LC = Context.getLocationContext(); + while ((LC = LC->getParent())) { + Szelethus wrote: > NoQ wrote: > > george.karpenkov wrote

[PATCH] D49387: [analyzer] Make checkEndFunction() give access to the return statement

2018-07-16 Thread Reka Kovacs via Phabricator via cfe-commits
rnkovacs created this revision. rnkovacs added reviewers: NoQ, xazax.hun, george.karpenkov. Herald added subscribers: mikhail.ramalho, a.sidorin, dkrupp, szepet, baloghadamsoftware, whisperity. Repository: rC Clang https://reviews.llvm.org/D49387 Files: include/clang/StaticAnalyzer/Core/Che

[PATCH] D48862: [OpenEmbedded] Fix lib paths for OpenEmbedded targets

2018-07-16 Thread Mandeep Singh Grang via Phabricator via cfe-commits
mgrang added a comment. Ping 2 for reviews please. https://reviews.llvm.org/D48862 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2018-07-16 Thread Idriss via Phabricator via cfe-commits
IdrissRio updated this revision to Diff 155715. IdrissRio added a comment. Fixed the formatting error with clang-format Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D49356 Files: clang-tidy/modernize/UseEqualsDefaultCheck.cpp test/clang-tidy/modernize-use-equals-default-co

r337196 - [OPENMP] Fix syntactic errors in error messages.

2018-07-16 Thread Alexey Bataev via cfe-commits
Author: abataev Date: Mon Jul 16 11:12:18 2018 New Revision: 337196 URL: http://llvm.org/viewvc/llvm-project?rev=337196&view=rev Log: [OPENMP] Fix syntactic errors in error messages. Fixed spelling of the offloading error messages. Modified: cfe/trunk/lib/CodeGen/CGOpenMPRuntime.cpp cfe/

[PATCH] D22391: [Sema] Add warning for implicitly casting a null constant to a non null pointer type

2018-07-16 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak added inline comments. Comment at: test/Sema/conditional-expr.c:20 vp = 0 ? (double *)0 : (void *)0; - ip = 0 ? (double *)0 : (void *)0; // expected-warning {{incompatible pointer types assigning to 'int *' from 'double *'}} + ip = 0 ? (double *)0 : (void *)0; // e

Re: r336467 - [OPENMP] Fix PR38026: Link -latomic when -fopenmp is used.

2018-07-16 Thread Jonas Hahnfeld via cfe-commits
[ Moving discussion from https://reviews.llvm.org/D49386 to the relevant comment on cfe-commits, CC'ing Hal who commented on the original issue ] Is this change really a good idea? It always requires libatomic for all OpenMP applications, even if there is no 'omp atomic' directive or all of th

[PATCH] D22391: [Sema] Add warning for implicitly casting a null constant to a non null pointer type

2018-07-16 Thread Jordan Rose via Phabricator via cfe-commits
jordan_rose added inline comments. Comment at: test/Sema/conditional-expr.c:20 vp = 0 ? (double *)0 : (void *)0; - ip = 0 ? (double *)0 : (void *)0; // expected-warning {{incompatible pointer types assigning to 'int *' from 'double *'}} + ip = 0 ? (double *)0 : (void *)0; /

[PATCH] D49389: [clangd] Transport abstraction WIP

2018-07-16 Thread Sam McCall via Phabricator via cfe-commits
sammccall created this revision. Herald added subscribers: cfe-commits, jkorous, MaskRay, ioeric, ilya-biryukov. Ideas about abstracting JSON transport away to allow XPC and improve layering. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D49389 Files: clangd/ClangdLSPServer.c

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

2018-07-16 Thread Sam McCall via Phabricator via cfe-commits
sammccall added a comment. Hi Jan, Thanks for putting this together, and apologies - this is one of the places where we don't have nice abstractions/layering, so adding XPC was harder than it should be. As I mentioned on the other review, I think maybe this patch isn't invasive enough, we cou

[PATCH] D49387: [analyzer] Make checkEndFunction() give access to the return statement

2018-07-16 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ accepted this revision. NoQ added a comment. This revision is now accepted and ready to land. Looks great, thanks! Comment at: include/clang/StaticAnalyzer/Core/CheckerManager.h:501 - void _registerForBeginFunction(CheckEndFunctionFunc checkfn); + void _registerForBegin

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

2018-07-16 Thread Simon Marchi via Phabricator via cfe-commits
simark added a comment. In https://reviews.llvm.org/D49265#1163740, @dblaikie wrote: > Any chance this can/should be unit tested? (also, in general (though might > not matter in this instance), symmetric operators like == should be > implemented as non-members (though they can still be friends

[PATCH] D46652: [clang-cl, PCH] Implement support for MS-style PCH through headers

2018-07-16 Thread Nico Weber via Phabricator via cfe-commits
thakis added a comment. Sorry about missing this. Looks great, thanks for doing this. This was a pretty big omission, glad to see it's done now :-) I always imagined we might reuse the precompiled preamble stuff (Lexer::ComputePreamble() etc), but it's pretty clear as-is. Repository: rC Cla

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

2018-07-16 Thread Heejin Ahn via Phabricator via cfe-commits
aheejin created this revision. aheejin added a reviewer: dschuff. Herald added subscribers: cfe-commits, sunfish, jgravelle-google, sbc100. Add support for atomic.wait / atomic.wake builtins based on the Wasm thread proposal. Repository: rC Clang https://reviews.llvm.org/D49396 Files: incl

[PATCH] D46652: [clang-cl, PCH] Implement support for MS-style PCH through headers

2018-07-16 Thread Nico Weber via Phabricator via cfe-commits
thakis added a comment. Also, were you planning on also adding support for the (filename-less version of) hdrstop pragma? After this change, that should probably be fairly straightforward. Repository: rC Clang https://reviews.llvm.org/D46652 __

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

2018-07-16 Thread Heejin Ahn via Phabricator via cfe-commits
aheejin updated this revision to Diff 155738. aheejin added a comment. - test 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] D46652: [clang-cl, PCH] Implement support for MS-style PCH through headers

2018-07-16 Thread Nico Weber via Phabricator via cfe-commits
thakis added a comment. And finally (sorry about all the mails), this should probably be mentioned in the release notes (docs/ReleaseNotes.rst in the clang repo) since it's a notable new feature :-) Repository: rC Clang https://reviews.llvm.org/D46652

[PATCH] D49330: [compiler-rt] Include -lm when using compiler-rt, due to dependencies in some __div methods.

2018-07-16 Thread Eli Friedman via Phabricator via cfe-commits
efriedma added a comment. Probably compiler-rt should be fixed so it doesn't need libm, rather than fixing clang to add -lm. (All the functions it currently uses can be implemented with simple bit manipulation.) Repository: rC Clang https://reviews.llvm.org/D49330 __

[PATCH] D49338: Implement - P0122R7

2018-07-16 Thread Stephan T. Lavavej via Phabricator via cfe-commits
STL_MSFT added inline comments. Comment at: test/std/containers/views/span.comparison/op.eq.pass.cpp:23 +#include +#include + The comparison tests appear to be unnecessarily including ``. Comment at: test/std/containers/views/span.cons/assign

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

2018-07-16 Thread Nico Weber via Phabricator via cfe-commits
thakis created this revision. thakis added a reviewer: zturner. Wmsvc-not-found was added in r297851 to help diagnose why link.exe can't be executed. However, it's emitted even when using -fuse-ld=lld, and in cross builds there's no way to get rid of the warning other than disabling it. Instead

[libcxx] r337205 - Fix PR38160 - init_priority attribute not supported by GCC on Apple.

2018-07-16 Thread Eric Fiselier via cfe-commits
Author: ericwf Date: Mon Jul 16 13:01:59 2018 New Revision: 337205 URL: http://llvm.org/viewvc/llvm-project?rev=337205&view=rev Log: Fix PR38160 - init_priority attribute not supported by GCC on Apple. This patch guards the use of __attribute__((init_priority(101))) within memory_resource.cpp whe

r337207 - [OPENMP] Fix checks for declare target link entries.

2018-07-16 Thread Alexey Bataev via cfe-commits
Author: abataev Date: Mon Jul 16 13:05:25 2018 New Revision: 337207 URL: http://llvm.org/viewvc/llvm-project?rev=337207&view=rev Log: [OPENMP] Fix checks for declare target link entries. If the declare target link entries are created but not used, the compiler will produce an error message. Patch

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

2018-07-16 Thread Zachary Turner via Phabricator via cfe-commits
zturner 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); + It looks like it's possible for this warnin

r337209 - [ASTMatchers] Introduce Objective-C matchers `hasReceiver` and `isInstanceMessage` for ObjCMessageExpr

2018-07-16 Thread George Karpenkov via cfe-commits
Author: george.karpenkov Date: Mon Jul 16 13:22:12 2018 New Revision: 337209 URL: http://llvm.org/viewvc/llvm-project?rev=337209&view=rev Log: [ASTMatchers] Introduce Objective-C matchers `hasReceiver` and `isInstanceMessage` for ObjCMessageExpr Differential Revision: https://reviews.llvm.org/D4

[PATCH] D49333: [ASTMatchers] Introduce Objective-C matchers `hasReceiver` and `isInstanceMessage` for ObjCMessageExpr

2018-07-16 Thread George Karpenkov via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC337209: [ASTMatchers] Introduce Objective-C matchers `hasReceiver` and… (authored by george.karpenkov, committed by ). Herald added a subscriber: cfe-commits. Changed prior to commit: https://reviews.ll

[PATCH] D41458: [libc++][C++17] Elementary string conversions for integral types

2018-07-16 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists added inline comments. Comment at: include/charconv:244 +static _LIBCPP_INLINE_VISIBILITY char const* +read(char const* __p, char const* __ep, type& __a, type& __b) +{ lichray wrote: > mclow.lists wrote: > > Same comment as above about `re

r337211 - [analyzer] Provide a symmetric method for generating a PathDiagnosticLocation from Decl

2018-07-16 Thread George Karpenkov via cfe-commits
Author: george.karpenkov Date: Mon Jul 16 13:32:32 2018 New Revision: 337211 URL: http://llvm.org/viewvc/llvm-project?rev=337211&view=rev Log: [analyzer] Provide a symmetric method for generating a PathDiagnosticLocation from Decl Differential Revision: https://reviews.llvm.org/D49166 Modified:

[PATCH] D49166: [analyzer] Provide a symmetric method for generating a PathDiagnosticLocation from Decl

2018-07-16 Thread George Karpenkov via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC337211: [analyzer] Provide a symmetric method for generating a PathDiagnosticLocation… (authored by george.karpenkov, committed by ). Herald added a subscriber: cfe-commits. Changed prior to commit: htt

r337212 - [analyzer] Fix GCDAntipatternChecker to only fire when the semaphore is initialized to zero

2018-07-16 Thread George Karpenkov via cfe-commits
Author: george.karpenkov Date: Mon Jul 16 13:32:57 2018 New Revision: 337212 URL: http://llvm.org/viewvc/llvm-project?rev=337212&view=rev Log: [analyzer] Fix GCDAntipatternChecker to only fire when the semaphore is initialized to zero Initializing a semaphore with a different constant most likel

[PATCH] D48911: [analyzer] Fix GCDAntipatternChecker to only fire when the semaphore is initialized to zero

2018-07-16 Thread George Karpenkov via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC337212: [analyzer] Fix GCDAntipatternChecker to only fire when the semaphore is… (authored by george.karpenkov, committed by ). Herald added a subscriber: cfe-commits. Repository: rC Clang https://revi

r337213 - [analyzer] Bugfix for an overly eager suppression for null pointer return from macros.

2018-07-16 Thread George Karpenkov via cfe-commits
Author: george.karpenkov Date: Mon Jul 16 13:33:25 2018 New Revision: 337213 URL: http://llvm.org/viewvc/llvm-project?rev=337213&view=rev Log: [analyzer] Bugfix for an overly eager suppression for null pointer return from macros. Only suppress those cases where the null which came from the macro

[PATCH] D48856: [analyzer] Fix overly eager suppression of NPE when the value used is returned from a macro

2018-07-16 Thread George Karpenkov via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC337213: [analyzer] Bugfix for an overly eager suppression for null pointer return from… (authored by george.karpenkov, committed by ). Herald added a subscriber: cfe-commits. Changed prior to commit: ht

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

2018-07-16 Thread Simon Marchi via Phabricator via cfe-commits
simark updated this revision to Diff 155753. simark added a comment. - Add test - Make operator== a function instead of method - Add operator!= (so I can use EXPECT_NE in the test, and because it may be useful in general) Repository: rC Clang https://reviews.llvm.org/D49265 Files: include

r337214 - [ASTMatchers] Quickfix for tests.

2018-07-16 Thread George Karpenkov via cfe-commits
Author: george.karpenkov Date: Mon Jul 16 13:42:37 2018 New Revision: 337214 URL: http://llvm.org/viewvc/llvm-project?rev=337214&view=rev Log: [ASTMatchers] Quickfix for tests. Modified: cfe/trunk/unittests/ASTMatchers/ASTMatchersTraversalTest.cpp Modified: cfe/trunk/unittests/ASTMatchers/AS

[PATCH] D48560: [clangd] JSON <-> XPC conversions

2018-07-16 Thread Jan Korous via Phabricator via cfe-commits
jkorous marked an inline comment as done. jkorous added a comment. Hi Sam, no worries! Thanks for making time to take a look! I am going to rebase all my patches on top of JSON library moved to llvm/Support and process your comments. Comment at: clangd/xpc/CMakeLists.txt:1 +s

r337215 - [analyzer] Make checkEndFunction() give access to the return statement.

2018-07-16 Thread Reka Kovacs via cfe-commits
Author: rkovacs Date: Mon Jul 16 13:47:45 2018 New Revision: 337215 URL: http://llvm.org/viewvc/llvm-project?rev=337215&view=rev Log: [analyzer] Make checkEndFunction() give access to the return statement. Differential Revision: https://reviews.llvm.org/D49387 Modified: cfe/trunk/include/cla

[PATCH] D49387: [analyzer] Make checkEndFunction() give access to the return statement

2018-07-16 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL337215: [analyzer] Make checkEndFunction() give access to the return statement. (authored by rkovacs, committed by ). Herald added a subscriber: llvm-commits. Changed prior to commit: https://reviews.ll

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

2018-07-16 Thread David Blaikie via Phabricator via cfe-commits
dblaikie accepted this revision. dblaikie added a comment. This revision is now accepted and ready to land. In theory you'd need separate tests for op== and op!= returning false (currently all the tests would pass if both implementations returned true in all cases), but not the biggest deal. R

[PATCH] D47474: Implement cpu_dispatch/cpu_specific Multiversioning

2018-07-16 Thread Erich Keane via Phabricator via cfe-commits
erichkeane added a comment. Bump! Would love to have someone take a look! https://reviews.llvm.org/D47474 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D41458: [libc++][C++17] Elementary string conversions for integral types

2018-07-16 Thread Arthur O'Dwyer via Phabricator via cfe-commits
Quuxplusone added inline comments. Comment at: include/charconv:244 +static _LIBCPP_INLINE_VISIBILITY char const* +read(char const* __p, char const* __ep, type& __a, type& __b) +{ mclow.lists wrote: > lichray wrote: > > mclow.lists wrote: > > > Same c

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

2018-07-16 Thread James Y Knight via Phabricator via cfe-commits
jyknight added a comment. In https://reviews.llvm.org/D47894#1158811, @manojgupta wrote: > @efriedma @jyknight Does the change match your expectations where warnings > are still generated but codeGen does not emit nonnull attribute? Yes, this seems sensible IMO. Comment at:

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

2018-07-16 Thread Erich Keane via Phabricator via cfe-commits
erichkeane created this revision. erichkeane added reviewers: majnemer, rjmccall. I discovered that function pointers inside a RecordType that had its type-determination done in a function whose signature matched said function pointer resulted in the function pointer type being emitted empty. Thi

[PATCH] D48395: Added PublicOnly flag

2018-07-16 Thread Julie Hockett via Phabricator via cfe-commits
juliehockett added inline comments. Comment at: clang-tools-extra/test/clang-doc/yaml-module.cpp:14 +// CHECK-A: --- +// CHECK-A-NEXT: USR: '{{[0-9A-Z][0-9A-Z][0-9A-Z][0-9A-Z][0-9A-Z][0-9A-Z][0-9A-Z][0-9A-Z][0-9A-Z][0-9A-Z][0-9A-Z][0-9A-Z][0-9A-Z][0-9A-Z][0-9A-Z][0-9

[PATCH] D49330: [compiler-rt] Include -lm when using compiler-rt, due to dependencies in some __div methods.

2018-07-16 Thread Jordan Rupprecht via Phabricator via cfe-commits
rupprecht added a comment. Thanks Eli, I'll see how hard it is to remove those calls to logb/logbf (those seem to be the only ones causing link errors) and revert this change if that's possible. Repository: rC Clang https://reviews.llvm.org/D49330

[PATCH] D49119: [Sema][ObjC] Issue a warning when a method declared in a protocol is non-escaping but the corresponding method in the implementation is escaping.

2018-07-16 Thread Volodymyr Sapsai via Phabricator via cfe-commits
vsapsai added a comment. Overall looks good to me. Maybe add a test when a protocol is declared for an interface, not for a category. Something like __attribute__((objc_root_class)) @interface C4 -(void) m0:(int*) p; // expected-warning {{parameter of overriding method should be annotate

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

2018-07-16 Thread Aaron Smith via Phabricator via cfe-commits
asmith added a reviewer: aleksandr.urakov. asmith added a comment. Adding Aleksandr 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-co

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

2018-07-16 Thread Simon Marchi via Phabricator via cfe-commits
simark added a comment. In https://reviews.llvm.org/D49265#1164227, @dblaikie wrote: > In theory you'd need separate tests for op== and op!= returning false > (currently all the tests would pass if both implementations returned true in > all cases), but not the biggest deal. Good point, I'll

[PATCH] D30691: [analyzer] Support for naive cross translational unit analysis

2018-07-16 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added a comment. Herald added a subscriber: mikhail.ramalho. Just noticed: `getRuntimeDefinition()` has a lot of overrides in `CallEvent` sub-classes, and there paths that don't defer to `AnyFunctionCall::getRuntimeDefinition()`, eg., ` CXXInstanceCall::getRuntimeDefinition()` => `if (MD->i

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

2018-07-16 Thread Aleksei Sidorin via Phabricator via cfe-commits
a_sidorin accepted this revision. a_sidorin added a comment. This revision is now accepted and ready to land. Hi Gabor, Thank you for this explanation, it sounds reasonable. Ithink it should be placed into the commit message or into the comment somewhere. Repository: rC Clang https://review

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

2018-07-16 Thread Reka Kovacs via Phabricator via cfe-commits
rnkovacs updated this revision to Diff 155770. rnkovacs marked an inline comment as done. rnkovacs edited the summary of this revision. rnkovacs added a comment. Added standard quote, marking the section about non-member functions that may also invalidate the buffer as a TODO. Also changed the no

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

2018-07-16 Thread Reka Kovacs via Phabricator via cfe-commits
rnkovacs added a comment. In https://reviews.llvm.org/D49360#1163113, @NoQ wrote: > Also we rarely commit to adding a test for every single supported API > function; bonus points for that, but usually 2-3 functions from a series of > similar functions is enough :) Um, okay, noted for next tim

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

2018-07-16 Thread Simon Marchi via Phabricator via cfe-commits
simark updated this revision to Diff 155773. simark added a comment. Add tests for both == and !=. I need to rebuild ~800 files (because I pulled llvm/clang), so I did not actually test it, but I'll do so before pushing tomorrow, of course. Repository: rC Clang https://reviews.llvm.org/D4926

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

2018-07-16 Thread Aleksei Sidorin via Phabricator via cfe-commits
a_sidorin accepted this revision. a_sidorin added a comment. This revision is now accepted and ready to land. Thank you Gabor! Repository: rC Clang https://reviews.llvm.org/D49296 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lis

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

2018-07-16 Thread Aleksei Sidorin via Phabricator via cfe-commits
a_sidorin added inline comments. Comment at: lib/AST/ASTImporter.cpp:6741 + + auto *Ctor = dyn_cast(Importer.Import( + E->getConstructor())); balazske wrote: > a_sidorin wrote: > > cast_or_null? > dyn_cast_or_null: Import may return nullptr, but if not, the

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

2018-07-16 Thread Aleksei Sidorin via Phabricator via cfe-commits
a_sidorin accepted this revision. a_sidorin added a comment. This revision is now accepted and ready to land. LGTM. Repository: rC Clang https://reviews.llvm.org/D49235 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org

[PATCH] D48786: [Preprocessor] Stop entering included files after hitting a fatal error.

2018-07-16 Thread Volodymyr Sapsai via Phabricator via cfe-commits
vsapsai added a comment. Ping. https://reviews.llvm.org/D48786 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D48266: [Driver] Add -fno-digraphs

2018-07-16 Thread Jacob Bandes-Storch via Phabricator via cfe-commits
jtbandes added a comment. Ping again 😇 Repository: rC Clang https://reviews.llvm.org/D48266 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D41458: [libc++][C++17] Elementary string conversions for integral types

2018-07-16 Thread Zhihao Yuan via Phabricator via cfe-commits
lichray updated this revision to Diff 155780. lichray added a comment. Uglify all the names Repository: rCXX libc++ https://reviews.llvm.org/D41458 Files: include/CMakeLists.txt include/charconv include/module.modulemap src/charconv.cpp test/libcxx/double_include.sh.cpp test/std/

[PATCH] D41458: [libc++][C++17] Elementary string conversions for integral types

2018-07-16 Thread Zhihao Yuan via Phabricator via cfe-commits
lichray marked 2 inline comments as done. lichray added inline comments. Comment at: include/charconv:244 +static _LIBCPP_INLINE_VISIBILITY char const* +read(char const* __p, char const* __ep, type& __a, type& __b) +{ Quuxplusone wrote: > mclow.lists

  1   2   >