Re: [PATCH] D24113: Allow implicit conversions between incompatible pointer types in overload resolution in C.

2016-09-02 Thread George Burgess IV via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL280553: [Sema] Relax overloading restrictions in C. (authored by gbiv). Changed prior to commit: https://reviews.llvm.org/D24113?vs=69922&id=70251#toc Repository: rL LLVM https://reviews.llvm.org/D2

r280562 - [Sema] Fix how we set implicit conversion kinds.

2016-09-02 Thread George Burgess IV via cfe-commits
Author: gbiv Date: Fri Sep 2 19:28:25 2016 New Revision: 280562 URL: http://llvm.org/viewvc/llvm-project?rev=280562&view=rev Log: [Sema] Fix how we set implicit conversion kinds. We have invariants we like to guarantee for the `ImplicitConversionKind`s in a `StandardConversionSequence`. These we

Re: [PATCH] D24218: [libc++] Fix support for multibyte thousands_sep and decimal_point in moneypunct_byname

2016-09-03 Thread George Burgess IV via cfe-commits
george.burgess.iv added a subscriber: george.burgess.iv. george.burgess.iv added a comment. Just a few drive-by nits. Thanks for the patch! Comment at: src/locale.cpp:5849 @@ -5828,4 +5848,3 @@ __decimal_point_ = base::do_decimal_point(); -if (*lc->mon_thousands_sep

Re: [PATCH] D24113: Allow implicit conversions between incompatible pointer types in overload resolution in C.

2016-09-06 Thread George Burgess IV via cfe-commits
george.burgess.iv marked an inline comment as done. george.burgess.iv added a comment. Thanks for the heads-up! I'm assuming that below is an example of code that this patch broke? void foo(int *a, int) __attribute__((overloadable)); void foo(unsigned int *a, unsigned int) __attribute__((ove

Re: [PATCH] D24113: Allow implicit conversions between incompatible pointer types in overload resolution in C.

2016-09-06 Thread George Burgess IV via cfe-commits
george.burgess.iv added a comment. > Although I think that users will expect atomic_add(unsigned int *, 5) to > work.without error Totally agree; I was just making sure that I understood the problem. :) I think, with a small tweak in semantics, we can make everything work without needing to p

r280847 - [Sema] Compare bad conversions in overload resolution.

2016-09-07 Thread George Burgess IV via cfe-commits
Author: gbiv Date: Wed Sep 7 15:03:19 2016 New Revision: 280847 URL: http://llvm.org/viewvc/llvm-project?rev=280847&view=rev Log: [Sema] Compare bad conversions in overload resolution. r280553 introduced an issue where we'd emit ambiguity errors for code like: ``` void foo(int *, int); void foo

Re: [PATCH] D24113: Allow implicit conversions between incompatible pointer types in overload resolution in C.

2016-09-07 Thread George Burgess IV via cfe-commits
Fix committed as r280847 -- thanks for the reports! > It seems to me that we could handle this by ranking viable-but-ill-formed conversion sequences before non-viable ones in clang::isBetterOverloadCandidate That's what I was thinking, too. :) > Clang reports an ambiguity on line 3 TIL. Woohoo

r280852 - Move CHECK right before the function it describes.

2016-09-07 Thread George Burgess IV via cfe-commits
Author: gbiv Date: Wed Sep 7 15:15:03 2016 New Revision: 280852 URL: http://llvm.org/viewvc/llvm-project?rev=280852&view=rev Log: Move CHECK right before the function it describes. Modified: cfe/trunk/test/CodeGen/overloadable.c Modified: cfe/trunk/test/CodeGen/overloadable.c URL: http://l

r281017 - [Docs] Fix typos, remove trailing whitespace.

2016-09-08 Thread George Burgess IV via cfe-commits
Author: gbiv Date: Thu Sep 8 21:45:48 2016 New Revision: 281017 URL: http://llvm.org/viewvc/llvm-project?rev=281017&view=rev Log: [Docs] Fix typos, remove trailing whitespace. Avoided wrapping NullabilityDocs at 80cols, since that would've made this diff much bigger, and never-ending lines seems

r281277 - [Sema] Fix PR30346: relax __builtin_object_size checks.

2016-09-12 Thread George Burgess IV via cfe-commits
Author: gbiv Date: Mon Sep 12 18:50:35 2016 New Revision: 281277 URL: http://llvm.org/viewvc/llvm-project?rev=281277&view=rev Log: [Sema] Fix PR30346: relax __builtin_object_size checks. This patch makes us act more conservatively when trying to determine the objectsize for an array at the end of

Re: r281277 - [Sema] Fix PR30346: relax __builtin_object_size checks.

2016-09-13 Thread George Burgess IV via cfe-commits
n Tue, Sep 13, 2016 at 12:51 PM, Richard Smith via cfe-commits < cfe-commits@lists.llvm.org> wrote: > On Tue, Sep 13, 2016 at 10:44 AM, Joerg Sonnenberger via cfe-commits < > cfe-commits@lists.llvm.org> wrote: > >> On Mon, Sep 12, 2016 at 11:50:36PM -, George Bu

r298431 - Let llvm.objectsize be conservative with null pointers

2017-03-21 Thread George Burgess IV via cfe-commits
Author: gbiv Date: Tue Mar 21 15:09:35 2017 New Revision: 298431 URL: http://llvm.org/viewvc/llvm-project?rev=298431&view=rev Log: Let llvm.objectsize be conservative with null pointers D28494 adds another parameter to @llvm.objectsize. Clang needs to be sure to pass that third arg whenever appli

r299601 - Simplify. NFC.

2017-04-05 Thread George Burgess IV via cfe-commits
Author: gbiv Date: Wed Apr 5 19:08:35 2017 New Revision: 299601 URL: http://llvm.org/viewvc/llvm-project?rev=299601&view=rev Log: Simplify. NFC. Two simplifications: - We check `!Previous.empty()` above and only use `Previous` in const contexts after that check, so the `!Previous.empty()` chec

r299603 - [Sema] Update CheckOverload docs

2017-04-05 Thread George Burgess IV via cfe-commits
Author: gbiv Date: Wed Apr 5 19:23:31 2017 New Revision: 299603 URL: http://llvm.org/viewvc/llvm-project?rev=299603&view=rev Log: [Sema] Update CheckOverload docs - Replace documented return values (true/false) with what's actually returned - Doxygenify the comment - Reflow said comment to 80

r300283 - Fix PR31934: forming refs to functions with enable_if attrs.

2017-04-13 Thread George Burgess IV via cfe-commits
Author: gbiv Date: Thu Apr 13 18:47:08 2017 New Revision: 300283 URL: http://llvm.org/viewvc/llvm-project?rev=300283&view=rev Log: Fix PR31934: forming refs to functions with enable_if attrs. Modified: cfe/trunk/lib/Sema/SemaInit.cpp cfe/trunk/test/SemaCXX/enable_if.cpp Modified: cfe/tru

Re: r291963 - [clang] Emit `diagnose_if` warnings from system headers

2017-01-13 Thread George Burgess IV via cfe-commits
Do we want to consider merging this into the release branch? Seems like more of a bugfix than a feature to me. On Fri, Jan 13, 2017 at 2:11 PM, Eric Fiselier via cfe-commits < cfe-commits@lists.llvm.org> wrote: > Author: ericwf > Date: Fri Jan 13 16:11:40 2017 > New Revision: 291963 > > URL: http

r291997 - Fix a typo. NFC.

2017-01-13 Thread George Burgess IV via cfe-commits
Author: gbiv Date: Fri Jan 13 23:19:34 2017 New Revision: 291997 URL: http://llvm.org/viewvc/llvm-project?rev=291997&view=rev Log: Fix a typo. NFC. Modified: cfe/trunk/lib/Sema/SemaOverload.cpp Modified: cfe/trunk/lib/Sema/SemaOverload.cpp URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/

Re: [PATCH] D28889: Change where we handle arg-dependent diagnose_if attributes

2017-01-23 Thread George Burgess IV via cfe-commits
> Also, I plan to submit this (once it's LGTM'ed) to the 4.0 branch. Is that OK with you, Richard? (To be clear, I'll check with Hans before I submit this there, as well. Just trying to save a round-trip. :) ) On Mon, Jan 23, 2017 at 4:39 PM, George Burgess IV via Phabricator < revi...@reviews.ll

r293360 - Change how we handle diagnose_if attributes.

2017-01-27 Thread George Burgess IV via cfe-commits
Author: gbiv Date: Fri Jan 27 20:19:40 2017 New Revision: 293360 URL: http://llvm.org/viewvc/llvm-project?rev=293360&view=rev Log: Change how we handle diagnose_if attributes. This patch changes how we handle argument-dependent `diagnose_if` attributes. In particular, we now check them in the sam

r293369 - Attempt to unbreak buildbots.

2017-01-27 Thread George Burgess IV via cfe-commits
Author: gbiv Date: Fri Jan 27 22:16:32 2017 New Revision: 293369 URL: http://llvm.org/viewvc/llvm-project?rev=293369&view=rev Log: Attempt to unbreak buildbots. r293360 broke some ARM bots, because size_t on those targets is apparently `unsigned int`, not `unsigned long`. `sizeof(whatever)` shoul

Re: r291963 - [clang] Emit `diagnose_if` warnings from system headers

2017-01-31 Thread George Burgess IV via cfe-commits
> If not, perhaps we should disable the attribute for the Clang 4 release instead FWIW, I'd strongly prefer to do this over letting diagnose_if go into Clang 4 unpatched. So, if my patch does feel too big, I'm happy to let diagnose_if be a new-in-clang-5 attribute. :) On Tue, Jan 31, 2017 at 11:1

Re: r291963 - [clang] Emit `diagnose_if` warnings from system headers

2017-01-31 Thread George Burgess IV via cfe-commits
> IIUC the major risk is that diagnose_if itself turns out to be broken, not that we'd miscompile anything? Correct. These patches should be NFC to code that doesn't use diagnose_if. If something about that patch *had* to break existing non-diagnose_if-aware code, we're now calling Sema::CheckFun

Re: r291963 - [clang] Emit `diagnose_if` warnings from system headers

2017-02-01 Thread George Burgess IV via cfe-commits
Awesome. Thank you all! :) On Wed, Feb 1, 2017 at 9:25 AM, Hans Wennborg wrote: > Merged this (r291963) in r293783. > > And the others (r293360 + r293369) in r293784. > > Thanks, > Hans > > On Tue, Jan 31, 2017 at 7:17 PM, Richard Smith > wrote: > > I'm fine with these patches being merged. Hop

r293871 - Fix typo. NFC

2017-02-02 Thread George Burgess IV via cfe-commits
Author: gbiv Date: Thu Feb 2 01:53:55 2017 New Revision: 293871 URL: http://llvm.org/viewvc/llvm-project?rev=293871&view=rev Log: Fix typo. NFC Modified: cfe/trunk/lib/AST/ExprConstant.cpp Modified: cfe/trunk/lib/AST/ExprConstant.cpp URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/A

r294662 - Add support for armv7ve flag in clang (PR31358).

2017-02-09 Thread George Burgess IV via cfe-commits
Author: gbiv Date: Thu Feb 9 17:30:10 2017 New Revision: 294662 URL: http://llvm.org/viewvc/llvm-project?rev=294662&view=rev Log: Add support for armv7ve flag in clang (PR31358). This is a followup change to add v7ve support to clang for gcc compatibility. Please see r294661. Patch by Manoj Gup

r306467 - [Sema] Allow unmarked overloadable functions.

2017-06-27 Thread George Burgess IV via cfe-commits
Author: gbiv Date: Tue Jun 27 14:31:31 2017 New Revision: 306467 URL: http://llvm.org/viewvc/llvm-project?rev=306467&view=rev Log: [Sema] Allow unmarked overloadable functions. This patch extends the `overloadable` attribute to allow for one function with a given name to not be marked with the `o

r306899 - [Parse] Use normalized attr name for late-parsing checks.

2017-06-30 Thread George Burgess IV via cfe-commits
Author: gbiv Date: Fri Jun 30 15:33:24 2017 New Revision: 306899 URL: http://llvm.org/viewvc/llvm-project?rev=306899&view=rev Log: [Parse] Use normalized attr name for late-parsing checks. Modified: cfe/trunk/lib/Parse/ParseDecl.cpp cfe/trunk/test/Sema/diagnose_if.c Modified: cfe/trunk/l

r307995 - Add release notes for the overloadable attribute

2017-07-13 Thread George Burgess IV via cfe-commits
Author: gbiv Date: Thu Jul 13 20:23:57 2017 New Revision: 307995 URL: http://llvm.org/viewvc/llvm-project?rev=307995&view=rev Log: Add release notes for the overloadable attribute Modified: cfe/trunk/docs/ReleaseNotes.rst Modified: cfe/trunk/docs/ReleaseNotes.rst URL: http://llvm.org/viewvc

r322530 - [Sema] Fix a crash on invalid features in multiversioning

2018-01-15 Thread George Burgess IV via cfe-commits
Author: gbiv Date: Mon Jan 15 19:01:50 2018 New Revision: 322530 URL: http://llvm.org/viewvc/llvm-project?rev=322530&view=rev Log: [Sema] Fix a crash on invalid features in multiversioning We were trying to emit a diag::err_bad_multiversion_option diagnostic, which expects an int as its first arg

r322618 - [CodeGen] Fix a crash on mangling multiversioned functions

2018-01-16 Thread George Burgess IV via cfe-commits
Author: gbiv Date: Tue Jan 16 20:46:04 2018 New Revision: 322618 URL: http://llvm.org/viewvc/llvm-project?rev=322618&view=rev Log: [CodeGen] Fix a crash on mangling multiversioned functions `multiVersionSortPriority` expects features to have no prefix. We currently carry them around in the format

r294800 - Don't let EvaluationModes dictate whether an invalid base is OK

2017-02-10 Thread George Burgess IV via cfe-commits
Author: gbiv Date: Fri Feb 10 16:52:29 2017 New Revision: 294800 URL: http://llvm.org/viewvc/llvm-project?rev=294800&view=rev Log: Don't let EvaluationModes dictate whether an invalid base is OK What we want to actually control this behavior is something more local than an EvalutationMode. Please

Re: r294800 - Don't let EvaluationModes dictate whether an invalid base is OK

2017-02-10 Thread George Burgess IV via cfe-commits
Hi Hans! This fixes PR31843, which is a release blocker. Once the bots seem happy with it, can we merge this into the 4.0 branch, please? (Richard okayed this when he LGTM'ed the patch) Thanks, George On Fri, Feb 10, 2017 at 2:52 PM, George Burgess IV via cfe-commits < cfe

r295029 - Add a destruct-on-exit function to ASTContext.

2017-02-13 Thread George Burgess IV via cfe-commits
Author: gbiv Date: Mon Feb 13 23:37:36 2017 New Revision: 295029 URL: http://llvm.org/viewvc/llvm-project?rev=295029&view=rev Log: Add a destruct-on-exit function to ASTContext. It looks like the only use of AddDeallocation is to indirectly call the destructors of objects. In one case I found (Ty

r295032 - Delete useless / in comment. NFC.

2017-02-13 Thread George Burgess IV via cfe-commits
Author: gbiv Date: Mon Feb 13 23:52:57 2017 New Revision: 295032 URL: http://llvm.org/viewvc/llvm-project?rev=295032&view=rev Log: Delete useless / in comment. NFC. Modified: cfe/trunk/lib/Serialization/ASTReaderStmt.cpp Modified: cfe/trunk/lib/Serialization/ASTReaderStmt.cpp URL: http://ll

r295094 - Finish a comment + remove trailing whitespace. NFC

2017-02-14 Thread George Burgess IV via cfe-commits
Author: gbiv Date: Tue Feb 14 13:34:33 2017 New Revision: 295094 URL: http://llvm.org/viewvc/llvm-project?rev=295094&view=rev Log: Finish a comment + remove trailing whitespace. NFC Modified: cfe/trunk/include/clang/AST/DeclBase.h Modified: cfe/trunk/include/clang/AST/DeclBase.h URL: http:/

r295252 - [Modules] Consider enable_if attrs in isSameEntity.

2017-02-15 Thread George Burgess IV via cfe-commits
Author: gbiv Date: Wed Feb 15 16:43:27 2017 New Revision: 295252 URL: http://llvm.org/viewvc/llvm-project?rev=295252&view=rev Log: [Modules] Consider enable_if attrs in isSameEntity. Two functions that differ only in their enable_if attributes are considered overloads, so we should check for thos

Re: r295252 - [Modules] Consider enable_if attrs in isSameEntity.

2017-02-15 Thread George Burgess IV via cfe-commits
info, so I can't immediately see why that wouldn't work. On Wed, Feb 15, 2017 at 4:55 PM, Richard Smith wrote: > On 15 February 2017 at 14:43, George Burgess IV via cfe-commits < > cfe-commits@lists.llvm.org> wrote: > >> Author: gbiv >> Date: Wed Feb 15 16:43

r295805 - Call the correct @llvm.objectsize.

2017-02-21 Thread George Burgess IV via cfe-commits
Author: gbiv Date: Tue Feb 21 20:35:51 2017 New Revision: 295805 URL: http://llvm.org/viewvc/llvm-project?rev=295805&view=rev Log: Call the correct @llvm.objectsize. The following code would crash clang: void foo(unsigned *const __attribute__((pass_object_size(0; void bar(unsigned *i) { foo(

r295870 - [CodeGen] Note where we add ABI-specific args in ctors. NFC.

2017-02-22 Thread George Burgess IV via cfe-commits
Author: gbiv Date: Wed Feb 22 14:28:02 2017 New Revision: 295870 URL: http://llvm.org/viewvc/llvm-project?rev=295870&view=rev Log: [CodeGen] Note where we add ABI-specific args in ctors. NFC. Meta: The ultimate goal is to teach ExtParameterInfo about pass_object_size attributes. This is necessary

r295894 - [CodeGen] Add param info for ctors with ABI args.

2017-02-22 Thread George Burgess IV via cfe-commits
Author: gbiv Date: Wed Feb 22 16:38:25 2017 New Revision: 295894 URL: http://llvm.org/viewvc/llvm-project?rev=295894&view=rev Log: [CodeGen] Add param info for ctors with ABI args. This fixes a few assertion failures. Please see the added test case. Added: cfe/trunk/test/CodeGenObjCXX/arc-at

r295935 - [CodeGen] Don't reemit expressions for pass_object_size params.

2017-02-22 Thread George Burgess IV via cfe-commits
Author: gbiv Date: Wed Feb 22 23:59:56 2017 New Revision: 295935 URL: http://llvm.org/viewvc/llvm-project?rev=295935&view=rev Log: [CodeGen] Don't reemit expressions for pass_object_size params. This fixes an assertion failure in cases where we had expression statements that declared variables ne

r296024 - [CodeGen] Fix ExtParameterInfo bugs in C++ CodeGen code.

2017-02-23 Thread George Burgess IV via cfe-commits
Author: gbiv Date: Thu Feb 23 16:07:35 2017 New Revision: 296024 URL: http://llvm.org/viewvc/llvm-project?rev=296024&view=rev Log: [CodeGen] Fix ExtParameterInfo bugs in C++ CodeGen code. This patch makes use of the prefix/suffix ABI argument distinction that was introduced in r295870, so that we

r296027 - Tighten up a regex in a test

2017-02-23 Thread George Burgess IV via cfe-commits
Author: gbiv Date: Thu Feb 23 16:14:55 2017 New Revision: 296027 URL: http://llvm.org/viewvc/llvm-project?rev=296027&view=rev Log: Tighten up a regex in a test ...If we're trying to match "this function has only two arguments", `.*` probably isn't the best thing to use. :) Modified: cfe/trun

Re: r296034 - [CodeGen] Silence unused variable warning in Release builds.

2017-02-23 Thread George Burgess IV via cfe-commits
Thanks for catching this! :) On Thu, Feb 23, 2017 at 2:47 PM, Benjamin Kramer via cfe-commits < cfe-commits@lists.llvm.org> wrote: > Author: d0k > Date: Thu Feb 23 16:47:56 2017 > New Revision: 296034 > > URL: http://llvm.org/viewvc/llvm-project?rev=296034&view=rev > Log: > [CodeGen] Silence unus

r296076 - Represent pass_object_size attrs in ExtParameterInfo

2017-02-23 Thread George Burgess IV via cfe-commits
Author: gbiv Date: Thu Feb 23 20:49:47 2017 New Revision: 296076 URL: http://llvm.org/viewvc/llvm-project?rev=296076&view=rev Log: Represent pass_object_size attrs in ExtParameterInfo The goal of this is to fix a bug in modules where we'd merge FunctionDecls that differed in their pass_object_siz

Re: r295252 - [Modules] Consider enable_if attrs in isSameEntity.

2017-02-23 Thread George Burgess IV via cfe-commits
for function parameters may require us to have already merged the > function itself into its redeclaration chain (we don't currently model that > quite correctly, so we probably won't hit it today). > > >> On Wed, Feb 15, 2017 at 4:55 PM, Richard Smith >> wrote: >

r287154 - Use the member function location in enable_if diagnostics.

2016-11-16 Thread George Burgess IV via cfe-commits
Author: gbiv Date: Wed Nov 16 15:31:25 2016 New Revision: 287154 URL: http://llvm.org/viewvc/llvm-project?rev=287154&view=rev Log: Use the member function location in enable_if diagnostics. Before: :3:3: error: no matching member function for call to 'bar' Foo().bar(); ^ After: :3:9: error:

r287187 - [Sema] Fix a bug in enable_if condition instantiation.

2016-11-16 Thread George Burgess IV via cfe-commits
Author: gbiv Date: Wed Nov 16 19:33:54 2016 New Revision: 287187 URL: http://llvm.org/viewvc/llvm-project?rev=287187&view=rev Log: [Sema] Fix a bug in enable_if condition instantiation. During template instantiation, we currently fall back to just calling Sema::SubstExpr for enable_if attributes

r288297 - [TableGen] Minor clean-ups. NFC.

2016-11-30 Thread George Burgess IV via cfe-commits
Author: gbiv Date: Wed Nov 30 18:13:18 2016 New Revision: 288297 URL: http://llvm.org/viewvc/llvm-project?rev=288297&view=rev Log: [TableGen] Minor clean-ups. NFC. Primarily: try to use DenseSet instead of std::set, and use pretty range algos where we can. Small sizes were arbitrarily chosen. M

r288388 - [TableGen] Ignore fake args for parsing-related arg counts.

2016-12-01 Thread George Burgess IV via cfe-commits
Author: gbiv Date: Thu Dec 1 11:52:39 2016 New Revision: 288388 URL: http://llvm.org/viewvc/llvm-project?rev=288388&view=rev Log: [TableGen] Ignore fake args for parsing-related arg counts. We should complain about the following: ``` void foo() __attribute__((unavailable("a", "b"))); ``` Inste

r288414 - Add a space in a run line. NFC.

2016-12-01 Thread George Burgess IV via cfe-commits
Author: gbiv Date: Thu Dec 1 14:16:56 2016 New Revision: 288414 URL: http://llvm.org/viewvc/llvm-project?rev=288414&view=rev Log: Add a space in a run line. NFC. Modified: cfe/trunk/test/CodeGenCXX/enable_if.cpp Modified: cfe/trunk/test/CodeGenCXX/enable_if.cpp URL: http://llvm.org/viewvc/

r288534 - [Sema] Reset a BumpPtrAllocator on clear(). NFC.

2016-12-02 Thread George Burgess IV via cfe-commits
Author: gbiv Date: Fri Dec 2 15:00:12 2016 New Revision: 288534 URL: http://llvm.org/viewvc/llvm-project?rev=288534&view=rev Log: [Sema] Reset a BumpPtrAllocator on clear(). NFC. Looks like the reset() call was omitted by accident. Modified: cfe/trunk/lib/Sema/SemaOverload.cpp Modified: cf

r289571 - [Sema] Prefer SmallVector over `new`ed memory blocks. NFC.

2016-12-13 Thread George Burgess IV via cfe-commits
Author: gbiv Date: Tue Dec 13 13:22:56 2016 New Revision: 289571 URL: http://llvm.org/viewvc/llvm-project?rev=289571&view=rev Log: [Sema] Prefer SmallVector over `new`ed memory blocks. NFC. Modified: cfe/trunk/lib/Sema/SemaOverload.cpp Modified: cfe/trunk/lib/Sema/SemaOverload.cpp URL: http

r301486 - Fix comment. NFC

2017-04-26 Thread George Burgess IV via cfe-commits
Author: gbiv Date: Wed Apr 26 17:37:38 2017 New Revision: 301486 URL: http://llvm.org/viewvc/llvm-project?rev=301486&view=rev Log: Fix comment. NFC Modified: cfe/trunk/lib/Sema/SemaExpr.cpp Modified: cfe/trunk/lib/Sema/SemaExpr.cpp URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema

r301601 - Use a consistent style. NFC

2017-04-27 Thread George Burgess IV via cfe-commits
Author: gbiv Date: Thu Apr 27 18:59:45 2017 New Revision: 301601 URL: http://llvm.org/viewvc/llvm-project?rev=301601&view=rev Log: Use a consistent style. NFC Modified: cfe/trunk/lib/Sema/SemaExpr.cpp Modified: cfe/trunk/lib/Sema/SemaExpr.cpp URL: http://llvm.org/viewvc/llvm-project/cfe/tru

r301970 - [Sema] Update function doc; NFC

2017-05-02 Thread George Burgess IV via cfe-commits
Author: gbiv Date: Tue May 2 15:24:56 2017 New Revision: 301970 URL: http://llvm.org/viewvc/llvm-project?rev=301970&view=rev Log: [Sema] Update function doc; NFC Modified: cfe/trunk/lib/Sema/SemaExpr.cpp Modified: cfe/trunk/lib/Sema/SemaExpr.cpp URL: http://llvm.org/viewvc/llvm-project/cfe

r302506 - [Sema] Make typeof(OverloadedFunctionName) not a pointer.

2017-05-08 Thread George Burgess IV via cfe-commits
Author: gbiv Date: Mon May 8 23:06:24 2017 New Revision: 302506 URL: http://llvm.org/viewvc/llvm-project?rev=302506&view=rev Log: [Sema] Make typeof(OverloadedFunctionName) not a pointer. We were sometimes doing a function->pointer conversion in Sema::CheckPlaceholderExpr, which isn't the job of

r285458 - Make a function static. NFC.

2016-10-28 Thread George Burgess IV via cfe-commits
Author: gbiv Date: Fri Oct 28 16:42:06 2016 New Revision: 285458 URL: http://llvm.org/viewvc/llvm-project?rev=285458&view=rev Log: Make a function static. NFC. Modified: cfe/trunk/lib/Sema/SemaOverload.cpp Modified: cfe/trunk/lib/Sema/SemaOverload.cpp URL: http://llvm.org/viewvc/llvm-projec

[PATCH] D14274: Add alloc_size attribute to clang

2016-11-02 Thread George Burgess IV via cfe-commits
george.burgess.iv added a comment. With any luck, this'll be on the top of my to-do list next week. :) https://reviews.llvm.org/D14274 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

r285873 - [CodeGen] Use StringRef. NFC.

2016-11-02 Thread George Burgess IV via cfe-commits
Author: gbiv Date: Wed Nov 2 21:21:43 2016 New Revision: 285873 URL: http://llvm.org/viewvc/llvm-project?rev=285873&view=rev Log: [CodeGen] Use StringRef. NFC. Looks like CurFn's name outlives FunctionName, so we can just pass StringRefs around rather than going from a StringRef to a std::string

r286201 - Make a const variable static. NFC.

2016-11-07 Thread George Burgess IV via cfe-commits
Author: gbiv Date: Mon Nov 7 21:30:49 2016 New Revision: 286201 URL: http://llvm.org/viewvc/llvm-project?rev=286201&view=rev Log: Make a const variable static. NFC. Modified: cfe/trunk/lib/CodeGen/CGBlocks.cpp Modified: cfe/trunk/lib/CodeGen/CGBlocks.cpp URL: http://llvm.org/viewvc/llvm-pr

[PATCH] D14274: Add alloc_size attribute to clang

2016-11-08 Thread George Burgess IV via cfe-commits
george.burgess.iv updated this revision to Diff 77222. george.burgess.iv added a comment. Rebased and made the `__builtin_object_size` code a tiny bit cleaner. The blocks bugfix I mentioned will be up as a separate review in a few minutes. :) https://reviews.llvm.org/D14274 Files: include/c

[PATCH] D26410: [CodeGen] Don't emit the same global block multiple times.

2016-11-08 Thread George Burgess IV via cfe-commits
george.burgess.iv created this revision. george.burgess.iv added a reviewer: rjmccall. george.burgess.iv added a subscriber: cfe-commits. https://reviews.llvm.org/D14274 makes our constexpr evaluator more aggressive with some variables marked `const`. This changes how we behave on code like the

r286500 - Clean up uses of unique_ptr for RAII objects. NFC.

2016-11-10 Thread George Burgess IV via cfe-commits
Author: gbiv Date: Thu Nov 10 14:43:52 2016 New Revision: 286500 URL: http://llvm.org/viewvc/llvm-project?rev=286500&view=rev Log: Clean up uses of unique_ptr for RAII objects. NFC. - EnterExpressionEvaluationContext allows you to specify whether you *actually* want to enter an evaluation conte

r286506 - [Sema] Range-ify for loop, add period to comment. NFC.

2016-11-10 Thread George Burgess IV via cfe-commits
Author: gbiv Date: Thu Nov 10 15:47:12 2016 New Revision: 286506 URL: http://llvm.org/viewvc/llvm-project?rev=286506&view=rev Log: [Sema] Range-ify for loop, add period to comment. NFC. Modified: cfe/trunk/lib/Sema/SemaDeclAttr.cpp cfe/trunk/lib/Sema/SemaOverload.cpp Modified: cfe/trunk/

[PATCH] D26410: [CodeGen] Don't emit the same global block multiple times.

2016-11-11 Thread George Burgess IV via cfe-commits
george.burgess.iv updated this revision to Diff 77669. george.burgess.iv marked an inline comment as done. george.burgess.iv added a comment. Thanks for the review! I'll submit this with https://reviews.llvm.org/D14274. :) https://reviews.llvm.org/D26410 Files: lib/CodeGen/CGBlocks.cpp lib

Re: r246877 - Increase accuracy of __builtin_object_size.

2015-09-11 Thread George Burgess IV via cfe-commits
e complete object, and > 2) the designator refers to the final subobject of the currently-known > complete object, and > 3) that subobject is either a flexible array member or an array of bound 0 > or 1. > > Then we'd leave it to IR generation to do the llvm.object.size(

[PATCH] D12821: Allow for C's "writing off the end" idiom in __builtin_object_size

2015-09-11 Thread George Burgess IV via cfe-commits
george.burgess.iv created this revision. george.burgess.iv added a reviewer: rsmith. george.burgess.iv added subscribers: cfe-commits, mzolotukhin. In C, a common idiom is: ``` struct Foo { int a; char cs[1] }; struct Foo *F = (struct Foo *)malloc(sizeof(Foo) + strlen(SomeString)); strcpy(F->cs,

Re: r246877 - Increase accuracy of __builtin_object_size.

2015-09-11 Thread George Burgess IV via cfe-commits
of the complete object, and >> 2) the designator refers to the final subobject of the currently-known >> complete object, and >> 3) that subobject is either a flexible array member or an array of bound >> 0 or 1. >> >> Then we'd leave it to IR genera

Re: [PATCH] D12821: Allow for C's "writing off the end" idiom in __builtin_object_size

2015-09-14 Thread George Burgess IV via cfe-commits
george.burgess.iv updated this revision to Diff 34710. george.burgess.iv marked 4 inline comments as done. george.burgess.iv added a comment. Addressed all feedback -- added a walk of the Designator as suggested. Regarding `isDesignatorAtObjectEnd`: I'm assuming that the Index returned by `Field

Re: [PATCH] D12821: Allow for C's "writing off the end" idiom in __builtin_object_size

2015-09-14 Thread George Burgess IV via cfe-commits
george.burgess.iv added inline comments. Comment at: lib/AST/ExprConstant.cpp:4457-4460 @@ -4434,1 +4456,6 @@ +// Because we set the Base to be the MemberExpr instead of E->getBase(), the +// Offset should be from the MemberExpr instead of the MemberExpr's base. +if

Re: [PATCH] D12821: Allow for C's "writing off the end" idiom in __builtin_object_size

2015-09-24 Thread George Burgess IV via cfe-commits
george.burgess.iv added a comment. Friendly ping :) http://reviews.llvm.org/D12821 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D13157: Teach -Wtautological-overlap-compare about enums

2015-09-24 Thread George Burgess IV via cfe-commits
george.burgess.iv created this revision. george.burgess.iv added a reviewer: rtrieu. george.burgess.iv added a subscriber: cfe-commits. Currently, -Wtautological-overlap-compare only emits warnings if the comparisons are between integer literals and variables. This patch adds support for compari

r248595 - Make incomplete type errors better with enable_if

2015-09-25 Thread George Burgess IV via cfe-commits
Author: gbiv Date: Fri Sep 25 12:53:16 2015 New Revision: 248595 URL: http://llvm.org/viewvc/llvm-project?rev=248595&view=rev Log: Make incomplete type errors better with enable_if This patch fixes the order in which we evaluate the different ways that a function call could be disallowed. Now, if

Re: [PATCH] D13157: Teach -Wtautological-overlap-compare about enums

2015-09-25 Thread George Burgess IV via cfe-commits
george.burgess.iv updated this revision to Diff 35744. george.burgess.iv marked an inline comment as done. george.burgess.iv added a comment. Addressed all feedback http://reviews.llvm.org/D13157 Files: lib/Analysis/CFG.cpp test/Sema/warn-overlap.c Index: test/Sema/warn-overlap.c =

Re: [PATCH] D13157: Teach -Wtautological-overlap-compare about enums

2015-09-25 Thread George Burgess IV via cfe-commits
george.burgess.iv added inline comments. Comment at: lib/Analysis/CFG.cpp:54 @@ +53,3 @@ +auto *DR = dyn_cast(E->IgnoreParenImpCasts()); +if (DR == nullptr) + return nullptr; aaron.ballman wrote: > Please don't compare a pointer against nullptr with a

[PATCH] D13263: Addition of __attribute__((pass_object_size)) to Clang

2015-09-29 Thread George Burgess IV via cfe-commits
george.burgess.iv created this revision. george.burgess.iv added a reviewer: rsmith. george.burgess.iv added subscribers: cfe-commits, rsmith. This was a fun patch :) This patch adds the parameter attribute `pass_object_size` to Clang. The design doc for this attribute is available here: https:

r249053 - Teach -Wtautological-overlap-compare about enums

2015-10-01 Thread George Burgess IV via cfe-commits
Author: gbiv Date: Thu Oct 1 13:47:52 2015 New Revision: 249053 URL: http://llvm.org/viewvc/llvm-project?rev=249053&view=rev Log: Teach -Wtautological-overlap-compare about enums Prior to this patch, -Wtautological-overlap-compare would only warn us if there was a sketchy logical comparison betw

Re: [PATCH] D13157: Teach -Wtautological-overlap-compare about enums

2015-10-01 Thread George Burgess IV via cfe-commits
george.burgess.iv closed this revision. george.burgess.iv marked 4 inline comments as done. george.burgess.iv added a comment. Changed code to address all feedback + committed as r249053. Thanks for the reviews! Comment at: lib/Analysis/CFG.cpp:49 @@ +48,3 @@ +tryNormalizeBinar

Re: [PATCH] D13157: Teach -Wtautological-overlap-compare about enums

2015-10-01 Thread George Burgess IV via cfe-commits
> Next time, add Differential Revision: to your commit and Phabricator will close the diff automatically. Ooh, shiny. Thanks for letting me know! > Doubling the expense for assert builds so that we get a slightly better stack trace in the event our assumptions are wrong doesn't seem like a good

[PATCH] D12000: Bugfix - Clang handles __builtin_object_size in wrong way

2015-08-12 Thread George Burgess IV via cfe-commits
george.burgess.iv created this revision. george.burgess.iv added a subscriber: cfe-commits. Attached is a fix for https://llvm.org/bugs/show_bug.cgi?id=15212 . Summary: Tighten up some of the results for __builtin_object_size(ptr, type) when given type == 1 or type == 3 + fixed a bug where we wo

Re: [PATCH] D12000: Bugfix - Clang handles __builtin_object_size in wrong way

2015-08-17 Thread George Burgess IV via cfe-commits
george.burgess.iv updated the summary for this revision. george.burgess.iv updated this revision to Diff 32333. george.burgess.iv marked an inline comment as done. george.burgess.iv added a comment. Addressed feedback. http://reviews.llvm.org/D12000 Files: lib/AST/ExprConstant.cpp test/Code

Re: [PATCH] D12000: Bugfix - Clang handles __builtin_object_size in wrong way

2015-08-17 Thread George Burgess IV via cfe-commits
george.burgess.iv added inline comments. Comment at: lib/AST/ExprConstant.cpp:6221-6223 @@ +6220,5 @@ + // + // extern struct X { char buff[32]; int a, b, c; } *p; + // int a = __builtin_object_size(p->buff + 4, 3); // returns 28 + // int b = __builtin_object_size(p->buf

r245323 - Make __builtin_object_size always answer correctly

2015-08-18 Thread George Burgess IV via cfe-commits
Author: gbiv Date: Tue Aug 18 13:18:27 2015 New Revision: 245323 URL: http://llvm.org/viewvc/llvm-project?rev=245323&view=rev Log: Make __builtin_object_size always answer correctly __builtin_object_size would return incorrect answers for many uses where type=3. This fixes the inaccuracy by makin

Re: [PATCH] D12000: Bugfix - Clang handles __builtin_object_size in wrong way

2015-08-18 Thread George Burgess IV via cfe-commits
george.burgess.iv closed this revision. george.burgess.iv added a comment. r245323 http://reviews.llvm.org/D12000 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

r245403 - Make __builtin_object_size always answer correctly

2015-08-18 Thread George Burgess IV via cfe-commits
Author: gbiv Date: Tue Aug 18 21:19:07 2015 New Revision: 245403 URL: http://llvm.org/viewvc/llvm-project?rev=245403&view=rev Log: Make __builtin_object_size always answer correctly __builtin_object_size would return incorrect answers for many uses where type=3. This fixes the inaccuracy by makin

[PATCH] D12169: Relax constexpr rules to improve __builtin_object_size's accuracy

2015-08-19 Thread George Burgess IV via cfe-commits
george.burgess.iv created this revision. george.burgess.iv added a reviewer: rsmith. george.burgess.iv added a subscriber: cfe-commits. (Hoping the formatting works as one would expect) Motivating examples: Pre-patch: ``` __builtin_object_size((char*)&foo, 0) != __builtin_object_size(&foo, 0) //

Re: [PATCH] D12169: Relax constexpr rules to improve __builtin_object_size's accuracy

2015-08-19 Thread George Burgess IV via cfe-commits
george.burgess.iv updated this revision to Diff 32662. george.burgess.iv added a comment. Removed advanced debugging tools (iostream) http://reviews.llvm.org/D12169 Files: lib/AST/ExprConstant.cpp test/CXX/expr/expr.const/p2-0x.cpp test/CodeGen/object-size.c Index: test/CodeGen/object-si

Re: [PATCH] D12169: Relax constexpr rules to improve __builtin_object_size's accuracy

2015-08-19 Thread George Burgess IV via cfe-commits
george.burgess.iv added inline comments. Comment at: lib/AST/ExprConstant.cpp:51 @@ -50,1 +50,3 @@ +#include + vsk wrote: > Do you need ? Artifact of print debugging. Thanks for catching that :) http://reviews.llvm.org/D12169 __

Re: [PATCH] D12169: Relax constexpr rules to improve __builtin_object_size's accuracy

2015-08-20 Thread George Burgess IV via cfe-commits
george.burgess.iv added inline comments. Comment at: lib/AST/ExprConstant.cpp:4763 @@ +4762,3 @@ + /// arithmetic. + bool UseStrictCastingRules; + rsmith wrote: > This should be handled as an `EvaluationMode`. Works for me. Comment at: lib/AST/

Re: [PATCH] D12169: Relax constexpr rules to improve __builtin_object_size's accuracy

2015-08-24 Thread George Burgess IV via cfe-commits
george.burgess.iv updated this revision to Diff 32985. george.burgess.iv added a comment. Mostly redid the patch; removed OutermostExprEvaluator, moved evaluation intent into `EvaluationMode`, made it so the more interesting rulebreaking that `__builtin_object_size` allows is only allowed when e

Re: [PATCH] D12169: Relax constexpr rules to improve __builtin_object_size's accuracy

2015-08-25 Thread George Burgess IV via cfe-commits
george.burgess.iv updated this revision to Diff 33104. george.burgess.iv added a comment. Talked with Richard, and we both agree that adding 4 EvaluationModes is too much for the use case. So, we decided to add a flag to LValue to denote that the LValueBase is invalid. This allows us to get by w

[PATCH] D12352: Clang part -- Changing @llvm.objectsize(i8*, i1) to @llvm.objectsize(i8*, i8)

2015-08-25 Thread George Burgess IV via cfe-commits
george.burgess.iv created this revision. george.burgess.iv added a reviewer: rsmith. george.burgess.iv added a subscriber: cfe-commits. Modify clang to emit `@llvm.objectsize(i8*, i8)` instead of `@llvm.objectsize(i8*, i1)` Accompanying LLVM patch: http://reviews.llvm.org/D12351 http://reviews.

Re: [PATCH] D12169: Relax constexpr rules to improve __builtin_object_size's accuracy

2015-09-02 Thread George Burgess IV via cfe-commits
george.burgess.iv updated this revision to Diff 33875. george.burgess.iv marked 16 inline comments as done. george.burgess.iv added a comment. Addressed all feedback; backed out support for more questionable features (negative indices, non-object-boundary offsets, etc), added logic to ignore poi

r246877 - Increase accuracy of __builtin_object_size.

2015-09-04 Thread George Burgess IV via cfe-commits
Author: gbiv Date: Fri Sep 4 16:28:13 2015 New Revision: 246877 URL: http://llvm.org/viewvc/llvm-project?rev=246877&view=rev Log: Increase accuracy of __builtin_object_size. Improvements: - For all types, we would give up in a case such as: __builtin_object_size((char*)&foo, N); even if w

Re: [PATCH] D12169: Relax constexpr rules to improve __builtin_object_size's accuracy

2015-09-04 Thread George Burgess IV via cfe-commits
george.burgess.iv closed this revision. george.burgess.iv marked 2 inline comments as done. george.burgess.iv added a comment. r246877. Thanks for the review! (Also: Forgot to submit comments with the most recent revision, so you're getting them all now. Sorry. :) ) Comment at

r246890 - Fix a bug in __builtin_object_size cast removal

2015-09-04 Thread George Burgess IV via cfe-commits
Author: gbiv Date: Fri Sep 4 17:36:18 2015 New Revision: 246890 URL: http://llvm.org/viewvc/llvm-project?rev=246890&view=rev Log: Fix a bug in __builtin_object_size cast removal Apparently there are many cast kinds that may cause implicit pointer arithmetic to happen. In light of this, the cast

Re: [PATCH] D12821: Allow for C's "writing off the end" idiom in __builtin_object_size

2015-10-08 Thread George Burgess IV via cfe-commits
george.burgess.iv added a comment. Friendly Ping™ http://reviews.llvm.org/D12821 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: [PATCH] D12821: Allow for C's "writing off the end" idiom in __builtin_object_size

2015-10-09 Thread George Burgess IV via cfe-commits
george.burgess.iv updated this revision to Diff 36972. george.burgess.iv marked 4 inline comments as done. george.burgess.iv added a comment. Addressed all feedback. Also, updated object-size tests to use CHECK-LABEL instead of CHECK, because yay I’m learning how to do things properly. http://

Re: [PATCH] D12821: Allow for C's "writing off the end" idiom in __builtin_object_size

2015-10-09 Thread George Burgess IV via cfe-commits
george.burgess.iv added inline comments. Comment at: lib/AST/ExprConstant.cpp:6331-6333 @@ +6330,5 @@ + BaseType = CAT->getElementType(); +} else if (BaseType->isAnyComplexType()) { + auto *CT = BaseType->castAs(); + BaseType = CT->getElementType(); +} else

<    1   2   3   4   >