[PATCH] D32520: Support __fp16 vectors

2017-04-25 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak created this revision. Herald added subscribers: rengolin, aemerson. Currently, clang miscompiles operations on __fp16 vectors. For example, when the following code is compiled: typedef __fp16 half4 __attribute__ ((vector_size (8))); half4 hv0, hv1, hv2; void test() { hv0

[PATCH] D30771: [analyzer] Teach the MallocChecker about Glib API for two arguments

2017-04-25 Thread Leslie Zhai via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL301384: [analyzer] Teach the MallocChecker about Glib API for two arguments (authored by xiangzhai). Changed prior to commit: https://reviews.llvm.org/D30771?vs=96101=96670#toc Repository: rL LLVM

r301384 - [analyzer] Teach the MallocChecker about Glib API for two arguments

2017-04-25 Thread Leslie Zhai via cfe-commits
Author: xiangzhai Date: Wed Apr 26 00:33:14 2017 New Revision: 301384 URL: http://llvm.org/viewvc/llvm-project?rev=301384=rev Log: [analyzer] Teach the MallocChecker about Glib API for two arguments Reviewers: zaks.anna, NoQ, danielmarjamaki Reviewed By: zaks.anna, NoQ, danielmarjamaki

r301382 - [Modules][ObjC] Check definition from canonical decl on designated initializers

2017-04-25 Thread Bruno Cardoso Lopes via cfe-commits
Author: bruno Date: Wed Apr 26 00:06:20 2017 New Revision: 301382 URL: http://llvm.org/viewvc/llvm-project?rev=301382=rev Log: [Modules][ObjC] Check definition from canonical decl on designated initializers Use definition from canonical decl when checking for designated initializers. This is

[PATCH] D30771: [analyzer] Teach the MallocChecker about Glib API for two arguments

2017-04-25 Thread Daniel Marjamäki via Phabricator via cfe-commits
danielmarjamaki accepted this revision. danielmarjamaki added a comment. This revision is now accepted and ready to land. If you have svn write permission then please do it. If you need svn write permission, please see http://llvm.org/docs/DeveloperPolicy.html#obtaining-commit-access

[PATCH] D32519: [Sema] Avoid using a null type pointer (fixes PR32750)

2017-04-25 Thread Nikola Smiljanić via Phabricator via cfe-commits
nikola accepted this revision. nikola added a comment. This revision is now accepted and ready to land. LGTM Comment at: test/SemaCXX/MicrosoftExtensions.cpp:516 +template struct A {}; +template struct B : A { A::C::D d; }; // expected-error {{missing 'typename' prior to

[PATCH] D32519: [Sema] Avoid using a null type pointer (fixes PR32750)

2017-04-25 Thread Vedant Kumar via Phabricator via cfe-commits
vsk created this revision. isMicrosoftMissingTypename() uses a Type pointer without first checking that it's non-null. PR32750 reports a case where the pointer is in fact

r301377 - [ubsan] Skip alignment checks on allocas with known alignment

2017-04-25 Thread Vedant Kumar via cfe-commits
Author: vedantk Date: Tue Apr 25 21:17:21 2017 New Revision: 301377 URL: http://llvm.org/viewvc/llvm-project?rev=301377=rev Log: [ubsan] Skip alignment checks on allocas with known alignment It's possible to determine the alignment of an alloca at compile-time. Use this information to skip

[PATCH] D30771: [analyzer] Teach the MallocChecker about Glib API for two arguments

2017-04-25 Thread Leslie Zhai via Phabricator via cfe-commits
xiangzhai added a comment. Hi Artem, Could I commit this patch? thanks! Regards, Leslie Zhai Repository: rL LLVM https://reviews.llvm.org/D30771 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D32514: [asan] Unconditionally enable GC of globals on COFF

2017-04-25 Thread Evgeniy Stepanov via Phabricator via cfe-commits
eugenis added a comment. r301374 Repository: rL LLVM https://reviews.llvm.org/D32514 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

r301374 - [asan] Unconditionally enable GC of globals on COFF.

2017-04-25 Thread Evgeniy Stepanov via cfe-commits
Author: eugenis Date: Tue Apr 25 19:51:06 2017 New Revision: 301374 URL: http://llvm.org/viewvc/llvm-project?rev=301374=rev Log: [asan] Unconditionally enable GC of globals on COFF. This change restores pre-r301225 behavior, where linker GC compatible global instrumentation was used on COFF

Re: [PATCH] D32514: [asan] Unconditionally enable GC of globals on COFF

2017-04-25 Thread Nico Weber via cfe-commits
See https://bugs.chromium.org/p/chromium/issues/detail?id=715315 Looks good, please land to get the tree back green while we investigate. On Apr 25, 2017 8:51 PM, "Evgeniy Stepanov via Phabricator via cfe-commits" wrote: > eugenis added a comment. > > Apparently the

[PATCH] D32514: [asan] Unconditionally enable GC of globals on COFF

2017-04-25 Thread Evgeniy Stepanov via Phabricator via cfe-commits
eugenis added a comment. Apparently the ODR detector in Asan on Windows has issues with full data-sections. This way we can have limited GC for user globals. Repository: rL LLVM https://reviews.llvm.org/D32514 ___ cfe-commits mailing list

[PATCH] D32515: [libcxx] [test] Changes to accommodate LWG 2904 "Make variant move-assignment more exception safe"

2017-04-25 Thread Casey Carter via Phabricator via cfe-commits
CaseyCarter created this revision. NOTE: TEST CHANGES ONLY. These tests will not pass with the current implementation of `variant`, but should give the implementor of LWG2904 a head start. Details: test/std/utilities/variant/variant.variant/variant.assign/copy.pass.cpp: - Make `CopyAssign`'s

[PATCH] D32514: [asan] Unconditionally enable GC of globals on COFF

2017-04-25 Thread Peter Collingbourne via Phabricator via cfe-commits
pcc added a comment. Why? Repository: rL LLVM https://reviews.llvm.org/D32514 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D32514: [asan] Unconditionally enable GC of globals on COFF

2017-04-25 Thread Evgeniy Stepanov via Phabricator via cfe-commits
eugenis created this revision. This change restores pre-r301225 behavior, where linker GC compatible global instrumentation was used on COFF targets disregarding -f(no-)data-sections and/or /Gw flags. Repository: rL LLVM https://reviews.llvm.org/D32514 Files: lib/CodeGen/BackendUtil.cpp

[PATCH] D32389: [libclang] Expose some target information via the C API.

2017-04-25 Thread Emilio Cobos Álvarez via Phabricator via cfe-commits
emilio updated this revision to Diff 96652. emilio added a comment. Updated per comments, I used `clang_TargetInfo_dispose` following recent APIs instead of `clang_disposeTargetInfo`, let me know if I should change that. Also, didn't add a new header for `CXTargetInfo`, since it's rather small,

[PATCH] D32510: [libcxx] Fix C1XX implementation of DoNotOptimize

2017-04-25 Thread Casey Carter via Phabricator via cfe-commits
CaseyCarter created this revision. ...in test_macros.h https://reviews.llvm.org/D32510 Files: test/support/test_macros.h Index: test/support/test_macros.h === --- test/support/test_macros.h +++ test/support/test_macros.h @@

Re: [PATCH] D32435: clang-cl: Add support for /permissive-

2017-04-25 Thread Nico Weber via cfe-commits
On Tue, Apr 25, 2017 at 5:28 PM, David Majnemer wrote: > > > On Tue, Apr 25, 2017 at 2:12 PM, Nico Weber wrote: > >> On Tue, Apr 25, 2017 at 4:14 PM, David Majnemer > > wrote: >> >>> >>> >>> On Tue, Apr 25, 2017 at 11:42

[PATCH] D32385: [libcxx] Implement LWG 2900 "The copy and move constructors of optional are not constexpr"

2017-04-25 Thread Casey Carter via Phabricator via cfe-commits
CaseyCarter updated this revision to Diff 96644. CaseyCarter added a comment. Assigning an empty optional to a non-empty optional needs to destroy the contained value, so we need to also require `is_trivially_destructible` to implement trivial assignments. https://reviews.llvm.org/D32385

[clang-tools-extra] r301365 - [clang-tidy] run-clang-tidy.py: check if clang-apply-replacements succeeds

2017-04-25 Thread Jakub Kuderski via cfe-commits
Author: kuhar Date: Tue Apr 25 17:38:39 2017 New Revision: 301365 URL: http://llvm.org/viewvc/llvm-project?rev=301365=rev Log: [clang-tidy] run-clang-tidy.py: check if clang-apply-replacements succeeds Summary: When running run-clang-tidy.py with -fix it tries to apply found replacements at the

[PATCH] D32294: [clang-tidy] run-clang-tidy.py: check if clang-apply-replacements succeeds

2017-04-25 Thread Jakub Kuderski via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL301365: [clang-tidy] run-clang-tidy.py: check if clang-apply-replacements succeeds (authored by kuhar). Changed prior to commit: https://reviews.llvm.org/D32294?vs=96097=96642#toc Repository: rL

[PATCH] D32210: [Sema][ObjC] Add support for attribute "noescape"

2017-04-25 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak added inline comments. Comment at: include/clang/Basic/AttrDocs.td:118 + let Content = [{ +``noescape`` placed on a block parameter is used to inform the compiler that the block passed to a function cannot escape: that is, the block will not be invoked after the

[PATCH] D32210: [Sema][ObjC] Add support for attribute "noescape"

2017-04-25 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak updated this revision to Diff 96637. ahatanak marked 4 inline comments as done. ahatanak added a comment. Address review comments. https://reviews.llvm.org/D32210 Files: include/clang/Basic/Attr.td include/clang/Basic/AttrDocs.td include/clang/Basic/DiagnosticSemaKinds.td

[PATCH] D32395: [clang-tidy] modernize-use-emplace: remove unnecessary make_pair calls

2017-04-25 Thread Piotr Padlewski via Phabricator via cfe-commits
Prazek added inline comments. Comment at: clang-tidy/modernize/UseEmplaceCheck.cpp:115 + const auto *MakePairCall = Result.Nodes.getNodeAs("make_pair"); + assert(InnerCtorCall || MakePairCall); kuhar wrote: > Prazek wrote: > > JDevlieghere wrote: > > > It's

Re: r289018 - [Headers] Enable #include_next on Darwin

2017-04-25 Thread Bruno Cardoso Lopes via cfe-commits
On Tue, Apr 25, 2017 at 2:34 PM, Aaron Ballman wrote: > On Tue, Apr 25, 2017 at 5:33 PM, Bruno Cardoso Lopes > wrote: >> On Tue, Apr 25, 2017 at 6:29 AM, Aaron Ballman >> wrote: >>> On Wed, Dec 7, 2016 at 9:13 PM, Bruno

r301364 - [Hexagon] Handle -O4 when checking optimization level

2017-04-25 Thread Krzysztof Parzyszek via cfe-commits
Author: kparzysz Date: Tue Apr 25 16:31:55 2017 New Revision: 301364 URL: http://llvm.org/viewvc/llvm-project?rev=301364=rev Log: [Hexagon] Handle -O4 when checking optimization level Modified: cfe/trunk/lib/Driver/ToolChains/Hexagon.cpp Modified: cfe/trunk/lib/Driver/ToolChains/Hexagon.cpp

[PATCH] D32395: [clang-tidy] modernize-use-emplace: remove unnecessary make_pair calls

2017-04-25 Thread Jakub Kuderski via Phabricator via cfe-commits
kuhar marked 2 inline comments as done. kuhar added inline comments. Comment at: clang-tidy/modernize/UseEmplaceCheck.cpp:115 + const auto *MakePairCall = Result.Nodes.getNodeAs("make_pair"); + assert(InnerCtorCall || MakePairCall); Prazek wrote: >

[PATCH] D32395: [clang-tidy] modernize-use-emplace: remove unnecessary make_pair calls

2017-04-25 Thread Jakub Kuderski via Phabricator via cfe-commits
kuhar updated this revision to Diff 96634. kuhar added a comment. Use igoringImplicit instead of ignoringParenImpCasts. Options moved to the anonymous namespace. https://reviews.llvm.org/D32395 Files: clang-tidy/modernize/UseEmplaceCheck.cpp docs/ReleaseNotes.rst

Re: r289018 - [Headers] Enable #include_next on Darwin

2017-04-25 Thread Aaron Ballman via cfe-commits
On Tue, Apr 25, 2017 at 5:33 PM, Bruno Cardoso Lopes wrote: > On Tue, Apr 25, 2017 at 6:29 AM, Aaron Ballman wrote: >> On Wed, Dec 7, 2016 at 9:13 PM, Bruno Cardoso Lopes via cfe-commits >> wrote: >>> Author: bruno >>>

Re: r289018 - [Headers] Enable #include_next on Darwin

2017-04-25 Thread Bruno Cardoso Lopes via cfe-commits
On Tue, Apr 25, 2017 at 6:29 AM, Aaron Ballman wrote: > On Wed, Dec 7, 2016 at 9:13 PM, Bruno Cardoso Lopes via cfe-commits > wrote: >> Author: bruno >> Date: Wed Dec 7 20:13:56 2016 >> New Revision: 289018 >> >> URL:

Re: [PATCH] D32435: clang-cl: Add support for /permissive-

2017-04-25 Thread David Majnemer via cfe-commits
On Tue, Apr 25, 2017 at 2:12 PM, Nico Weber wrote: > On Tue, Apr 25, 2017 at 4:14 PM, David Majnemer > wrote: > >> >> >> On Tue, Apr 25, 2017 at 11:42 AM, Nico Weber wrote: >> >>> On Tue, Apr 25, 2017 at 2:06 PM, David

[PATCH] D32456: [ubsan] Make the alignment check work with some extern decls (PR32630)

2017-04-25 Thread Eli Friedman via Phabricator via cfe-commits
efriedma added a comment. This should work correctly with alignment attributes, I think? IIRC those just change the return value of getDeclAlign(). I agree it's a little fragile, but I don't have a good suggestion to avoid that. https://reviews.llvm.org/D32456

Re: [PATCH] D32435: clang-cl: Add support for /permissive-

2017-04-25 Thread Nico Weber via cfe-commits
On Tue, Apr 25, 2017 at 4:14 PM, David Majnemer wrote: > > > On Tue, Apr 25, 2017 at 11:42 AM, Nico Weber wrote: > >> On Tue, Apr 25, 2017 at 2:06 PM, David Majnemer > > wrote: >> >>> >>> >>> On Tue, Apr 25, 2017 at 8:46

r301361 - [Hexagon] Set -ffp-contract=fast at -O3 unless explicitly specified

2017-04-25 Thread Krzysztof Parzyszek via cfe-commits
Author: kparzysz Date: Tue Apr 25 15:51:51 2017 New Revision: 301361 URL: http://llvm.org/viewvc/llvm-project?rev=301361=rev Log: [Hexagon] Set -ffp-contract=fast at -O3 unless explicitly specified Modified: cfe/trunk/lib/Driver/ToolChains/Hexagon.cpp

[PATCH] D32456: [ubsan] Make the alignment check work with some extern decls (PR32630)

2017-04-25 Thread Vedant Kumar via Phabricator via cfe-commits
vsk added a comment. In https://reviews.llvm.org/D32456#737273, @efriedma wrote: > Err, that's not what I meant... > > If the alignment of a global in LLVM IR is "zero", it doesn't really mean > zero. It means "guess the alignment I want based on the specified type of > the global". And

[PATCH] D32395: [clang-tidy] modernize-use-emplace: remove unnecessary make_pair calls

2017-04-25 Thread Piotr Padlewski via Phabricator via cfe-commits
Prazek added inline comments. Comment at: clang-tidy/modernize/UseEmplaceCheck.cpp:115 + const auto *MakePairCall = Result.Nodes.getNodeAs("make_pair"); + assert(InnerCtorCall || MakePairCall); JDevlieghere wrote: > It's highly recommended to put some kind

[PATCH] D32456: [ubsan] Make the alignment check work with some extern decls (PR32630)

2017-04-25 Thread Eli Friedman via Phabricator via cfe-commits
efriedma added a comment. Err, that's not what I meant... If the alignment of a global in LLVM IR is "zero", it doesn't really mean zero. It means "guess the alignment I want based on the specified type of the global". And that's not a game we ever want to play when generating IR from

[PATCH] D32456: [ubsan] Make the alignment check work with some extern decls (PR32630)

2017-04-25 Thread Vedant Kumar via Phabricator via cfe-commits
vsk added a comment. In https://reviews.llvm.org/D32456#737228, @efriedma wrote: > > If the alignment isn't explicitly set, it is initialized to 0. > > That's what I thought. I don't like this; clang should explicitly set an > alignment for every global. Ok, I will set this aside for now and

Re: [PATCH] D32435: clang-cl: Add support for /permissive-

2017-04-25 Thread David Majnemer via cfe-commits
On Tue, Apr 25, 2017 at 11:42 AM, Nico Weber wrote: > On Tue, Apr 25, 2017 at 2:06 PM, David Majnemer > wrote: > >> >> >> On Tue, Apr 25, 2017 at 8:46 AM, Nico Weber wrote: >> >>> On Mon, Apr 24, 2017 at 10:00 PM, David

[PATCH] D32395: [clang-tidy] modernize-use-emplace: remove unnecessary make_pair calls

2017-04-25 Thread Jakub Kuderski via Phabricator via cfe-commits
kuhar updated this revision to Diff 96622. kuhar marked 4 inline comments as done. kuhar added a comment. Added const where possible, moved from if-else to ternary. https://reviews.llvm.org/D32395 Files: clang-tidy/modernize/UseEmplaceCheck.cpp docs/ReleaseNotes.rst

[PATCH] D32395: [clang-tidy] modernize-use-emplace: remove unnecessary make_pair calls

2017-04-25 Thread Jakub Kuderski via Phabricator via cfe-commits
kuhar added a comment. Thanks for the suggestions, Jonas. Fixed. https://reviews.llvm.org/D32395 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D32456: [ubsan] Make the alignment check work with some extern decls (PR32630)

2017-04-25 Thread Eli Friedman via Phabricator via cfe-commits
efriedma added a comment. > If the alignment isn't explicitly set, it is initialized to 0. That's what I thought. I don't like this; clang should explicitly set an alignment for every global. https://reviews.llvm.org/D32456 ___ cfe-commits

r301348 - Minor fix for distribute_parallel_for_num_threads_codegen on AARCH64

2017-04-25 Thread Carlo Bertolli via cfe-commits
Author: cbertol Date: Tue Apr 25 13:59:37 2017 New Revision: 301348 URL: http://llvm.org/viewvc/llvm-project?rev=301348=rev Log: Minor fix for distribute_parallel_for_num_threads_codegen on AARCH64 Modified: cfe/trunk/test/OpenMP/distribute_parallel_for_num_threads_codegen.cpp Modified:

Re: [PATCH] D32435: clang-cl: Add support for /permissive-

2017-04-25 Thread Nico Weber via cfe-commits
On Tue, Apr 25, 2017 at 2:06 PM, David Majnemer wrote: > > > On Tue, Apr 25, 2017 at 8:46 AM, Nico Weber wrote: > >> On Mon, Apr 24, 2017 at 10:00 PM, David Majnemer < >> david.majne...@gmail.com> wrote: >> >>> >>> >>> On Mon, Apr 24, 2017 at 11:56

r301344 - [PGO/tests] Update comment to reflect reality.

2017-04-25 Thread Davide Italiano via cfe-commits
Author: davide Date: Tue Apr 25 13:04:31 2017 New Revision: 301344 URL: http://llvm.org/viewvc/llvm-project?rev=301344=rev Log: [PGO/tests] Update comment to reflect reality. Modified: cfe/trunk/test/CodeGen/pgo-sample-thinlto-summary.c Modified:

[PATCH] D32499: Further delay calling DeclMustBeEmitted until it's safe.

2017-04-25 Thread Raphael Isemann via Phabricator via cfe-commits
teemperor created this revision. As discussed in https://reviews.llvm.org/D30793, we have some unsafe calls to `isConsumerInterestedIn()`. This patch implements Richard's suggestion (from the inline comment) that we should track if we just deserialized an declaration. If we just deserialized,

Re: [PATCH] D32435: clang-cl: Add support for /permissive-

2017-04-25 Thread David Majnemer via cfe-commits
On Tue, Apr 25, 2017 at 8:46 AM, Nico Weber wrote: > On Mon, Apr 24, 2017 at 10:00 PM, David Majnemer > wrote: > >> >> >> On Mon, Apr 24, 2017 at 11:56 AM, Nico Weber wrote: >> >>> "Opting into the conforming mode,

r301339 - [PGO] Update test now that we don't call IndirectCallPromotion.

2017-04-25 Thread Davide Italiano via cfe-commits
Author: davide Date: Tue Apr 25 12:48:10 2017 New Revision: 301339 URL: http://llvm.org/viewvc/llvm-project?rev=301339=rev Log: [PGO] Update test now that we don't call IndirectCallPromotion. Modified: cfe/trunk/test/CodeGen/pgo-sample-thinlto-summary.c Modified:

[PATCH] D32372: Arrays of unknown bound in constant expressions

2017-04-25 Thread Robert Haberlach via Phabricator via cfe-commits
Arcoth updated this revision to Diff 96603. Arcoth added a comment. Small fix. https://reviews.llvm.org/D32372 Files: include/clang/Basic/DiagnosticASTKinds.td lib/AST/ExprConstant.cpp test/SemaCXX/constexpr-array-unknown-bound.cpp Index: test/SemaCXX/constexpr-array-unknown-bound.cpp

[PATCH] D28670: [ObjC] Disallow vector parameters and return values in Objective-C methods on older X86 targets

2017-04-25 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman added a comment. Ping. Repository: rL LLVM https://reviews.llvm.org/D28670 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D32348: [libclang] Check for a record declaration before a template specialization.

2017-04-25 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman added a comment. @emilio, you can request to merge this into 4.0.1 by using a script called merge-request.sh (http://lists.llvm.org/pipermail/llvm-dev/2017-March/111530.html). Repository: rL LLVM https://reviews.llvm.org/D32348 ___

[PATCH] D32372: Arrays of unknown bound in constant expressions

2017-04-25 Thread Robert Haberlach via Phabricator via cfe-commits
Arcoth updated this revision to Diff 96594. Arcoth marked 6 inline comments as done. Arcoth added a comment. Adjusted. Implemented the changes suggested by Richard. The array-to-pointer decay is now well-formed; the check was instead moved to the pointer arithmetic facility.

[PATCH] D30771: [analyzer] Teach the MallocChecker about Glib API for two arguments

2017-04-25 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ accepted this revision. NoQ added a comment. This revision now requires changes to proceed. This looks great, thanks a lot! Repository: rL LLVM https://reviews.llvm.org/D30771 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

r301328 - [libclang] Check for a record declaration before a template specialization

2017-04-25 Thread Alex Lorenz via cfe-commits
Author: arphaman Date: Tue Apr 25 11:59:07 2017 New Revision: 301328 URL: http://llvm.org/viewvc/llvm-project?rev=301328=rev Log: [libclang] Check for a record declaration before a template specialization Fixes PR32539. Patch by Emilio Cobos Álvarez! Differential Revision:

[PATCH] D32348: [libclang] Check for a record declaration before a template specialization.

2017-04-25 Thread Alex Lorenz via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL301328: [libclang] Check for a record declaration before a template specialization (authored by arphaman). Changed prior to commit: https://reviews.llvm.org/D32348?vs=96130=96590#toc Repository: rL

[PATCH] D32348: [libclang] Check for a record declaration before a template specialization.

2017-04-25 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman added a comment. Sure. You can ask Chris Lattner for commit access for future patches :) https://reviews.llvm.org/D32348 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D32389: [libclang] Expose some target information via the C API.

2017-04-25 Thread Emilio Cobos Álvarez via Phabricator via cfe-commits
emilio added a comment. Sounds good to me, will do :) Repository: rL LLVM https://reviews.llvm.org/D32389 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D32348: [libclang] Check for a record declaration before a template specialization.

2017-04-25 Thread Emilio Cobos Álvarez via Phabricator via cfe-commits
emilio added a comment. Yes, please! I've submitted a few patches, but still no commit access. Thanks! https://reviews.llvm.org/D32348 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D32395: [clang-tidy] modernize-use-emplace: remove unnecessary make_pair calls

2017-04-25 Thread Jonas Devlieghere via Phabricator via cfe-commits
JDevlieghere added inline comments. Comment at: clang-tidy/modernize/UseEmplaceCheck.cpp:115 + const auto *MakePairCall = Result.Nodes.getNodeAs("make_pair"); + assert(InnerCtorCall || MakePairCall); It's highly recommended to put some kind of error message

Re: [PATCH] D32435: clang-cl: Add support for /permissive-

2017-04-25 Thread Nico Weber via cfe-commits
On Mon, Apr 24, 2017 at 10:00 PM, David Majnemer wrote: > > > On Mon, Apr 24, 2017 at 11:56 AM, Nico Weber wrote: > >> "Opting into the conforming mode, /permissive-, during the series of VS >> 2017 update is a commitment to keeping your code base

r301315 - [index] Index type source info for class specializations

2017-04-25 Thread Alex Lorenz via cfe-commits
Author: arphaman Date: Tue Apr 25 10:13:42 2017 New Revision: 301315 URL: http://llvm.org/viewvc/llvm-project?rev=301315=rev Log: [index] Index type source info for class specializations rdar://31758344 Modified: cfe/trunk/lib/Index/IndexDecl.cpp

[PATCH] D32489: [compiler-rt] [test] Build sanitizer/xray tests only if COMPILER_RT_BUILD_* is on

2017-04-25 Thread Michał Górny via Phabricator via cfe-commits
mgorny created this revision. Cover the sanitizer tests with COMPILER_RT_BUILD_SANITIZERS conditional, and add COMPILER_RT_BUILD_XRAY conditional to the xray tests. This makes it possible to do a pure-builtins build with tests enabled. Repository: rL LLVM https://reviews.llvm.org/D32489

[PATCH] D32486: Cleanup pragma handlers after DoPrintPreprocessedInput

2017-04-25 Thread Yaron Keren via Phabricator via cfe-commits
yaron.keren accepted this revision. yaron.keren added a comment. This revision is now accepted and ready to land. LGTM https://reviews.llvm.org/D32486 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D32486: Cleanup pragma handlers after DoPrintPreprocessedInput

2017-04-25 Thread Raphael Isemann via Phabricator via cfe-commits
teemperor updated this revision to Diff 96561. teemperor added a comment. - Now using unique_ptr instead of raw pointers. https://reviews.llvm.org/D32486 Files: lib/Frontend/PrintPreprocessedOutput.cpp Index: lib/Frontend/PrintPreprocessedOutput.cpp

[PATCH] D32248: CodeGen: Cast alloca to expected address space

2017-04-25 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added inline comments. Comment at: lib/CodeGen/CGDecl.cpp:1105-1119 + // Alloca always returns a pointer in alloca address space, which may + // be different from the type defined by the language. For example, + // in C++ the auto variables are in the default

r301310 - [index] Record the 'SpecializationOf' relation for function specializations

2017-04-25 Thread Alex Lorenz via cfe-commits
Author: arphaman Date: Tue Apr 25 09:22:29 2017 New Revision: 301310 URL: http://llvm.org/viewvc/llvm-project?rev=301310=rev Log: [index] Record the 'SpecializationOf' relation for function specializations rdar://31603531 Modified: cfe/trunk/lib/Index/IndexDecl.cpp

[PATCH] D32486: Cleanup pragma handlers after DoPrintPreprocessedInput

2017-04-25 Thread Yaron Keren via Phabricator via cfe-commits
yaron.keren added a comment. Please move the =new out of the PP.AddPragmaHandler calls. While at it, this code still (as the original) leaks the PragmaHandlers. These should be deleted after RemovePragmaHandler or instead, simply use std::unique_ptr. https://reviews.llvm.org/D32486

[PATCH] D30489: [analyzer] catch out of bounds for VLA

2017-04-25 Thread Gábor Horváth via Phabricator via cfe-commits
xazax.hun added a comment. In https://reviews.llvm.org/D30489#728945, @danielmarjamaki wrote: > I would propose that I rename and cleanup RangeConstraintManager::uglyEval() > and add it. When I tested it, the Z3 does not seem to handle this. What do you mean by Z3 not handling this? I mean,

[PATCH] D32486: Cleanup pragma handlers after DoPrintPreprocessedInput

2017-04-25 Thread Raphael Isemann via Phabricator via cfe-commits
teemperor created this revision. The UnknownPragmaHandlers added by t`DoPrintPreprocessedInput` conflict with the real PragmaHandlers from clang::Parser because they try to handle the same `#pragma` directives. This makes it impossible to use a Preprocessor (that was previously passed to

[PATCH] D32439: Fix for incorrect source position of dependent c'tor initializer (bug:26195)

2017-04-25 Thread Malcolm Parsons via Phabricator via cfe-commits
malcolm.parsons added a comment. In https://reviews.llvm.org/D32439#736631, @Serge_Preis wrote: > What do you think? Seems reasonable. https://reviews.llvm.org/D32439 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D30295: [analyzer] clarify undef shift result when shift count is negative or exceeds the bit width

2017-04-25 Thread Daniel Marjamäki via Phabricator via cfe-commits
danielmarjamaki marked an inline comment as done. danielmarjamaki added a comment. Ping. Repository: rL LLVM https://reviews.llvm.org/D30295 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D30489: [analyzer] catch out of bounds for VLA

2017-04-25 Thread Daniel Marjamäki via Phabricator via cfe-commits
danielmarjamaki added a comment. This revision now requires changes to proceed. Ping. Any comments? Repository: rL LLVM https://reviews.llvm.org/D30489 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D31029: [analyzer] Fix logical not for pointers with different bit width

2017-04-25 Thread Daniel Marjamäki via Phabricator via cfe-commits
danielmarjamaki added a comment. Ping Repository: rL LLVM https://reviews.llvm.org/D31029 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: r289018 - [Headers] Enable #include_next on Darwin

2017-04-25 Thread Aaron Ballman via cfe-commits
On Wed, Dec 7, 2016 at 9:13 PM, Bruno Cardoso Lopes via cfe-commits wrote: > Author: bruno > Date: Wed Dec 7 20:13:56 2016 > New Revision: 289018 > > URL: http://llvm.org/viewvc/llvm-project?rev=289018=rev > Log: > [Headers] Enable #include_next on Darwin > > Allows

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

2017-04-25 Thread Whisperity via Phabricator via cfe-commits
whisperity added inline comments. Comment at: lib/AST/ASTContext.cpp:1497 + auto FnUnitCacheEntry = FunctionAstUnitMap.find(MangledFnName); + if (FnUnitCacheEntry == FunctionAstUnitMap.end()) { +if (FunctionFileMap.empty()) { danielmarjamaki wrote: > How

[PATCH] D32424: Add a fix-it for -Wunguarded-availability

2017-04-25 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman updated this revision to Diff 96538. arphaman added a comment. Now the patch takes the following situations into account: - Enclose only the statement in a `case`. - If the fixit has to enclose a declaration statement, then the fixit will try to enclose the appropriate uses as well.

[PATCH] D32346: [clang-tidy] New readability check for strlen argument

2017-04-25 Thread Jonas Toth via Phabricator via cfe-commits
JonasToth added inline comments. Comment at: docs/clang-tidy/checks/readability-strlen-argument.rst:8 + +In the example code below the developer probably wanted to make room for an extra char in the allocation but misplaced the addition. + danielmarjamaki

[PATCH] D25866: [Sema] Support implicit scalar to vector conversions

2017-04-25 Thread Simon Dardis via Phabricator via cfe-commits
sdardis updated this revision to Diff 96533. sdardis added a comment. Rebase + ping. https://reviews.llvm.org/D25866 Files: include/clang/Basic/DiagnosticSemaKinds.td include/clang/Sema/Sema.h lib/Sema/SemaExpr.cpp lib/Sema/SemaExprCXX.cpp test/Sema/vector-cast.c

[PATCH] D31496: Make -defsym a driver option

2017-04-25 Thread Salman Arif via Phabricator via cfe-commits
salari01 abandoned this revision. salari01 added a comment. In https://reviews.llvm.org/D31496#721262, @rnk wrote: > `-Wl,--defsym` is also a pretty common linker option. I'm hesitant to add > this to the driver interface, since it seems like they could easily be > confused. I see. Was not

[PATCH] D32439: Fix for incorrect source position of dependent c'tor initializer (bug:26195)

2017-04-25 Thread Serge Preis via Phabricator via cfe-commits
Serge_Preis added a comment. In https://reviews.llvm.org/D32439#736503, @malcolm.parsons wrote: > Is it possible to add a test for this change? > There are some source range checks in test/Misc/ast-dump-decl.cpp I looked into test/Misc/ast-dump-decl.cpp and other tests around, but they all

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

2017-04-25 Thread Daniel Marjamäki via Phabricator via cfe-commits
danielmarjamaki added inline comments. Comment at: lib/AST/ASTContext.cpp:1495 + ASTUnit *Unit = nullptr; + StringRef ASTFileName; + auto FnUnitCacheEntry = FunctionAstUnitMap.find(MangledFnName); As far as I see you can move this ASTFileName declaration

r301302 - Fix fuzzer.c test on platforms where CLANG_DEFAULT_CXX_STDLIB is libc++

2017-04-25 Thread Ismail Donmez via cfe-commits
Author: ismail Date: Tue Apr 25 06:24:14 2017 New Revision: 301302 URL: http://llvm.org/viewvc/llvm-project?rev=301302=rev Log: Fix fuzzer.c test on platforms where CLANG_DEFAULT_CXX_STDLIB is libc++ Modified: cfe/trunk/test/Driver/fuzzer.c Modified: cfe/trunk/test/Driver/fuzzer.c URL:

[PATCH] D32346: [clang-tidy] New readability check for strlen argument

2017-04-25 Thread Daniel Marjamäki via Phabricator via cfe-commits
danielmarjamaki added inline comments. Comment at: docs/clang-tidy/checks/readability-strlen-argument.rst:8 + +In the example code below the developer probably wanted to make room for an extra char in the allocation but misplaced the addition. + JonasToth

[PATCH] D32346: [clang-tidy] New readability check for strlen argument

2017-04-25 Thread Jonas Toth via Phabricator via cfe-commits
JonasToth added a comment. > #include > void dostuff(const char *P) { > > if (strncmp(P+2,"xyz",3)==0) {} > > } > > Iam not super familiar with C, but the intend of the function is to check the following: P = "foxyz", P2 = "abxyz", P3 = "opxyz", ... And if P matches this kind of

[PATCH] D32346: [clang-tidy] New readability check for strlen argument

2017-04-25 Thread Daniel Marjamäki via Phabricator via cfe-commits
danielmarjamaki added a comment. I am thinking about making my check more strict so it only warns in allocations. I believe the example code is much more motivating when there is allocation. In https://reviews.llvm.org/D32346#733430, @JonasToth wrote: > My thoughts on the check added. > Have

[PATCH] D32346: [clang-tidy] New readability check for strlen argument

2017-04-25 Thread Jonas Toth via Phabricator via cfe-commits
JonasToth added inline comments. Comment at: docs/clang-tidy/checks/readability-strlen-argument.rst:8 + +In the example code below the developer probably wanted to make room for an extra char in the allocation but misplaced the addition. + when the intend was

[PATCH] D32346: [clang-tidy] New readability check for strlen argument

2017-04-25 Thread Daniel Marjamäki via Phabricator via cfe-commits
danielmarjamaki updated this revision to Diff 96526. danielmarjamaki added a comment. Fixed review comments. Made code examples and documentation more motivational. Repository: rL LLVM https://reviews.llvm.org/D32346 Files: clang-tidy/readability/CMakeLists.txt

[PATCH] D32439: Fix for incorrect source position of dependent c'tor initializer (bug:26195)

2017-04-25 Thread Serge Preis via Phabricator via cfe-commits
Serge_Preis added a comment. In https://reviews.llvm.org/D32439#736503, @malcolm.parsons wrote: > Is it possible to add a test for this change? > There are some source range checks in test/Misc/ast-dump-decl.cpp Yes, I think testing is quite possible. I will take a look into

[PATCH] D32439: Fix for incorrect source position of dependent c'tor initializer (bug:26195)

2017-04-25 Thread Malcolm Parsons via Phabricator via cfe-commits
malcolm.parsons added a comment. Is it possible to add a test for this change? There are some source range checks in test/Misc/ast-dump-decl.cpp https://reviews.llvm.org/D32439 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D32427: Fix float abi for SUSE ARM triples

2017-04-25 Thread İsmail Dönmez via Phabricator via cfe-commits
ismail abandoned this revision. ismail added a comment. compnerd has a better fix. https://reviews.llvm.org/D32427 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D32436: [clang-tidy] Support detecting for-range loop in inefficient-vector-operation check.

2017-04-25 Thread Haojian Wu via Phabricator via cfe-commits
hokein updated this revision to Diff 96516. hokein marked an inline comment as done. hokein added a comment. Fix doc. https://reviews.llvm.org/D32436 Files: clang-tidy/performance/InefficientVectorOperationCheck.cpp clang-tidy/performance/InefficientVectorOperationCheck.h

[PATCH] D32475: [clang-format] Don’t propagate AvoidBinPacking into argument subexpressions

2017-04-25 Thread Jacob Bandes-Storch via Phabricator via cfe-commits
jtbandes created this revision. Herald added a subscriber: klimek. This is an attempt to fix the issue described in my recent email: http://lists.llvm.org/pipermail/cfe-dev/2017-April/053632.html After digging in for a while, I learned that: - the spurious line breaks were occurring inside the