[PATCH] D50619: [clang-tidy] Handle unresolved expressions in ExprMutationAnalyzer

2018-08-15 Thread Jonas Toth via Phabricator via cfe-commits
JonasToth added inline comments. Comment at: unittests/clang-tidy/ExprMutationAnalyzerTest.cpp:117 +TEST(ExprMutationAnalyzerTest, AssumedNonConstMemberFunc) { + auto AST = tooling::buildASTFromCode( I think you could add another test with `X x` (if you don't

[PATCH] D50144: Add Windows support for the GNUstep Objective-C ABI V2.

2018-08-15 Thread David Chisnall via Phabricator via cfe-commits
theraven added inline comments. Comment at: lib/AST/MicrosoftMangle.cpp:1886 case BuiltinType::ObjCId: -mangleArtificalTagType(TTK_Struct, "objc_object"); +mangleArtificalTagType(TTK_Struct, ".objc_object"); break; compnerd wrote: > DHowett-MSFT w

Re: r339603 - [OPENMP] Fix emission of the loop doacross constructs.

2018-08-15 Thread Jonas Hahnfeld via cfe-commits
Alexey, Hans, does it make sense to backport for 7.0 as it fixes PR37580? Thanks, Jonas On 2018-08-13 21:04, Alexey Bataev via cfe-commits wrote: Author: abataev Date: Mon Aug 13 12:04:24 2018 New Revision: 339603 URL: http://llvm.org/viewvc/llvm-project?rev=339603&view=rev Log: [OPENMP] Fix

[PATCH] D50246: [RISCV] Add support for computing sysroot for riscv32-unknown-elf

2018-08-15 Thread Simon Cook via Phabricator via cfe-commits
simoncook accepted this revision. simoncook added a comment. This revision is now accepted and ready to land. My tests now look better, there are a couple of failures, but this seems to be a bug in newlib, rather than with clang/this patch (the bug was masked before as we would have been pulling

r339759 - Fix ASTMatchersTraversalTest testcase compile on older compilers

2018-08-15 Thread David Green via cfe-commits
Author: dmgreen Date: Wed Aug 15 03:39:43 2018 New Revision: 339759 URL: http://llvm.org/viewvc/llvm-project?rev=339759&view=rev Log: Fix ASTMatchersTraversalTest testcase compile on older compilers Some versions of gcc, especially when invoked through ccache (-E), can have trouble with raw strin

[PATCH] D50763: [Parser] Refactor and fix bugs in late-parsing

2018-08-15 Thread Hamza Sood via Phabricator via cfe-commits
hamzasood created this revision. hamzasood added reviewers: erichkeane, v.g.vassilev, malcolm.parsons, rsmith. Herald added a reviewer: javed.absar. Herald added subscribers: cfe-commits, kristof.beyls, eraman. This patch extracts the eof/stop token pattern used in late-parsing to a re-usable RAI

[PATCH] D50764: [AST] Make NullStmt final and give it factory functions

2018-08-15 Thread Hamza Sood via Phabricator via cfe-commits
hamzasood created this revision. hamzasood added reviewers: klimek, steveire, bkramer. Herald added a subscriber: cfe-commits. I've submitted a patch for contracts (review linked to this) that adds trailing objects to NullStmt. This patch contains the changes to make that possible. Repository:

[PATCH] D50713: [AST] Pack the unsigned of SubstTemplateTypeParmPackType into Type

2018-08-15 Thread Bruno Ricci via Phabricator via cfe-commits
riccibruno added inline comments. Comment at: include/clang/AST/Type.h:1634 + +/// The number of template arguments in \c Arguments. +/// Intentionally not a bitfield since we have plenty of space left. erichkeane wrote: > I would love it if we commented

[PATCH] D50631: [AST] Stuff more data into FunctionTypeBitfields

2018-08-15 Thread Bruno Ricci via Phabricator via cfe-commits
riccibruno added a comment. @rsmith Could you comment on whether limiting the number of types in a dynamic exception specification to 127 is acceptable ? I had to steal two bits from `NumExceptions` to make all the fields fit. If this is a bad idea then a possibility would be to put `NumExceptions

[PATCH] D50766: Fix false positive unsequenced access and modification warning in array subscript expression.

2018-08-15 Thread Mateusz Janek via Phabricator via cfe-commits
stryku created this revision. stryku added a reviewer: rsmith. stryku added a project: clang. In the [expr.sub] p1, we can read that for a given E1[E2], E1 is sequenced before E2. Repository: rC Clang https://reviews.llvm.org/D50766 Files: lib/Sema/SemaChecking.cpp Index: lib/Sema/SemaC

r339766 - Use .cpp extension for certain tests instead of .cc

2018-08-15 Thread Momchil Velikov via cfe-commits
Author: chill Date: Wed Aug 15 05:22:08 2018 New Revision: 339766 URL: http://llvm.org/viewvc/llvm-project?rev=339766&view=rev Log: Use .cpp extension for certain tests instead of .cc The tests `CodeGen/aapcs[64]-align.cc` are not run since files with a `.cc` suffix aren't recognisze as tests. Th

[PATCH] D50771: [clang-tblgen] Add -print-records and -dump-json modes.

2018-08-15 Thread Simon Tatham via Phabricator via cfe-commits
simon_tatham created this revision. simon_tatham added a reviewer: nhaehnle. Herald added a subscriber: cfe-commits. Currently, if clang-tblgen is run without a mode option, it defaults to the first mode in its 'enum Action', which happens to be -gen-clang-attr-classes. I think it makes more sense

[PATCH] D50713: [AST] Pack the unsigned of SubstTemplateTypeParmPackType into Type

2018-08-15 Thread Erich Keane via Phabricator via cfe-commits
erichkeane added inline comments. Comment at: include/clang/AST/Type.h:1634 + +/// The number of template arguments in \c Arguments. +/// Intentionally not a bitfield since we have plenty of space left. riccibruno wrote: > erichkeane wrote: > > I would lo

[PATCH] D50713: [AST] Pack the unsigned of SubstTemplateTypeParmPackType into Type

2018-08-15 Thread Bruno Ricci via Phabricator via cfe-commits
riccibruno added a comment. The thing is that I have no idea what is the minimum number of bits required. It was originally an unsigned but I suspect that 32 bits are not needed. Looking at [implimits] I see Template arguments in a template declaration [1 024]. Recursively nested template ins

[PATCH] D50713: [AST] Pack the unsigned of SubstTemplateTypeParmPackType into Type

2018-08-15 Thread Erich Keane via Phabricator via cfe-commits
erichkeane added a comment. In https://reviews.llvm.org/D50713#1200564, @riccibruno wrote: > The thing is that I have no idea what is the minimum number > of bits required. It was originally an unsigned but I suspect that > 32 bits are not needed. Looking at [implimits] I see > > Template arg

[PATCH] D50713: [AST] Pack the unsigned of SubstTemplateTypeParmPackType into Type

2018-08-15 Thread Bruno Ricci via Phabricator via cfe-commits
riccibruno added a comment. This comment seems fine. I will also add a similar comment to `TemplateSpecializationTypeBitfields`, `DependentTemplateSpecializationTypeBitfields` and `PackExpansionTypeBitfields` since they all 3 have a similar `unsigned`. Repository: rC Clang https://reviews.ll

[PATCH] D50713: [AST] Pack the unsigned of SubstTemplateTypeParmPackType into Type

2018-08-15 Thread Bruno Ricci via Phabricator via cfe-commits
riccibruno updated this revision to Diff 160795. riccibruno added a comment. updated the comment in SubstTemplateTypeParmPackTypeBitfields Repository: rC Clang https://reviews.llvm.org/D50713 Files: include/clang/AST/Type.h lib/AST/Type.cpp Index: lib/AST/Type.cpp =

[PATCH] D50713: [AST] Pack the unsigned of SubstTemplateTypeParmPackType into Type

2018-08-15 Thread Erich Keane via Phabricator via cfe-commits
erichkeane accepted this revision. erichkeane added a comment. This revision is now accepted and ready to land. Sorry about the long discussion on the comment... These bitfields are just hell on the next guy through if he doesn't have the context/knowledge of what are appropriate sizes. Reposi

[PATCH] D50712: [AST] Pack the unsigned of DependentTemplateSpecializationType into Type

2018-08-15 Thread Bruno Ricci via Phabricator via cfe-commits
riccibruno updated this revision to Diff 160800. riccibruno added a comment. updated the comment in DependentTemplateSpecializationTypeBitfields Repository: rC Clang https://reviews.llvm.org/D50712 Files: include/clang/AST/Type.h lib/AST/Type.cpp Index: lib/AST/Type.cpp

[PATCH] D50711: [AST] Pack the unsigned of PackExpansionType into Type

2018-08-15 Thread Bruno Ricci via Phabricator via cfe-commits
riccibruno updated this revision to Diff 160804. riccibruno added a comment. update the comment in PackExpansionTypeBitfields Repository: rC Clang https://reviews.llvm.org/D50711 Files: include/clang/AST/Type.h Index: include/clang/AST/Type.h =

[PATCH] D50643: [AST] Pack the bits of TemplateSpecializationType into Type

2018-08-15 Thread Bruno Ricci via Phabricator via cfe-commits
riccibruno updated this revision to Diff 160805. riccibruno added a comment. update the comment in TemplateSpecializationTypeBitfields Repository: rC Clang https://reviews.llvm.org/D50643 Files: include/clang/AST/Type.h lib/AST/Type.cpp Index: lib/AST/Type.cpp ==

[PATCH] D50783: [CodeGen] Merge identical block descriptor global variables

2018-08-15 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak created this revision. ahatanak added reviewers: rjmccall, arphaman. Herald added a subscriber: dexonsmith. Currently, clang generates a new block descriptor global variable for each block literal. This patch merges block descriptors that are identical inside and across translation unit

[PATCH] D50736: [libc++] Use correct rand.eng.mers all-zeroes seed sequence fallback

2018-08-15 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists added a comment. Is this test that's being added libc++ specific, or would it apply to other implementations as well? Comment at: test/libcxx/numerics/rand/rand.eng.mers/cnstr_sseq_all_zero.pass.cpp:18 + +// template explicit mersenne_twister_engine(Sseq &q); + -

[clang-tools-extra] r339781 - [clangd][tests] Fix typo in tests - invalid LSP exit message

2018-08-15 Thread Jan Korous via cfe-commits
Author: jkorous Date: Wed Aug 15 08:50:45 2018 New Revision: 339781 URL: http://llvm.org/viewvc/llvm-project?rev=339781&view=rev Log: [clangd][tests] Fix typo in tests - invalid LSP exit message Syntactically invalid JSON payload was causing clangd to terminate because of unexpected EOF rather t

[PATCH] D50641: [clangd][test] Fix exit messages in tests

2018-08-15 Thread Jan Korous via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL339781: [clangd][tests] Fix typo in tests - invalid LSP exit message (authored by jkorous, committed by ). Herald added a subscriber: llvm-commits. Changed prior to commit: https://reviews.llvm.org/D506

[clang-tools-extra] r339782 - [clangd][tests] Rename tests of clangd instance termination

2018-08-15 Thread Jan Korous via cfe-commits
Author: jkorous Date: Wed Aug 15 08:58:05 2018 New Revision: 339782 URL: http://llvm.org/viewvc/llvm-project?rev=339782&view=rev Log: [clangd][tests] Rename tests of clangd instance termination Just making testnames better reflect their testing scenarios. Differential Revision: https://reviews.l

[clang-tools-extra] r339783 - Reland "[clang-doc] Updating BitcodeReader to use llvm::Error""

2018-08-15 Thread Julie Hockett via cfe-commits
Author: juliehockett Date: Wed Aug 15 09:02:28 2018 New Revision: 339783 URL: http://llvm.org/viewvc/llvm-project?rev=339783&view=rev Log: Reland "[clang-doc] Updating BitcodeReader to use llvm::Error"" With explicit unique_ptr casts so that bots with older compilers don't break. Modified: c

[PATCH] D50736: [libc++] Use correct rand.eng.mers all-zeroes seed sequence fallback

2018-08-15 Thread Hubert Tong via Phabricator via cfe-commits
hubert.reinterpretcast added a comment. In https://reviews.llvm.org/D50736#1200761, @mclow.lists wrote: > Is this test that's being added libc++ specific, or would it apply to other > implementations as well? The test can apply to other implementations as well (although I am not sure how the

[PATCH] D50670: Implementation of nested loops in cxx_loop_proto

2018-08-15 Thread Matt Morehouse via Phabricator via cfe-commits
morehouse added a comment. Does this hit new coverage in the vectorizer? Comment at: clang/tools/clang-fuzzer/proto-to-llvm/loop_proto_to_llvm.cpp:46 std::string VarRefToString(std::ostream &os, const VarRef &x) { + std::string var = inner_loop ? "inner" : "outer"; std::st

[PATCH] D50785: [clangd][tests] Add exit(EXIT_FAILURE) in case of JSON parsing failure in TestMode

2018-08-15 Thread Jan Korous via Phabricator via cfe-commits
jkorous created this revision. jkorous added reviewers: arphaman, ilya-biryukov. jkorous added a project: clang-tools-extra. Herald added subscribers: cfe-commits, dexonsmith, MaskRay, ioeric. This is meant to cause a visible fail when clangd gets invalid JSON payload in -lit-test mode. Based on

[clang-tools-extra] r339785 - [clang-doc] Explicitly cast to unique_ptr

2018-08-15 Thread Julie Hockett via cfe-commits
Author: juliehockett Date: Wed Aug 15 09:18:46 2018 New Revision: 339785 URL: http://llvm.org/viewvc/llvm-project?rev=339785&view=rev Log: [clang-doc] Explicitly cast to unique_ptr Older compilers don't like the implicit cast & move when returning a unique_ptr to an llvm::Expected type. Modified

r339787 - [AST] Pack the bits of TemplateSpecializationType into Type

2018-08-15 Thread Bruno Ricci via cfe-commits
Author: brunoricci Date: Wed Aug 15 09:21:17 2018 New Revision: 339787 URL: http://llvm.org/viewvc/llvm-project?rev=339787&view=rev Log: [AST] Pack the bits of TemplateSpecializationType into Type Type has enough space for two members of TemplateSpecializationType. Mechanical patch. Reviewed By:

[PATCH] D50643: [AST] Pack the bits of TemplateSpecializationType into Type

2018-08-15 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL339787: [AST] Pack the bits of TemplateSpecializationType into Type (authored by brunoricci, committed by ). Herald added a subscriber: llvm-commits. Changed prior to commit: https://reviews.llvm.org/D5

[PATCH] D50652: [libcxx] By default, do not use internal_linkage to hide symbols from the ABI

2018-08-15 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
dexonsmith added inline comments. Comment at: libcxx/include/__config:798-804 #ifndef _LIBCPP_HIDE_FROM_ABI -# define _LIBCPP_HIDE_FROM_ABI _LIBCPP_HIDDEN _LIBCPP_INTERNAL_LINKAGE +# ifdef _LIBCPP_ABI_HIDDEN_USE_INTERNAL_LINKAGE +#define _LIBCPP_HIDE_FROM_ABI _LIBCPP_HIDDE

[PATCH] D50711: [AST] Pack the unsigned of PackExpansionType into Type

2018-08-15 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL339789: [AST] Pack the unsigned of PackExpansionType into Type (authored by brunoricci, committed by ). Herald added a subscriber: llvm-commits. Changed prior to commit: https://reviews.llvm.org/D50711?

r339789 - [AST] Pack the unsigned of PackExpansionType into Type

2018-08-15 Thread Bruno Ricci via cfe-commits
Author: brunoricci Date: Wed Aug 15 09:28:58 2018 New Revision: 339789 URL: http://llvm.org/viewvc/llvm-project?rev=339789&view=rev Log: [AST] Pack the unsigned of PackExpansionType into Type The bit-fields of `Type` have enough space for the `unsigned NumExpansions` of `PackExpansionType` Revie

[PATCH] D50783: [CodeGen] Merge identical block descriptor global variables

2018-08-15 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak added a comment. A few points I forgot to mention: - This optimization kicks in only in NonGC mode. I don't think we need to care much about GC anymore, so I think that's OK. - There is a lot of redundancy among the copy/dispose helper function strings and the block layout string in t

[PATCH] D50455: Continue emitting diagnostics after a fatal error

2018-08-15 Thread Dmitry via Phabricator via cfe-commits
Dmitry.Kozhevnikov updated this revision to Diff 160837. Dmitry.Kozhevnikov added a comment. Add a unit test which explicitly builds preamble/AST Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D50455 Files: clangd/ClangdUnit.cpp clangd/Compiler.cpp test/clangd/missing-incl

[PATCH] D50455: Continue emitting diagnostics after a fatal error

2018-08-15 Thread Dmitry via Phabricator via cfe-commits
Dmitry.Kozhevnikov added a comment. In https://reviews.llvm.org/D50455#1193468, @ilya-biryukov wrote: > I'm a bit worried that clang may emit too many irrelevant errors, because it > may not cope nicely with those fatal errors, i.e. wasn't tested that > thoroughly in that mode. It sort of hap

[PATCH] D50619: [clang-tidy] Handle unresolved expressions in ExprMutationAnalyzer

2018-08-15 Thread Shuai Wang via Phabricator via cfe-commits
shuaiwang added inline comments. Comment at: unittests/clang-tidy/ExprMutationAnalyzerTest.cpp:410 + match(withEnclosingCompound(declRefTo("y")), AST->getASTContext()); + EXPECT_THAT(mutatedBy(ResultsY, AST.get()), ElementsAre("y")); +} JonasToth wrote: > O

[libcxx] r339794 - For FreeBSD, don't define _M in nasty_macros.hpp

2018-08-15 Thread Dimitry Andric via cfe-commits
Author: dim Date: Wed Aug 15 10:30:32 2018 New Revision: 339794 URL: http://llvm.org/viewvc/llvm-project?rev=339794&view=rev Log: For FreeBSD, don't define _M in nasty_macros.hpp Because FreeBSD uses _M in its , and it is hard to avoid including that header, only define _M to NASTY_MACRO for othe

[PATCH] D50766: Fix false positive unsequenced access and modification warning in array subscript expression.

2018-08-15 Thread Aditya Kumar via Phabricator via cfe-commits
hiraditya added inline comments. Comment at: lib/Sema/SemaChecking.cpp:11678 // Forget that LHS and RHS are sequenced. They are both unsequenced // with respect to other stuff. +Tree.merge(LHSRegion); Is this comment still relevant? Repository:

[PATCH] D50462: Try building complete AST after a fatal error was emitted if further diagnostics are expected

2018-08-15 Thread Dmitry via Phabricator via cfe-commits
Dmitry.Kozhevnikov updated this revision to Diff 160848. Dmitry.Kozhevnikov changed the repository for this revision from rCTE Clang Tools Extra to rC Clang. Dmitry.Kozhevnikov added a comment. Addressed the review comment about separating "suppressing diagnostics" from "providing more complete

[PATCH] D50462: Try building complete AST after a fatal error was emitted if further diagnostics are expected

2018-08-15 Thread Dmitry via Phabricator via cfe-commits
Dmitry.Kozhevnikov added a comment. In https://reviews.llvm.org/D50462#1193180, @arphaman wrote: > On a second look I think that there is value separating the concepts of > 'producing diagnostics' after hitting the fatal error (which is > SuppressAfterFatalError currently does), and trying to b

[libcxx] r339797 - libcxx: Mark __temp_value::__temp_value as _LIBCPP_NO_CFI.

2018-08-15 Thread Peter Collingbourne via cfe-commits
Author: pcc Date: Wed Aug 15 10:49:30 2018 New Revision: 339797 URL: http://llvm.org/viewvc/llvm-project?rev=339797&view=rev Log: libcxx: Mark __temp_value::__temp_value as _LIBCPP_NO_CFI. This constructor needs to cast a pointer to uninitialized memory to a pointer to object type in order to cal

[PATCH] D50743: libcxx: Mark __temp_value::__temp_value as _LIBCPP_NO_CFI.

2018-08-15 Thread Peter Collingbourne via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rCXX339797: libcxx: Mark __temp_value::__temp_value as _LIBCPP_NO_CFI. (authored by pcc, committed by ). Herald added subscribers: cfe-commits, ldionne. Changed prior to commit: https://reviews.llvm.org/D

[PATCH] D50785: [clangd][tests] Add exit(EXIT_FAILURE) in case of JSON parsing failure in TestMode

2018-08-15 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman added a comment. I think propagating the 'test' yes/no value is not the best way to describe the intention of this change. Our intention is to exit from the LSP server on JSON error. One way to describe this intention better is to propagate a boolean 'exitOnJSONError' value. Furthermore

[PATCH] D50792: [ASTImporter] Add test for member pointer types.

2018-08-15 Thread Raphael Isemann via Phabricator via cfe-commits
teemperor created this revision. Herald added a subscriber: martong. Herald added a reviewer: a.sidorin. Repository: rC Clang https://reviews.llvm.org/D50792 Files: test/Import/cxx-member-pointers/Inputs/S.cpp test/Import/cxx-member-pointers/test.cpp Index: test/Import/cxx-member-pointer

[PATCH] D41284: [Concepts] Associated constraints infrastructure.

2018-08-15 Thread Saar Raz via Phabricator via cfe-commits
saar.raz updated this revision to Diff 160861. saar.raz added a comment. - Address comments by rsmith, mainly removing associated constraints caching and instead returning a smallvector of constraint expressions from getAssociatedConstraints. Repository: rC Clang https://reviews.llvm.org/D4

[PATCH] D50793: [ASTImporter] Add test for importing CompoundAssignOperators

2018-08-15 Thread Raphael Isemann via Phabricator via cfe-commits
teemperor created this revision. Herald added a subscriber: martong. Herald added a reviewer: a.sidorin. Repository: rC Clang https://reviews.llvm.org/D50793 Files: test/Import/compound-assign-op/Inputs/F.cpp test/Import/compound-assign-op/test.cpp Index: test/Import/compound-assign-op/t

[PATCH] D50670: Implementation of nested loops in cxx_loop_proto

2018-08-15 Thread Emmett Neyman via Phabricator via cfe-commits
emmettneyman added a comment. In https://reviews.llvm.org/D50670#1200784, @morehouse wrote: > Does this hit new coverage in the vectorizer? Yes, this does hit new coverage in the loop vectorizer code. Comment at: clang/tools/clang-fuzzer/proto-to-llvm/loop_proto_to_llvm.cpp:

[PATCH] D50670: Implementation of nested loops in cxx_loop_proto

2018-08-15 Thread Emmett Neyman via Phabricator via cfe-commits
emmettneyman updated this revision to Diff 160866. emmettneyman edited the summary of this revision. emmettneyman added a comment. Small changes to generated IR Repository: rC Clang https://reviews.llvm.org/D50670 Files: clang/tools/clang-fuzzer/cxx_loop_proto.proto clang/tools/clang-fuz

[PATCH] D50670: Implementation of nested loops in cxx_loop_proto

2018-08-15 Thread Emmett Neyman via Phabricator via cfe-commits
emmettneyman updated this revision to Diff 160870. emmettneyman added a comment. Small changes to generated IR, my last change hadn't saved Repository: rC Clang https://reviews.llvm.org/D50670 Files: clang/tools/clang-fuzzer/cxx_loop_proto.proto clang/tools/clang-fuzzer/proto-to-cxx/loop

[PATCH] D50670: Implementation of nested loops in cxx_loop_proto

2018-08-15 Thread Matt Morehouse via Phabricator via cfe-commits
morehouse added inline comments. Comment at: clang/tools/clang-fuzzer/proto-to-llvm/loop_proto_to_llvm.cpp:127 } + inner_loop = true; return os; Maybe this fixes the bug, but modifying `inner_loop` from different functions is still error-prone. Please ei

[PATCH] D50652: [libcxx] By default, do not use internal_linkage to hide symbols from the ABI

2018-08-15 Thread Louis Dionne via Phabricator via cfe-commits
ldionne updated this revision to Diff 160873. ldionne added a comment. Allow picking a custom default behavior for vendors, per Duncan's comment. Also, revert to a better name for the macro. Repository: rCXX libc++ https://reviews.llvm.org/D50652 Files: libcxx/CMakeLists.txt libcxx/docs

[PATCH] D50796: [ASTImporter] Add test for IfStmt

2018-08-15 Thread Raphael Isemann via Phabricator via cfe-commits
teemperor created this revision. Herald added a subscriber: martong. Herald added a reviewer: a.sidorin. Repository: rC Clang https://reviews.llvm.org/D50796 Files: test/Import/if-stmt/Inputs/F.cpp test/Import/if-stmt/test.cpp Index: test/Import/if-stmt/test.cpp =

[PATCH] D46081: [analyzer] Expand conversion check to check more expressions for overflow and underflow

2018-08-15 Thread Umann Kristóf via Phabricator via cfe-commits
Szelethus added a comment. Herald added a subscriber: mikhail.ramalho. To me it seems like @pfultz2 hasn't been on the site for a couple months. Is this patch going to be commited anytime? https://reviews.llvm.org/D46081 ___ cfe-commits mailing lis

[PATCH] D50144: Add Windows support for the GNUstep Objective-C ABI V2.

2018-08-15 Thread Shoaib Meenai via Phabricator via cfe-commits
smeenai added inline comments. Comment at: lib/AST/MicrosoftMangle.cpp:1886 case BuiltinType::ObjCId: -mangleArtificalTagType(TTK_Struct, "objc_object"); +mangleArtificalTagType(TTK_Struct, ".objc_object"); break; theraven wrote: > compnerd wrote:

r339803 - clang-format: Change Google style wrt. the formatting of empty messages.

2018-08-15 Thread Daniel Jasper via cfe-commits
Author: djasper Date: Wed Aug 15 12:07:55 2018 New Revision: 339803 URL: http://llvm.org/viewvc/llvm-project?rev=339803&view=rev Log: clang-format: Change Google style wrt. the formatting of empty messages. Before: message Empty { } After: message Empty {} Modified: cfe/trunk/lib/Form

[PATCH] D50616: [Fixed Point Arithmetic] FixedPointCast

2018-08-15 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan updated this revision to Diff 160884. leonardchan marked 3 inline comments as done. leonardchan added a comment. - Added check for if we should check for saturation when converting to a saturated fixed point type. - Replaced `llvm_unreachable()`s with temporary diagnostic to be eventu

[PATCH] D50616: [Fixed Point Arithmetic] FixedPointCast

2018-08-15 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan added inline comments. Comment at: lib/CodeGen/CGExprScalar.cpp:1016 + if (DstScale > SrcScale) { +// Need to allocate space before shifting left +ResultWidth = SrcWidth + DstScale - SrcScale; rjmccall wrote: > In IR, this isn't really "alloc

[PATCH] D50766: Fix false positive unsequenced access and modification warning in array subscript expression.

2018-08-15 Thread Mateusz Janek via Phabricator via cfe-commits
stryku updated this revision to Diff 160885. stryku added a comment. Thanks for pointing that out. You're probably right, these two calls are self-explanatory. https://reviews.llvm.org/D50766 Files: lib/Sema/SemaChecking.cpp Index: lib/Sema/SemaChecking.cpp

[PATCH] D50631: [AST] Stuff more data into FunctionTypeBitfields

2018-08-15 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. Our experience is that we keep adding more complexity to `FunctionType`, so it'd be nice if the bits weren't pressed up against the absolute limit. Dynamic exception specifications are really common, but only in the zero-exceptions case, so as long as we can efficient

[libcxx] r339804 - Mark the at_exit and at_quick_exit tests as unsupported under C++98 an 03, since those calls were introduced in C++11. They're already guarded by an ifdef in the code, so this is a

2018-08-15 Thread Marshall Clow via cfe-commits
Author: marshall Date: Wed Aug 15 12:27:53 2018 New Revision: 339804 URL: http://llvm.org/viewvc/llvm-project?rev=339804&view=rev Log: Mark the at_exit and at_quick_exit tests as unsupported under C++98 an 03, since those calls were introduced in C++11. They're already guarded by an ifdef in th

[PATCH] D50410: Removing -debug-info-macros from option suggestions test

2018-08-15 Thread Arnaud Coomans via Phabricator via cfe-commits
acoomans added subscribers: mattd, Sunil_Srivastava. acoomans added a comment. @mattd @Sunil_Srivastava if you have access to the PS4 SDK, could you tell if the `-debug-info-macro` command line clang option is available? Thank you Repository: rC Clang https://reviews.llvm.org/D50410 _

[PATCH] D50796: [ASTImporter] Add test for IfStmt

2018-08-15 Thread Aditya Kumar via Phabricator via cfe-commits
hiraditya accepted this revision. hiraditya added a comment. This revision is now accepted and ready to land. LGTM, thanks for the test. Repository: rC Clang https://reviews.llvm.org/D50796 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D50640: Fix for bug 38508 - Don't do PCH processing when only generating preprocessor output

2018-08-15 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. The approach lgtm, thanks. How does the gcc driver codepath handle this? Does it just not have to worry about this because it doesn't have something like warn_pp_macro_def_mismatch_with_pch?

[PATCH] D50652: [libcxx] By default, do not use internal_linkage to hide symbols from the ABI

2018-08-15 Thread Nico Weber via Phabricator via cfe-commits
thakis added a comment. I haven't read all the messages in these threads, forgive me if someone asked this already. It's a bit weird to me that we have to override this behavior in Chromium while the default is different. Why isn't the executable size blowup we see in chromium a problem for eve

[PATCH] D49511: [Sema/Attribute] Check for noderef attribute

2018-08-15 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan updated this revision to Diff 160892. leonardchan marked 6 inline comments as done. Repository: rC Clang https://reviews.llvm.org/D49511 Files: include/clang/AST/Type.h include/clang/Basic/Attr.td include/clang/Basic/AttrDocs.td include/clang/Basic/DiagnosticGroups.td inc

[PATCH] D50652: [libcxx] By default, do not use internal_linkage to hide symbols from the ABI

2018-08-15 Thread Louis Dionne via Phabricator via cfe-commits
ldionne added a comment. In https://reviews.llvm.org/D50652#1201236, @thakis wrote: > I haven't read all the messages in these threads, forgive me if someone asked > this already. It's a bit weird to me that we have to override this behavior > in Chromium while the default is different. Why isn

r339805 - [OPENMP] FIx processing of declare target variables.

2018-08-15 Thread Alexey Bataev via cfe-commits
Author: abataev Date: Wed Aug 15 12:45:12 2018 New Revision: 339805 URL: http://llvm.org/viewvc/llvm-project?rev=339805&view=rev Log: [OPENMP] FIx processing of declare target variables. The compiler may produce unexpected error messages/crashes when declare target variables were used. Patch fixe

[PATCH] D48027: [analyzer] Improve `CallDescription` to handle c++ method.

2018-08-15 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. Herald added a subscriber: Szelethus. This looks great, thanks, this is exactly how i imagined it! Repository: rC Clang https://reviews.llvm.org/D48027

[PATCH] D48027: [analyzer] Improve `CallDescription` to handle c++ method.

2018-08-15 Thread Gábor Horváth via Phabricator via cfe-commits
xazax.hun added a comment. Generally looks good, I only wonder if this works well with inline namespaces. Could you test? Repository: rC Clang https://reviews.llvm.org/D48027 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.l

[PATCH] D50799: Fix for PR 38495: no longer compiles on FreeBSD, due to lack of timespec_get()

2018-08-15 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists created this revision. mclow.lists added reviewers: ldionne, EricWF, dim. Fixes this by adding a new config macro `_LIBCPP_HAS_TIMESPEC_GET` (sigh) There's also a drive-by fix in here about not importing `aligned_alloc` into namespace `std` before C++17. https://reviews.llvm.org/D

[PATCH] D50799: Fix for PR 38495: no longer compiles on FreeBSD, due to lack of timespec_get()

2018-08-15 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists updated this revision to Diff 160897. mclow.lists added a comment. Copy/paste error in original diff. https://reviews.llvm.org/D50799 Files: include/__config include/cstdlib include/ctime test/std/language.support/support.runtime/ctime.pass.cpp test/std/utilities/time/date

[PATCH] D49722: [CStringSyntaxChecker] Check strlcat sizeof check

2018-08-15 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added inline comments. Comment at: cfe/trunk/test/Analysis/cstring-syntax.c:45 + strlcpy(dest, "012345678", sizeof(dest)); + strlcat(dest, "910", sizeof(dest)); // expected-warning {{The third argument allows to potentially copy more bytes than it should. Replace with the

[PATCH] D50767: [C++2a] Parsing and semantic analysis for contracts (P0542R5)

2018-08-15 Thread Stephen Kelly via Phabricator via cfe-commits
steveire added inline comments. Comment at: lib/Parse/ParseStmt.cpp:272 bool HasLeadingEmptyMacro = Tok.hasLeadingEmptyMacro(); -return Actions.ActOnNullStmt(ConsumeToken(), HasLeadingEmptyMacro); +SourceLocation SemiLoc = ConsumeToken(); +return Actions.ActOnNul

[PATCH] D50799: Fix for PR 38495: no longer compiles on FreeBSD, due to lack of timespec_get()

2018-08-15 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists updated this revision to Diff 160898. https://reviews.llvm.org/D50799 Files: include/__config include/cstdlib include/ctime test/std/language.support/support.runtime/ctime.pass.cpp test/std/utilities/time/date.time/ctime.pass.cpp test/support/test_macros.h Index: test/sup

[PATCH] D50764: [AST] Make NullStmt final and give it factory functions

2018-08-15 Thread Stephen Kelly via Phabricator via cfe-commits
steveire accepted this revision. steveire added a comment. This revision is now accepted and ready to land. This looks like a NFC change. Given that the next patch moves these methods out of line, you might consider introducing them out of line here (and moving the constructors out of line). Th

[PATCH] D50755: [Driver] -print-target-triple and -print-effective-triple options

2018-08-15 Thread Chris Bieneman via Phabricator via cfe-commits
beanz accepted this revision. beanz added a comment. This revision is now accepted and ready to land. lgtm Repository: rC Clang https://reviews.llvm.org/D50755 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/

[PATCH] D50801: [rename] Use isPointWithin when looking for a declaration at location

2018-08-15 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman created this revision. arphaman added reviewers: jkorous, hokein, ioeric. Herald added a subscriber: dexonsmith. This patch is a followup to https://reviews.llvm.org/D50740 . This patch fixes the issue where clang-refactor local-rename was unable to find a declaration in a header file i

r339807 - Refactor Darwin driver to refer to runtimes by component

2018-08-15 Thread Chris Bieneman via cfe-commits
Author: cbieneman Date: Wed Aug 15 13:09:38 2018 New Revision: 339807 URL: http://llvm.org/viewvc/llvm-project?rev=339807&view=rev Log: Refactor Darwin driver to refer to runtimes by component Summary: In r335809, Petr Hosek lays out support for what he calls the multiarch runtimes layout. This n

[PATCH] D50618: Refactor Darwin driver to refer to runtimes by component

2018-08-15 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC339807: Refactor Darwin driver to refer to runtimes by component (authored by cbieneman, committed by ). Changed prior to commit: https://reviews.llvm.org/D50618?vs=160279&id=160903#toc Repository: r

r339808 - [CStringSyntaxChecker] Reduces space around error message for strlcat.

2018-08-15 Thread David Carlier via cfe-commits
Author: devnexen Date: Wed Aug 15 13:09:52 2018 New Revision: 339808 URL: http://llvm.org/viewvc/llvm-project?rev=339808&view=rev Log: [CStringSyntaxChecker] Reduces space around error message for strlcat. Modified: cfe/trunk/lib/StaticAnalyzer/Checkers/CStringSyntaxChecker.cpp cfe/trunk/

[PATCH] D50616: [Fixed Point Arithmetic] FixedPointCast

2018-08-15 Thread John McCall via Phabricator via cfe-commits
rjmccall added inline comments. Comment at: lib/CodeGen/CGExprScalar.cpp:1042 +std::min(DstScale + DstFPSema.getIntegralBits(), ResultWidth)); +Value *Zero = ConstantInt::get(CGF.getLLVMContext(), APInt(ResultWidth, 0)); + You can just pass 0 here an

[PATCH] D50670: Implementation of nested loops in cxx_loop_proto

2018-08-15 Thread Emmett Neyman via Phabricator via cfe-commits
emmettneyman added inline comments. Comment at: clang/tools/clang-fuzzer/proto-to-llvm/loop_proto_to_llvm.cpp:132 + os << "target triple = \"x86_64-pc-linux-gnu\"\n" + << "define void @foo(i32* %a, i32* %b, i32* noalias %c, i64 %s) {\n" + << "%cmp = icmp sgt i64 %s, 0\n"

[PATCH] D50783: [CodeGen] Merge identical block descriptor global variables

2018-08-15 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. In https://reviews.llvm.org/D50783#1200868, @ahatanak wrote: > A few points I forgot to mention: > > - This optimization kicks in only in NonGC mode. I don't think we need to > care much about GC anymore, so I think that's OK. Yes, that's fine. > - There is a lot of

[PATCH] D50683: [Android] Set NewAlign for 64-bit Android to 8 bytes

2018-08-15 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith requested changes to this revision. rsmith added a comment. This revision now requires changes to proceed. This doesn't seem necessary. `NewAlign` specifies the alignment beyond which types acquire "new-extended alignment" per the C++ standard, or equivalently the alignment beyond which w

r339810 - Add a newline to SourceLocation dump output

2018-08-15 Thread Stephen Kelly via cfe-commits
Author: steveire Date: Wed Aug 15 13:32:06 2018 New Revision: 339810 URL: http://llvm.org/viewvc/llvm-project?rev=339810&view=rev Log: Add a newline to SourceLocation dump output Summary: Migrate callers to print(). dump() should be useful to downstreams and third parties as a debugging aid. Ev

[PATCH] D50661: Add a newline to SourceLocation dump output

2018-08-15 Thread Stephen Kelly via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL339810: Add a newline to SourceLocation dump output (authored by steveire, committed by ). Herald added a subscriber: llvm-commits. Repository: rL LLVM https://reviews.llvm.org/D50661 Files: cfe/tru

[PATCH] D50410: Removing -debug-info-macros from option suggestions test

2018-08-15 Thread Brian Gesiak via Phabricator via cfe-commits
modocache accepted this revision. modocache added a comment. This revision is now accepted and ready to land. I don't have access to the PS4 SDK, but this is the most plausible explanation I've seen for why I was experiencing issues on these platforms. Thanks for this! Do you have commit access

[PATCH] D50670: Implementation of nested loops in cxx_loop_proto

2018-08-15 Thread Matt Morehouse via Phabricator via cfe-commits
morehouse added inline comments. Comment at: clang/tools/clang-fuzzer/proto-to-llvm/loop_proto_to_llvm.cpp:127 } + inner_loop = true; return os; emmettneyman wrote: > morehouse wrote: > > Maybe this fixes the bug, but modifying `inner_loop` from different

[PATCH] D50805: Don't warn on returning the address of a label

2018-08-15 Thread Reid Kleckner via Phabricator via cfe-commits
rnk created this revision. rnk added reviewers: niravd, rsmith, nickdesaulniers. There aren't any lifetime issues inherent in returning a local label. Hypothetically, it could be used to drive a state machine driven by computed goto the next time that same scope is re-entered. In any case, the Lin

[PATCH] D50805: Don't warn on returning the address of a label

2018-08-15 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added inline comments. Comment at: clang/include/clang/Basic/DiagnosticSemaKinds.td:7872-7874 -def warn_ret_addr_label : Warning< - "returning address of label, which is local">, - InGroup; Why completely drop the diagnostic just because it is undesi

[PATCH] D50805: Don't warn on returning the address of a label

2018-08-15 Thread Reid Kleckner via Phabricator via cfe-commits
rnk added inline comments. Comment at: clang/include/clang/Basic/DiagnosticSemaKinds.td:7872-7874 -def warn_ret_addr_label : Warning< - "returning address of label, which is local">, - InGroup; lebedev.ri wrote: > Why completely drop the diagnostic just because

[PATCH] D50799: Fix for PR 38495: no longer compiles on FreeBSD, due to lack of timespec_get()

2018-08-15 Thread Louis Dionne via Phabricator via cfe-commits
ldionne accepted this revision. ldionne added a comment. This revision is now accepted and ready to land. LGTM. https://reviews.llvm.org/D50799 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cf

[PATCH] D50683: [Android] Set NewAlign for 64-bit Android to 8 bytes

2018-08-15 Thread Eli Friedman via Phabricator via cfe-commits
efriedma added a comment. The C++ standard just says "An integer literal of type std::size_t whose value is the alignment guaranteed by a call to operator new(std::size_t) or operator new[](std::size_t)." I would take that in the obvious sense, that any pointer returned by operator new must ha

[PATCH] D50799: Fix for PR 38495: no longer compiles on FreeBSD, due to lack of timespec_get()

2018-08-15 Thread Dimitry Andric via Phabricator via cfe-commits
dim accepted this revision. dim added a comment. LGTM. https://reviews.llvm.org/D50799 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[libcxx] r339816 - Selectively import timespec_get into namespace std, since some C libraries don't have it. Reviewed as https://reviews.llvm.org/D50799

2018-08-15 Thread Marshall Clow via cfe-commits
Author: marshall Date: Wed Aug 15 14:19:08 2018 New Revision: 339816 URL: http://llvm.org/viewvc/llvm-project?rev=339816&view=rev Log: Selectively import timespec_get into namespace std, since some C libraries don't have it. Reviewed as https://reviews.llvm.org/D50799 Modified: libcxx/trunk/

[PATCH] D50810: [ASTImporter] Add test for DoStmt

2018-08-15 Thread Raphael Isemann via Phabricator via cfe-commits
teemperor created this revision. Herald added a subscriber: martong. Herald added a reviewer: a.sidorin. Repository: rC Clang https://reviews.llvm.org/D50810 Files: test/Import/do-stmt/Inputs/F.cpp test/Import/do-stmt/test.cpp Index: test/Import/do-stmt/test.cpp =

  1   2   >