r305182 - Revert r305164/5/7.

2017-06-12 Thread Daniel Jasper via cfe-commits
Author: djasper Date: Mon Jun 12 03:08:18 2017 New Revision: 305182 URL: http://llvm.org/viewvc/llvm-project?rev=305182&view=rev Log: Revert r305164/5/7. cc1as does not currently access the "--" version of this flag. At the very least this needs to be fixed and proper test cases need to be added.

[PATCH] D33277: [Clang][x86][Inline Asm] - Enum support for MS syntax

2017-06-12 Thread Matan via Phabricator via cfe-commits
mharoush updated this revision to Diff 102172. mharoush marked 6 inline comments as done. mharoush added a comment. Restored old test case for constant int folding and added check-label directives for each tester function. Repository: rL LLVM https://reviews.llvm.org/D33277 Files: lib/Sem

[PATCH] D33278: [LLVM][x86][Inline Asm] - Enum support for MS syntax

2017-06-12 Thread Matan via Phabricator via cfe-commits
mharoush marked 3 inline comments as done. mharoush added a comment. ping Repository: rL LLVM https://reviews.llvm.org/D33278 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D34102: [analyzer] Add portability package for the checkers.

2017-06-12 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ created this revision. Checkers that find implementation-defined behavior seem to better be off by default - or, at least, there should be a way to turn them off - because we're not sure if our users are developing cross-platform code or target a specific platform. If the behavior is well-d

[PATCH] D34102: [analyzer] Add portability package for the checkers.

2017-06-12 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added inline comments. Comment at: include/clang/StaticAnalyzer/Checkers/Checkers.td:425 -def UnixAPIChecker : Checker<"API">, +def UnixAPIMisuseChecker : Checker<"API">, HelpText<"Check calls to various UNIX/Posix functions">, This rename is user-invisi

[PATCH] D33589: clang-format: consider not splitting tokens in optimization

2017-06-12 Thread Francois Ferrand via Phabricator via cfe-commits
Typz added a comment. ping? https://reviews.llvm.org/D33589 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D33447: clang-format: add option to merge empty function body

2017-06-12 Thread Francois Ferrand via Phabricator via cfe-commits
Typz added a comment. ping? https://reviews.llvm.org/D33447 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D32480: clang-format: Add CompactNamespaces option

2017-06-12 Thread Francois Ferrand via Phabricator via cfe-commits
Typz added a comment. ping? https://reviews.llvm.org/D32480 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D34103: Allow use of fixed width integer types in builtin definitions

2017-06-12 Thread Edward Jones via Phabricator via cfe-commits
edward-jones created this revision. This makes it possible to specify a bit width after the 'i' integer type specifier when defining builtins. The bswap and bitreverse builtins have been updated so that their definitions use fixed-width types instead of short, int and long, so that they work on

[PATCH] D30946: [ScopePrinting] Added support to print full scopes of types and declarations.

2017-06-12 Thread Simon Schroeder via Phabricator via cfe-commits
schroedersi added a comment. Ping :) https://reviews.llvm.org/D30946 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D33823: [clang-format] Support sorting using declarations

2017-06-12 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir added a comment. @klimek: ping https://reviews.llvm.org/D33823 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[libcxx] r305191 - [array.tuple]/1 says that instantiating tuple_element> is ill-formed if N >= M. We didn't do that. Add a static_assert to cause a failure, and a test that checks that

2017-06-12 Thread Marshall Clow via cfe-commits
Author: marshall Date: Mon Jun 12 09:41:37 2017 New Revision: 305191 URL: http://llvm.org/viewvc/llvm-project?rev=305191&view=rev Log: [array.tuple]/1 says that instantiating tuple_element> is ill-formed if N >= M. We didn't do that. Add a static_assert to cause a failure, and a test that check

[PATCH] D33447: clang-format: add option to merge empty function body

2017-06-12 Thread Daniel Jasper via Phabricator via cfe-commits
djasper accepted this revision. djasper added a comment. This revision is now accepted and ready to land. Looks good. https://reviews.llvm.org/D33447 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listi

[PATCH] D32480: clang-format: Add CompactNamespaces option

2017-06-12 Thread Manuel Klimek via Phabricator via cfe-commits
klimek added a comment. In https://reviews.llvm.org/D32480#773807, @Typz wrote: > So how do I proceed? > > 1. Keep the CompactNamespace option, and make "compacted" namespaces always > add at most one level of indentation > 2. Or assume that this can only ever usefully work with the behavior of

Re: [PATCH] D33932: [clang-format] Add support for case-insensitive header matching and use it to improve support for LLVM-style include sorting.

2017-06-12 Thread David Blaikie via cfe-commits
On Tue, Jun 6, 2017 at 3:56 AM Chandler Carruth via Phabricator via cfe-commits wrote: > chandlerc created this revision. > Herald added subscribers: mcrosier, sanjoy, klimek. > > This really is a collection of improvements to the rules for LLVM > include sorting: > > - We have gmock headers now,

[PATCH] D34102: [analyzer] Add portability package for the checkers.

2017-06-12 Thread Anna Zaks via Phabricator via cfe-commits
zaks.anna added inline comments. Comment at: include/clang/StaticAnalyzer/Checkers/Checkers.td:454 +def UnixAPIPortabilityChecker : Checker<"API">, + HelpText<"Finds implementation-defined behavior in UNIX/Posix functions">, + DescFile<"UnixAPIChecker.cpp">; Do

Re: r304892 - [Sema] Silence unused variable warning.

2017-06-12 Thread David Blaikie via cfe-commits
Richard, looks like this might be better as: if (auto QL = OE->getQualifierLoc()) ... QL.getBeginLoc() ... ? On Wed, Jun 7, 2017 at 3:23 AM Benjamin Kramer via cfe-commits < cfe-commits@lists.llvm.org> wrote: > Author: d0k > Date: Wed Jun 7 05:23:17 2017 > New Revision: 304892 > > URL: http

[PATCH] D33910: [ubsan] Detect invalid unsigned pointer index expression (clang)

2017-06-12 Thread Will Dietz via Phabricator via cfe-commits
dtzWill accepted this revision. dtzWill added a comment. LGTM! Sorry for missing this originally, as a perhaps interesting note: the checks were extracted from a research prototype that worked at the IR level --where pointer itself is unsigned but the offsets (including the computed total offse

[PATCH] D34105: Define _GNU_SOURCE for rtems c++

2017-06-12 Thread Walter Lee via Phabricator via cfe-commits
waltl created this revision. This is required by the libc++ locale support. https://reviews.llvm.org/D34105 Files: lib/Basic/Targets.cpp test/Preprocessor/init.c Index: test/Preprocessor/init.c === --- test/Preprocessor/init.

[PATCH] D34106: [clangd] Use 'std::string' for VFSTag instead of 'int'

2017-06-12 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov created this revision. https://reviews.llvm.org/D34106 Files: clangd/ClangdServer.h unittests/clangd/ClangdTests.cpp Index: unittests/clangd/ClangdTests.cpp === --- unittests/clangd/ClangdTests.cpp +++ unittests/c

[PATCH] D34107: [clangd] Allow to override contents of the file during completion.

2017-06-12 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov created this revision. https://reviews.llvm.org/D34107 Files: clangd/ClangdServer.cpp clangd/ClangdServer.h unittests/clangd/ClangdTests.cpp Index: unittests/clangd/ClangdTests.cpp === --- unittests/clangd/Clangd

r305195 - [Sema][C++1z] Ensure binding in dependent range for have non-null type

2017-06-12 Thread Erik Pilkington via cfe-commits
Author: epilk Date: Mon Jun 12 11:11:06 2017 New Revision: 305195 URL: http://llvm.org/viewvc/llvm-project?rev=305195&view=rev Log: [Sema][C++1z] Ensure binding in dependent range for have non-null type Fixes PR32172 Differential revision: https://reviews.llvm.org/D34096 Modified: cfe/trunk

[PATCH] D34096: [Sema][C++1z] Ensure structured binding's bindings in dependent foreach have non-null type

2017-06-12 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL305195: [Sema][C++1z] Ensure binding in dependent range for have non-null type (authored by epilk). Changed prior to commit: https://reviews.llvm.org/D34096?vs=102149&id=102191#toc Repository: rL LLV

[PATCH] D34102: [analyzer] Add portability package for the checkers.

2017-06-12 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added inline comments. Comment at: include/clang/StaticAnalyzer/Checkers/Checkers.td:454 +def UnixAPIPortabilityChecker : Checker<"API">, + HelpText<"Finds implementation-defined behavior in UNIX/Posix functions">, + DescFile<"UnixAPIChecker.cpp">; zaks.ann

[PATCH] D33904: Add a __has_attribute_enhancement macro to clang

2017-06-12 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak added inline comments. Comment at: docs/LanguageExtensions.rst:176 +For example, clang's ``overloadable`` attribute has existed since before Clang +3.5, but in Clang 5.0 it gained was modified to support so-called "unmarked +overloads". One can use ``__has_attribute_enh

[libcxx] r305196 - Make tuple_element static_assert in pair if the index is out of range. Also, add a message to variant_alternative<> in the similar case (it already asserted). Add tests for this

2017-06-12 Thread Marshall Clow via cfe-commits
Author: marshall Date: Mon Jun 12 11:13:17 2017 New Revision: 305196 URL: http://llvm.org/viewvc/llvm-project?rev=305196&view=rev Log: Make tuple_element static_assert in pair if the index is out of range. Also, add a message to variant_alternative<> in the similar case (it already asserted). Ad

[PATCH] D33904: Add a __has_attribute_enhancement macro to clang

2017-06-12 Thread Hal Finkel via Phabricator via cfe-commits
hfinkel added a comment. I prefer `__has_attribute_feature` to enhancement. I don't see why we need a new macro for this, however. Why not just use `__has_feature(overloadable_unmarked)` or similar? https://reviews.llvm.org/D33904 ___ cfe-commits

Re: [libcxxabi] r305173 - cxa_demangle: fix -Wimplicit-fallthrough for GCC:7

2017-06-12 Thread Erik Pilkington via cfe-commits
Clang warns on macos here: /Users/epilk/llvm/projects/libcxxabi/src/cxa_demangle.cpp:2261:27: warning: unknown attribute 'fallthrough' ignored [-Wunknown-attributes] [[gnu::fallthrough]]; ^ Can you try defining a compatibility macro like LLVM_FAL

[libcxx] r305198 - Mark the recent variant test as UNSUPPORTED for C++ before 17

2017-06-12 Thread Marshall Clow via cfe-commits
Author: marshall Date: Mon Jun 12 11:33:41 2017 New Revision: 305198 URL: http://llvm.org/viewvc/llvm-project?rev=305198&view=rev Log: Mark the recent variant test as UNSUPPORTED for C++ before 17 Modified: libcxx/trunk/test/libcxx/utilities/variant/variant.variant/variant.helper/variant_alt

[PATCH] D33102: [clang] Implement -Wcast-qual for C++

2017-06-12 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added a comment. So i'm trying to analyze that stage2 warning. The testcase //seems// to be: (autogenerated all the variants) void test_nop() { unsigned char **ptr1 = 0; void **ptr2 = (void **)ptr1; } void test_bad() { unsigned char **ptr1 = 0; const void **ptr2 =

Re: [PATCH] D33102: [clang] Implement -Wcast-qual for C++

2017-06-12 Thread David Blaikie via cfe-commits
On Mon, Jun 12, 2017 at 10:10 AM Roman Lebedev via Phabricator < revi...@reviews.llvm.org> wrote: > lebedev.ri added a comment. > > So i'm trying to analyze that stage2 warning. > Could you link to the buildbot failure to see the original LLVM project code triggering this situation? > The testc

Re: [PATCH] D33102: [clang] Implement -Wcast-qual for C++

2017-06-12 Thread Roman Lebedev via cfe-commits
On Mon, Jun 12, 2017 at 8:16 PM, David Blaikie wrote: > > > On Mon, Jun 12, 2017 at 10:10 AM Roman Lebedev via Phabricator > wrote: >> >> lebedev.ri added a comment. >> >> So i'm trying to analyze that stage2 warning. > > > Could you link to the buildbot failure to see the original LLVM project c

r305207 - [Sema] Use the right FoldingSet.

2017-06-12 Thread George Burgess IV via cfe-commits
Author: gbiv Date: Mon Jun 12 12:44:30 2017 New Revision: 305207 URL: http://llvm.org/viewvc/llvm-project?rev=305207&view=rev Log: [Sema] Use the right FoldingSet. We were doing FindNodeOrInsertPos on SubstTemplateTypeParmPackTypes, so we should presumably be inserting into SubstTemplateTypeParmP

[PATCH] D33904: Add a __has_attribute_enhancement macro to clang

2017-06-12 Thread George Burgess IV via Phabricator via cfe-commits
george.burgess.iv added a comment. > Why not just use __has_feature(overloadable_unmarked) or similar? My impression was that `__has_feature` was was for larger features than tweaks to attributes. If this would be an appropriate use of `__has_feature`, though, I'm happy to keep things simple.

[PATCH] D33842: [AMDGPU] Fix address space of global variable

2017-06-12 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl updated this revision to Diff 102204. yaxunl marked an inline comment as done. yaxunl added a comment. Add TargetInfo::getTargetConstantAddressSpace. https://reviews.llvm.org/D33842 Files: include/clang/Basic/TargetInfo.h lib/Basic/Targets.cpp lib/CodeGen/CGExpr.cpp lib/CodeGen/C

r305211 - [analyzer] Fix a crash when an ObjC object is constructed in AllocaRegion.

2017-06-12 Thread Artem Dergachev via cfe-commits
Author: dergachev Date: Mon Jun 12 12:59:50 2017 New Revision: 305211 URL: http://llvm.org/viewvc/llvm-project?rev=305211&view=rev Log: [analyzer] Fix a crash when an ObjC object is constructed in AllocaRegion. Memory region allocated by alloca() carries no implicit type information. Don't crash

[PATCH] D33828: [analyzer] Don't crash when the code tries to construct an Objective-C object in AllocaRegion.

2017-06-12 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL305211: [analyzer] Fix a crash when an ObjC object is constructed in AllocaRegion. (authored by dergachev). Changed prior to commit: https://reviews.llvm.org/D33828?vs=101401&id=102206#toc Repository:

r305213 - Add regression test for r305179.

2017-06-12 Thread Yaron Keren via cfe-commits
Author: yrnkrn Date: Mon Jun 12 13:05:13 2017 New Revision: 305213 URL: http://llvm.org/viewvc/llvm-project?rev=305213&view=rev Log: Add regression test for r305179. Added: cfe/trunk/test/Misc/pr32207.c Added: cfe/trunk/test/Misc/pr32207.c URL: http://llvm.org/viewvc/llvm-project/cfe/trunk

[PATCH] D32332: Add support for transparent overloadable functions in clang

2017-06-12 Thread George Burgess IV via Phabricator via cfe-commits
george.burgess.iv updated this revision to Diff 102207. george.burgess.iv added a comment. Swap to using `__has_feature(overloadable_unmarked)` for detection, as recommended by Hal in https://reviews.llvm.org/D33904 https://reviews.llvm.org/D32332 Files: include/clang/Basic/AttrDocs.td inc

[PATCH] D33478: [libclang] When getting platform availabilities, merge multiple declarations if possible

2017-06-12 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman added a comment. Thanks, I'll recommit today. https://reviews.llvm.org/D33478 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

RE: r284060 - Implement MS _BitScan intrinsics

2017-06-12 Thread Erik Schwiebert via cfe-commits
Any more thoughts on this from Saleem or Apple folks? Thanks, Schwieb From: Erik Schwiebert Sent: Thursday, June 8, 2017 12:22 PM To: 'Saleem Abdulrasool' ; 'Duncan P. N. Exon Smith' Cc: 'Albert Gutowski' ; 'Reid Kleckner' ; 'David Majnemer' ; 'cfe-commits' Subject: RE: r284060 - Implement M

Re: r305213 - Add regression test for r305179.

2017-06-12 Thread David Blaikie via cfe-commits
Prefer FileCheck over grep, generally? On Mon, Jun 12, 2017 at 11:05 AM Yaron Keren via cfe-commits < cfe-commits@lists.llvm.org> wrote: > Author: yrnkrn > Date: Mon Jun 12 13:05:13 2017 > New Revision: 305213 > > URL: http://llvm.org/viewvc/llvm-project?rev=305213&view=rev > Log: > Add regressio

r305215 - Address David Blaikie comment by replacing grep with FileCheck.

2017-06-12 Thread Yaron Keren via cfe-commits
Author: yrnkrn Date: Mon Jun 12 13:29:37 2017 New Revision: 305215 URL: http://llvm.org/viewvc/llvm-project?rev=305215&view=rev Log: Address David Blaikie comment by replacing grep with FileCheck. Modified: cfe/trunk/test/Misc/pr32207.c Modified: cfe/trunk/test/Misc/pr32207.c URL: http://l

Re: r305213 - Add regression test for r305179.

2017-06-12 Thread Yaron Keren via cfe-commits
Sure, r305215. ‫בתאריך יום ב׳, 12 ביוני 2017 ב-21:21 מאת ‪David Blaikie‬‏ <‪ dblai...@gmail.com‬‏>:‬ > Prefer FileCheck over grep, generally? > > On Mon, Jun 12, 2017 at 11:05 AM Yaron Keren via cfe-commits < > cfe-commits@lists.llvm.org> wrote: > >> Author: yrnkrn >> Date: Mon Jun 12 13:05:13 20

Re: r305213 - Add regression test for r305179.

2017-06-12 Thread Yaron Keren via cfe-commits
Should also fix this bot failure http://green.lab.llvm.org/green/job/clang-stage1-cmake-RA-incremental_check/37468/testReport/junit/Clang/Misc/pr32207_c/ ‫בתאריך יום ב׳, 12 ביוני 2017 ב-21:30 מאת ‪Yaron Keren‬‏ <‪ yaron.ke...@gmail.com‬‏>:‬ > Sure, r305215. > > ‫בתאריך יום ב׳, 12 ביוני 2017 ב-2

[PATCH] D33910: [ubsan] Detect invalid unsigned pointer index expression (clang)

2017-06-12 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL305216: [ubsan] Detect invalid unsigned pointer index expression (clang) (authored by vedantk). Changed prior to commit: https://reviews.llvm.org/D33910?vs=101479&id=102214#toc Repository: rL LLVM h

r305216 - [ubsan] Detect invalid unsigned pointer index expression (clang)

2017-06-12 Thread Vedant Kumar via cfe-commits
Author: vedantk Date: Mon Jun 12 13:42:51 2017 New Revision: 305216 URL: http://llvm.org/viewvc/llvm-project?rev=305216&view=rev Log: [ubsan] Detect invalid unsigned pointer index expression (clang) Adding an unsigned offset to a base pointer has undefined behavior if the result of the expression

Re: [PATCH] D33102: [clang] Implement -Wcast-qual for C++

2017-06-12 Thread David Blaikie via cfe-commits
Yeah, looks like the UB is baked in pretty deep here, so it's not reasonable to try to fix it just because of this. I'd probably suggest trying making that cast in PointerUnion.h into a reinterpret cast? Would that suffice to address the const issues? Otherwise a const_cast + reinterpret_cast?

Re: r305182 - Revert r305164/5/7.

2017-06-12 Thread David Blaikie via cfe-commits
hey Saleem - might be worth sending a cfe-dev email about what the general direction/goals are here (may not need precommit review for every patch, but just some sanity checking) On Mon, Jun 12, 2017 at 1:08 AM Daniel Jasper via cfe-commits < cfe-commits@lists.llvm.org> wrote: > Author: djasper >

Re: r297702 - [CodeGen][ObjC] Fix a bug where the type of an ivar wasn't encoded

2017-06-12 Thread Joerg Sonnenberger via cfe-commits
On Thu, Jun 01, 2017 at 05:58:41PM -0700, Akira Hatanaka wrote: > It crashes when there is an anonymous ivar of a bitfield type. > > @interface FormatScanner { > int : 1; > } > @end > > @implementation FormatScanner > @end > > I'm not sure if the code above is valid or not, but out of curiosit

r305221 - Recommit r305117: [libclang] Merge multiple availability clauses when

2017-06-12 Thread Alex Lorenz via cfe-commits
Author: arphaman Date: Mon Jun 12 14:06:30 2017 New Revision: 305221 URL: http://llvm.org/viewvc/llvm-project?rev=305221&view=rev Log: Recommit r305117: [libclang] Merge multiple availability clauses when getting the platform's availability Patch by Ronald Wampler! Differential Revision: https:/

[PATCH] D33478: [libclang] When getting platform availabilities, merge multiple declarations if possible

2017-06-12 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman added a comment. Recommitted in r305221. https://reviews.llvm.org/D33478 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D33910: [ubsan] Detect invalid unsigned pointer index expression (clang)

2017-06-12 Thread Eli Friedman via Phabricator via cfe-commits
efriedma added inline comments. Comment at: cfe/trunk/lib/CodeGen/CGExprScalar.cpp:2666 + bool isSigned = indexOperand->getType()->isSignedIntegerOrEnumerationType(); + bool mayHaveNegativeGEPIndex = isSigned || isSubtraction; + This logic doesn't look quite ri

[PATCH] D33852: Enable __declspec(selectany) on linux

2017-06-12 Thread Reid Kleckner via Phabricator via cfe-commits
rnk added inline comments. Comment at: include/clang/Basic/Attr.td:2421 -def SelectAny : InheritableAttr, TargetSpecificAttr { +def SelectAny : InheritableAttr, TargetSpecificAttr { let Spellings = [Declspec<"selectany">, GCC<"selectany">]; davide wrote: > P

Re: r284060 - Implement MS _BitScan intrinsics

2017-06-12 Thread Reid Kleckner via cfe-commits
On Wed, Jun 7, 2017 at 7:31 PM, Saleem Abdulrasool wrote: > I'm worried about changing this signature all the time. I suspect that it > will cause the following to be emitted for valid code: > > warning: incompatible pointer types passing 'unsigned long *' to parameter > of type 'unsigned int *'

r305224 - Correct debug info bit offset calculation for big-endian targets

2017-06-12 Thread Reid Kleckner via cfe-commits
Author: rnk Date: Mon Jun 12 14:57:56 2017 New Revision: 305224 URL: http://llvm.org/viewvc/llvm-project?rev=305224&view=rev Log: Correct debug info bit offset calculation for big-endian targets Summary: The change "[CodeView] Implement support for bit fields in Clang" (r274201, https://reviews.l

[PATCH] D32745: Correct debug info bit offset calculation for big-endian targets

2017-06-12 Thread Reid Kleckner via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL305224: Correct debug info bit offset calculation for big-endian targets (authored by rnk). Changed prior to commit: https://reviews.llvm.org/D32745?vs=97773&id=102233#toc Repository: rL LLVM https:

r305227 - IR: Replace the "Linker Options" module flag with "llvm.linker.options" named metadata.

2017-06-12 Thread Peter Collingbourne via cfe-commits
Author: pcc Date: Mon Jun 12 15:10:48 2017 New Revision: 305227 URL: http://llvm.org/viewvc/llvm-project?rev=305227&view=rev Log: IR: Replace the "Linker Options" module flag with "llvm.linker.options" named metadata. The new metadata is easier to manipulate than module flags. Differential Revi

Re: [PATCH] D33910: [ubsan] Detect invalid unsigned pointer index expression (clang)

2017-06-12 Thread Vedant Kumar via cfe-commits
> On Jun 12, 2017, at 12:34 PM, Eli Friedman via Phabricator > wrote: > > efriedma added inline comments. > > > > Comment at: cfe/trunk/lib/CodeGen/CGExprScalar.cpp:2666 > + bool isSigned = > indexOperand->getType()->isSignedIntegerOrEnumerationType(); > + bool mayHaveNega

[PATCH] D30375: Function with unparsed body is a definition

2017-06-12 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith accepted this revision. rsmith added a comment. This revision is now accepted and ready to land. LGTM as-is, but a couple of questions for possible further improvements. Comment at: lib/Sema/SemaDecl.cpp:12221 FD->setBody(Body); +FD->setWillHaveBody(false); --

[PATCH] D34107: [clangd] Allow to override contents of the file during completion.

2017-06-12 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir accepted this revision. krasimir added inline comments. This revision is now accepted and ready to land. Comment at: unittests/clangd/ClangdTests.cpp:432 + // size the same. + // We complete on the 3rd line(2nd in zero-based numbering), because raw + // string literal

Re: [clang-tools-extra] r303735 - Modify test so that it looks for patterns in stderr as well

2017-06-12 Thread David Blaikie via cfe-commits
I've been seeing errors from this test recently: Command Output (stderr): -- 1 error generated. Error while processing /usr/local/google/home/blaikie/dev/llvm/src/tools/clang/tools/extra/test/clang-tidy/diagnostic.cpp.nonexistent.cpp. /usr/local/google/home/blaikie/dev/llvm/src/tools/clang/tools/e

Re: r284060 - Implement MS _BitScan intrinsics

2017-06-12 Thread Duncan P. N. Exon Smith via cfe-commits
> On Jun 12, 2017, at 12:44, Reid Kleckner wrote: > >> On Wed, Jun 7, 2017 at 7:31 PM, Saleem Abdulrasool >> wrote: >> I'm worried about changing this signature all the time. I suspect that it >> will cause the following to be emitted for valid code: >> >> warning: incompatible pointer type

RE: r284060 - Implement MS _BitScan intrinsics

2017-06-12 Thread Erik Schwiebert via cfe-commits
SGTM too. Regarding Duncan's last question -- I can't think of any such customer. :) If you all think the right thing for clang to do is to infer LLP64 behavior on LP64 (Darwin) + ms_extensions, then that is fine with me! Thanks all! Schwieb -Original Message- From: dexonsm...@apple.com

r305233 - Revert r303316, a change to ExprConstant to evaluate function arguments.

2017-06-12 Thread Nick Lewycky via cfe-commits
Author: nicholas Date: Mon Jun 12 16:15:44 2017 New Revision: 305233 URL: http://llvm.org/viewvc/llvm-project?rev=305233&view=rev Log: Revert r303316, a change to ExprConstant to evaluate function arguments. The patch was itself correct but it uncovered other bugs which are going to be difficult

r305238 - [ODRHash] Add diagnostic messages for typedef and type alias.

2017-06-12 Thread Richard Trieu via cfe-commits
Author: rtrieu Date: Mon Jun 12 16:58:22 2017 New Revision: 305238 URL: http://llvm.org/viewvc/llvm-project?rev=305238&view=rev Log: [ODRHash] Add diagnostic messages for typedef and type alias. Modified: cfe/trunk/include/clang/Basic/DiagnosticSerializationKinds.td cfe/trunk/lib/Serializ

r305239 - Revert r301742 which made ExprConstant checking apply to all full-exprs.

2017-06-12 Thread Nick Lewycky via cfe-commits
Author: nicholas Date: Mon Jun 12 16:59:18 2017 New Revision: 305239 URL: http://llvm.org/viewvc/llvm-project?rev=305239&view=rev Log: Revert r301742 which made ExprConstant checking apply to all full-exprs. This patch also exposed pre-existing bugs in clang, see PR32864 and PR33140#c3 . Modifie

[PATCH] D34121: [ubsan] Teach the pointer overflow check that "p - <= p" (PR33430)

2017-06-12 Thread Vedant Kumar via Phabricator via cfe-commits
vsk created this revision. The pointer overflow check gives false negatives when dealing with expressions in which an unsigned value is subtracted from a pointer. This is summarized in PR33430 [1]: ubsan permits the result of the submission to be greater than "p", but it should not. To fix the is

[PATCH] D34121: [ubsan] Teach the pointer overflow check that "p - <= p" (PR33430)

2017-06-12 Thread Eli Friedman via Phabricator via cfe-commits
efriedma added a comment. Looks okay, but I haven't been reviewing this series of patches closely, so I could be missing something. Comment at: lib/CodeGen/CGExprScalar.cpp:3974 ValidGEP = Builder.CreateAnd(PosOrZeroValid, NoOffsetOverflow); + } else if (!SignedIndices &

[PATCH] D34121: [ubsan] Teach the pointer overflow check that "p - <= p" (PR33430)

2017-06-12 Thread Vedant Kumar via Phabricator via cfe-commits
vsk updated this revision to Diff 102261. vsk marked an inline comment as done. vsk edited the summary of this revision. vsk added a comment. Thanks for the review! I'll wait for another 'lgtm'. https://reviews.llvm.org/D34121 Files: lib/CodeGen/CGExpr.cpp lib/CodeGen/CGExprScalar.cpp lib

[PATCH] D33305: [ubsan] Add a check for pointer overflow UB

2017-06-12 Thread Vedant Kumar via Phabricator via cfe-commits
vsk added a comment. @sberg I agree with @regehr's analysis, and do think that this is a real overflow. Once https://reviews.llvm.org/D34121 lands, we will report this issue in a better way: runtime error: addition of unsigned offset to 0x7fff59dfe990 overflowed to 0x7fff59dfe980 Repositor

[PATCH] D32146: PR32476: __nop_locale_mgmt.h not needed with newlib 2.5+

2017-06-12 Thread Walter Lee via Phabricator via cfe-commits
waltl commandeered this revision. waltl added a reviewer: bcraig. waltl added a comment. Thanks for submitting the patch -- I will make the necessary revision and test it. https://reviews.llvm.org/D32146 ___ cfe-commits mailing list cfe-commits@lis

[PATCH] D32146: PR32476: __nop_locale_mgmt.h not needed with newlib 2.5+

2017-06-12 Thread Walter Lee via Phabricator via cfe-commits
waltl updated this revision to Diff 102265. waltl added a comment. PR32476: __nop_locale_mgmt.h not needed with newlib 2.5+ Newlib 2.5 added the locale management functions, so it should not include __nop_local_mgmt.h. This change adds proper guard around that include statement. For newlib 2.4,

[PATCH] D32613: [Driver] Update Fuchsia driver path handling

2017-06-12 Thread Petr Hosek via Phabricator via cfe-commits
phosek updated this revision to Diff 102271. Repository: rL LLVM https://reviews.llvm.org/D32613 Files: lib/Driver/ToolChains/Fuchsia.cpp lib/Driver/ToolChains/Fuchsia.h test/Driver/fuchsia.cpp Index: test/Driver/fuchsia.cpp ==

[PATCH] D34021: [coroutines] Fix co_await for range statement

2017-06-12 Thread Gor Nishanov via Phabricator via cfe-commits
GorNishanov accepted this revision. GorNishanov added a comment. This revision is now accepted and ready to land. LGTM https://reviews.llvm.org/D34021 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/list

[PATCH] D34133: Cold attribute on function decls are lost. Fix the problem

2017-06-12 Thread David Li via Phabricator via cfe-commits
davidxl created this revision. Herald added a subscriber: sanjoy. LLVM static branch prediction depends on cold attribute to annotate branch probability. This is currently not possible for cold function decls as the information is dropped by FE. This patch attaches the attributes to the callsi

[libcxx] r305268 - Add a test with an empty input range - should do nothing

2017-06-12 Thread Marshall Clow via cfe-commits
Author: marshall Date: Mon Jun 12 21:28:40 2017 New Revision: 305268 URL: http://llvm.org/viewvc/llvm-project?rev=305268&view=rev Log: Add a test with an empty input range - should do nothing Modified: libcxx/trunk/test/std/numerics/numeric.ops/transform.exclusive.scan/transform_exclusive_sc

r305269 - [docs] Add some ubsan changes to the release notes

2017-06-12 Thread Vedant Kumar via cfe-commits
Author: vedantk Date: Mon Jun 12 21:52:31 2017 New Revision: 305269 URL: http://llvm.org/viewvc/llvm-project?rev=305269&view=rev Log: [docs] Add some ubsan changes to the release notes Modified: cfe/trunk/docs/ReleaseNotes.rst Modified: cfe/trunk/docs/ReleaseNotes.rst URL: http://llvm.org/v

[PATCH] D16971: [Sema] PR26077 Fixed crash when partial specialization is missing required parameters

2017-06-12 Thread don hinton via Phabricator via cfe-commits
hintonda updated this revision to Diff 102292. hintonda added a comment. Rebase, fix test, and add FIXME note. https://reviews.llvm.org/D16971 Files: lib/Sema/SemaTemplate.cpp test/SemaTemplate/partial-spec-fully-specified.cpp Index: test/SemaTemplate/partial-spec-fully-specified.cpp

[PATCH] D34052: [XRay][clang] Support capturing the implicit `this` argument to C++ class member functions

2017-06-12 Thread Dean Michael Berris via Phabricator via cfe-commits
dberris added a reviewer: dblaikie. dberris added a subscriber: dblaikie. dberris added a comment. @dblaikie -- do you have time to have a look? https://reviews.llvm.org/D34052 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llv

Re: r305239 - Revert r301742 which made ExprConstant checking apply to all full-exprs.

2017-06-12 Thread NAKAMURA Takumi via cfe-commits
It triggered a test failure for targeting i686 (seems also for arm) See also; http://bb.pgr.jp/builders/test-clang-i686-linux-RA/builds/3566 On Tue, Jun 13, 2017 at 6:59 AM Nick Lewycky via cfe-commits < cfe-commits@lists.llvm.org> wrote: > Author: nicholas > Date: Mon Jun 12 16:59:18 2017 > New

[PATCH] D34052: [XRay][clang] Support capturing the implicit `this` argument to C++ class member functions

2017-06-12 Thread David Blaikie via Phabricator via cfe-commits
dblaikie added a comment. I take it there's already handling for these attributes on non-member functions? There's probably a reason this code can't be wherever that code is & subtract one from the index? (reducing code duplication by having all the error handling, etc, in one place/once) htt