[PATCH] D20130: Fix enable_if evaluation in value-dependent contexts.

2016-05-10 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. This patch is meant to be applied instead of D18425, but is a new review because we're taking an entirely different approach. This patch makes us fail

r269005 - [Sema] Fix an overload resolution bug with enable_if.

2016-05-09 Thread George Burgess IV via cfe-commits
Author: gbiv Date: Mon May 9 20:59:34 2016 New Revision: 269005 URL: http://llvm.org/viewvc/llvm-project?rev=269005=rev Log: [Sema] Fix an overload resolution bug with enable_if. Currently, if clang::isBetterOverloadCandidate encounters an enable_if attribute on either candidate that it's

Re: [PATCH] D17462: Fix a codegen bug for variadic functions with pass_object_size params

2016-05-04 Thread George Burgess IV via cfe-commits
george.burgess.iv added a comment. Ping :) http://reviews.llvm.org/D17462 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: r268113 - [Sema] Specify the underlying type for an enum. NFC.

2016-04-29 Thread George Burgess IV via cfe-commits
good to know. That sort of information would be useful in the > commit message (in case we ever do code archaeology for some reason). > Thank you for the explanation! > > ~Aaron > > > > > On Fri, Apr 29, 2016 at 2:43 PM, Aaron Ballman <aa...@aaronballman.com> > &g

Re: r268113 - [Sema] Specify the underlying type for an enum. NFC.

2016-04-29 Thread George Burgess IV via cfe-commits
Right under the enum is an 11x11 static array of PromotedType. This change makes that array size go from 484 bytes to 121. On Fri, Apr 29, 2016 at 2:43 PM, Aaron Ballman <aa...@aaronballman.com> wrote: > On Fri, Apr 29, 2016 at 5:32 PM, George Burgess IV via cfe-commits >

r268113 - [Sema] Specify the underlying type for an enum. NFC.

2016-04-29 Thread George Burgess IV via cfe-commits
Author: gbiv Date: Fri Apr 29 16:32:53 2016 New Revision: 268113 URL: http://llvm.org/viewvc/llvm-project?rev=268113=rev Log: [Sema] Specify the underlying type for an enum. NFC. Modified: cfe/trunk/lib/Sema/SemaOverload.cpp Modified: cfe/trunk/lib/Sema/SemaOverload.cpp URL:

Re: [PATCH] D14274: Add alloc_size attribute to clang

2016-04-28 Thread George Burgess IV via cfe-commits
george.burgess.iv added inline comments. Comment at: include/clang/Basic/Attr.td:753 @@ +752,3 @@ + let Args = [IntArgument<"ElemSizeParam">, IntArgument<"NumElemsParam", 1>]; + let TemplateDependent = 1; + let Documentation = [AllocSizeDocs]; aaron.ballman

Re: [PATCH] D14274: Add alloc_size attribute to clang

2016-04-28 Thread George Burgess IV via cfe-commits
george.burgess.iv updated this revision to Diff 55478. george.burgess.iv marked 2 inline comments as done. george.burgess.iv added a comment. Addressed all feedback http://reviews.llvm.org/D14274 Files: include/clang/Basic/Attr.td include/clang/Basic/AttrDocs.td

Re: [PATCH] D16298: Improve test coverage of -Wdouble-promotion

2016-04-28 Thread George Burgess IV via cfe-commits
george.burgess.iv added a subscriber: george.burgess.iv. george.burgess.iv accepted this revision. george.burgess.iv added a reviewer: george.burgess.iv. george.burgess.iv added a comment. This revision is now accepted and ready to land. Hey -- I'm really sorry about the latency on this; I

Re: r267447 - [Docs] Clarify what the object-size sanitizer does.

2016-04-25 Thread George Burgess IV via cfe-commits
dir/clang-sphinx-docs/llvm/src/tools/clang/docs/UndefinedBehaviorSanitizer.rst:96: > WARNING: Bullet list ends without a blank line; unexpected unindent. > > > On Mon, Apr 25, 2016 at 3:21 PM, George Burgess IV via cfe-commits < > cfe-commits@lists.llvm.org> wrote: > >

r267447 - [Docs] Clarify what the object-size sanitizer does.

2016-04-25 Thread George Burgess IV via cfe-commits
Author: gbiv Date: Mon Apr 25 14:21:45 2016 New Revision: 267447 URL: http://llvm.org/viewvc/llvm-project?rev=267447=rev Log: [Docs] Clarify what the object-size sanitizer does. Currently, the UBSan docs make it sound like the object-size sanitizer will only detect out-of-bounds reads/writes. It

Re: [PATCH] D18540: [Sema] Note when we've actually encountered a failure in ExprConstant, and take that into account when looking up objects.

2016-04-22 Thread George Burgess IV via cfe-commits
george.burgess.iv added a comment. Ping :) http://reviews.llvm.org/D18540 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: [PATCH] D14274: Add alloc_size attribute to clang

2016-04-13 Thread George Burgess IV via cfe-commits
george.burgess.iv updated this revision to Diff 53611. george.burgess.iv added a comment. Now that `allocsize` is in LLVM (r266032), this isn't blocked. Yay! Rebased, added a few tests, did a few tiny refactors, and fixed an overflow bug when the user tried to allocate `2**63 < N < 2**64` bytes

Re: [PATCH] D18540: [Sema] Note when we've actually encountered a failure in ExprConstant, and take that into account when looking up objects.

2016-04-06 Thread George Burgess IV via cfe-commits
george.burgess.iv added inline comments. Comment at: lib/AST/ExprConstant.cpp:853-854 @@ -825,5 +852,4 @@ Info.EvalStatus.Diag = NewDiag; // If we're speculatively evaluating, we may have skipped over some // evaluations and missed out a side effect. }

Re: [PATCH] D18540: [Sema] Note when we've actually encountered a failure in ExprConstant, and take that into account when looking up objects.

2016-04-06 Thread George Burgess IV via cfe-commits
george.burgess.iv updated this revision to Diff 52834. george.burgess.iv marked 7 inline comments as done. george.burgess.iv added a comment. Addressed feedback http://reviews.llvm.org/D18540 Files: lib/AST/ExprConstant.cpp test/SemaCXX/builtin-object-size-cxx14.cpp

Re: [PATCH] D18765: [clang-tidy] Don't complain about const pass_object_size params in declarations

2016-04-05 Thread George Burgess IV via cfe-commits
george.burgess.iv abandoned this revision. george.burgess.iv added a comment. > There's a principal difference between top-level const on parameters in > definitions and in declarations: in definitions const has an effect, as it > makes the variable constant, but in declarations it has

Re: [PATCH] D18425: [Sema] Make enable_if act correctly with value dependent conditions/arguments

2016-04-04 Thread George Burgess IV via cfe-commits
george.burgess.iv added inline comments. Comment at: lib/Sema/SemaExpr.cpp:5047-5098 @@ -5046,57 +5046,54 @@ +CallExpr *Sema::buildDependentCallExpr(Expr *ExecConfig, Expr *Fn, + MultiExprArg ArgExprs, +

Re: [PATCH] D18425: [Sema] Make enable_if act correctly with value dependent conditions/arguments

2016-04-04 Thread George Burgess IV via cfe-commits
george.burgess.iv updated this revision to Diff 52619. george.burgess.iv marked 4 inline comments as done. george.burgess.iv added a comment. Addressed most feedback; see comments. :) http://reviews.llvm.org/D18425 Files: include/clang/Sema/Sema.h lib/Sema/SemaExpr.cpp

r265341 - [Sema] Delete FIXME that has been fixed. NFC.

2016-04-04 Thread George Burgess IV via cfe-commits
Author: gbiv Date: Mon Apr 4 14:44:16 2016 New Revision: 265341 URL: http://llvm.org/viewvc/llvm-project?rev=265341=rev Log: [Sema] Delete FIXME that has been fixed. NFC. Modified: cfe/trunk/lib/Sema/SemaExpr.cpp Modified: cfe/trunk/lib/Sema/SemaExpr.cpp URL:

[PATCH] D18765: [clang-tidy] Don't complain about const pass_object_size params in declarations

2016-04-04 Thread George Burgess IV via cfe-commits
george.burgess.iv created this revision. george.burgess.iv added a reviewer: alexfh. george.burgess.iv added a subscriber: cfe-commits. This patch seems trivial, but I've never touched clang-tidy before, so I'm just making sure I didn't miss something obvious. :) -- Clang has a parameter

Re: [PATCH] D18425: [Sema] Make enable_if act correctly with value dependent conditions/arguments

2016-04-04 Thread George Burgess IV via cfe-commits
george.burgess.iv added a comment. Ping ;) http://reviews.llvm.org/D18425 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: [PATCH] D18540: [Sema] Note when we've actually encountered a failure in ExprConstant, and take that into account when looking up objects.

2016-04-04 Thread George Burgess IV via cfe-commits
george.burgess.iv added a comment. Ping :) http://reviews.llvm.org/D18540 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: [PATCH] D18540: [Sema] Note when we've actually encountered a failure in ExprConstant, and take that into account when looking up objects.

2016-03-30 Thread George Burgess IV via cfe-commits
george.burgess.iv added inline comments. Comment at: include/clang/AST/Expr.h:541-546 @@ -540,1 +540,8 @@ +/// \brief Whether the evaluation was unable to reduce a construct to a +/// value. +/// +/// For example, in foo(bar, baz, qux), if evaluating bar fails,

Re: [PATCH] D18540: [Sema] Note when we've actually encountered a failure in ExprConstant, and take that into account when looking up objects.

2016-03-30 Thread George Burgess IV via cfe-commits
george.burgess.iv updated this revision to Diff 52167. george.burgess.iv marked an inline comment as done. george.burgess.iv added a comment. Addressed all feedback. http://reviews.llvm.org/D18540 Files: lib/AST/ExprConstant.cpp test/SemaCXX/builtin-object-size-cxx14.cpp

r264975 - [Sema] Fix PR27122: ICE with enable_if+ill-formed call.

2016-03-30 Thread George Burgess IV via cfe-commits
Author: gbiv Date: Wed Mar 30 19:16:25 2016 New Revision: 264975 URL: http://llvm.org/viewvc/llvm-project?rev=264975=rev Log: [Sema] Fix PR27122: ICE with enable_if+ill-formed call. In some cases, when we encounter a direct function call with an incorrect number of arguments, we'll emit a

Re: [PATCH] D18540: [Sema] Note when we've actually encountered a failure in ExprConstant, and take that into account when looking up objects.

2016-03-28 Thread George Burgess IV via cfe-commits
george.burgess.iv added inline comments. Comment at: test/SemaCXX/constant-expression-cxx1y.cpp:182 @@ -181,4 +181,3 @@ - // FIXME: We should be able to reject this before it's called - constexpr void f() { + constexpr void f() { // expected-error{{constexpr function never

[PATCH] D18540: [Sema] Note when we've actually encountered a failure in ExprConstant, and take that into account when looking up objects.

2016-03-28 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. This patch aims to fix a bug encountered by compiling code with C++14. Specifically, when evaluating `p` in `__builtin_object_size(p, n)`, we start

[PATCH] D18425: [Sema] Make enable_if act correctly with value dependent conditions/arguments

2016-03-23 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. Test case: ``` int foo(int A) __attribute__((enable_if(A == 0, ""))); template int bar() { return foo(A); } int G = bar<1>(); // calls foo(1), which should be

Re: [PATCH] D13704: [Fix] Allow implicit conversions of the address of overloadable functions in C + docs update

2016-03-22 Thread George Burgess IV via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL264132: [Sema] Allow implicit conversions of _fn in C. (authored by gbiv). Changed prior to commit: http://reviews.llvm.org/D13704?vs=49333=51378#toc Repository: rL LLVM

r264132 - [Sema] Allow implicit conversions of _fn in C.

2016-03-22 Thread George Burgess IV via cfe-commits
Author: gbiv Date: Tue Mar 22 21:33:58 2016 New Revision: 264132 URL: http://llvm.org/viewvc/llvm-project?rev=264132=rev Log: [Sema] Allow implicit conversions of _fn in C. Also includes a minor ``enable_if`` docs update. Currently, our address-of overload machinery will only allow implicit

Re: [PATCH] D13704: [Fix] Allow implicit conversions of the address of overloadable functions in C + docs update

2016-03-22 Thread George Burgess IV via cfe-commits
george.burgess.iv marked 3 inline comments as done. Comment at: lib/Sema/SemaOverload.cpp:10419 @@ -10418,3 +10429,1 @@ - ResultTy) || - (!S.getLangOpts().CPlusPlus && TargetType->isVoidPointerType())) {

Re: [PATCH] D17462: Fix a codegen bug for variadic functions with pass_object_size params

2016-03-22 Thread George Burgess IV via cfe-commits
george.burgess.iv added inline comments. Comment at: lib/CodeGen/CGCall.cpp:142-143 @@ -132,1 +141,4 @@ + appendParameterTypes(CGT, prefix, FTP, FD, ); + RequiredArgs Required = + RequiredArgs::forPrototypePlus(FTP, StartParams + SynthesizedParams); CanQualType

Re: [PATCH] D17462: Fix a codegen bug for variadic functions with pass_object_size params

2016-03-22 Thread George Burgess IV via cfe-commits
george.burgess.iv updated this revision to Diff 51374. george.burgess.iv marked an inline comment as done. george.burgess.iv added a comment. Addressed all feedback http://reviews.llvm.org/D17462 Files: include/clang/CodeGen/CGFunctionInfo.h lib/CodeGen/CGCall.cpp

r263888 - [Sema] Make type deduction work with some overloadable functions

2016-03-19 Thread George Burgess IV via cfe-commits
Author: gbiv Date: Sat Mar 19 16:51:45 2016 New Revision: 263888 URL: http://llvm.org/viewvc/llvm-project?rev=263888=rev Log: [Sema] Make type deduction work with some overloadable functions Some functions can't have their address taken. If we encounter an overload set where only one of the

Re: [PATCH] D15591: [Bugfix] Make type deduction work more nicely with unaddressable functions

2016-03-19 Thread George Burgess IV via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL263888: [Sema] Make type deduction work with some overloadable functions (authored by gbiv). Changed prior to commit: http://reviews.llvm.org/D15591?vs=49337=51120#toc Repository: rL LLVM

Re: [PATCH] D17701: [Sema] Teach SemaCast to allow reinterpret_casts of overloaded functions with only one addressable candidate

2016-03-19 Thread George Burgess IV via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL263887: [Sema] Allow casting of some overloaded functions (authored by gbiv). Changed prior to commit: http://reviews.llvm.org/D17701?vs=49334=51119#toc Repository: rL LLVM

r263887 - [Sema] Allow casting of some overloaded functions

2016-03-19 Thread George Burgess IV via cfe-commits
Author: gbiv Date: Sat Mar 19 16:36:10 2016 New Revision: 263887 URL: http://llvm.org/viewvc/llvm-project?rev=263887=rev Log: [Sema] Allow casting of some overloaded functions Some functions can't have their address taken. If we encounter an overload set where only one of the candidates can have

Re: [PATCH] D17701: [Sema] Teach SemaCast to allow reinterpret_casts of overloaded functions with only one addressable candidate

2016-03-19 Thread George Burgess IV via cfe-commits
george.burgess.iv marked an inline comment as done. Comment at: lib/Sema/SemaCast.cpp:1771-1782 @@ +1770,14 @@ + + DeclAccessPair DAP; + FunctionDecl *Found = Self.resolveAddressOfOnlyViableOverloadCandidate(E, DAP); + if (!Found) +return false; + +

Re: [PATCH] D13704: [Fix] Allow implicit conversions of the address of overloadable functions in C + docs update

2016-03-19 Thread George Burgess IV via cfe-commits
george.burgess.iv added inline comments. Comment at: lib/Sema/SemaOverload.cpp:10419 @@ -10418,3 +10429,1 @@ - ResultTy) || - (!S.getLangOpts().CPlusPlus && TargetType->isVoidPointerType())) { Matches.push_back(std::make_pair(

[PATCH] D17746: Fix PR26741 -- __builtin_object_size is not consistently conservative with C++ inheritance

2016-02-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 a subscriber: cfe-commits. This patch fixes PR26741, and makes us handle inheritance more sanely. Broken code: ``` struct Foo { char a[1]; }; struct Bar : Foo {}; int break() { Bar

Re: [PATCH] D15591: [Bugfix] Make type deduction work more nicely with unaddressable functions

2016-02-28 Thread George Burgess IV via cfe-commits
george.burgess.iv updated this revision to Diff 49337. george.burgess.iv added a comment. - Rebased - Added tests for template type inference - Updated to use machinery introduced by http://reviews.llvm.org/D17701 http://reviews.llvm.org/D15591 Files: lib/Sema/SemaTemplateDeduction.cpp

Re: [PATCH] D13704: [Fix] Allow implicit conversions of the address of overloadable functions in C + docs update

2016-02-28 Thread George Burgess IV via cfe-commits
george.burgess.iv updated this revision to Diff 49333. george.burgess.iv added a comment. Rebased, and narrowed the scope of the patch a bit. http://reviews.llvm.org/D13704 Files: include/clang/Basic/AttrDocs.td lib/Sema/SemaOverload.cpp test/CodeGen/overloadable.c

r261798 - Minor cleanup of Sema::CheckEnableIf. NFC.

2016-02-24 Thread George Burgess IV via cfe-commits
Author: gbiv Date: Wed Feb 24 16:31:14 2016 New Revision: 261798 URL: http://llvm.org/viewvc/llvm-project?rev=261798=rev Log: Minor cleanup of Sema::CheckEnableIf. NFC. Modified: cfe/trunk/lib/Sema/SemaOverload.cpp Modified: cfe/trunk/lib/Sema/SemaOverload.cpp URL:

[PATCH] D17462: Fix a codegen bug for variadic functions with pass_object_size params

2016-02-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 subscribers: srhines, cfe-commits. Currently, we get assertion failures/segfaults for variadic functions with `pass_object_size` params, e.g.: ``` void foo(void *const

Re: [PATCH] D13704: [Fix] Allow implicit conversions of the address of overloadable functions in C + docs update

2016-02-16 Thread George Burgess IV via cfe-commits
george.burgess.iv updated this revision to Diff 48111. george.burgess.iv added a comment. - Reworded docs update - Added support for `reinterpret_cast`s of overloaded functions in both C and C++ - Added general facility in `Sema` to query if an overloaded expression can resolve to being

Re: [PATCH] D13704: [Fix] Allow implicit conversions of the address of overloadable functions in C + docs update

2016-02-12 Thread George Burgess IV via cfe-commits
george.burgess.iv added a comment. FYI: I noticed a few cases this patch misses. Will add them soon. http://reviews.llvm.org/D13704 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: [PATCH] D14274: Add alloc_size attribute to clang

2016-02-02 Thread George Burgess IV via cfe-commits
george.burgess.iv added inline comments. Comment at: lib/Sema/SemaDeclAttr.cpp:737 @@ +736,3 @@ +unsigned FuncParamNo, unsigned AttrArgNo) { + assert(Attr.getArg(AttrArgNo).is()); + // FuncParamNo is base-1 aaron.ballman

Re: [PATCH] D14274: Add alloc_size attribute to clang

2016-02-02 Thread George Burgess IV via cfe-commits
george.burgess.iv updated this revision to Diff 46693. george.burgess.iv marked 2 inline comments as done. george.burgess.iv added a comment. Addressed all feedback. http://reviews.llvm.org/D14274 Files: include/clang/Basic/Attr.td include/clang/Basic/AttrDocs.td

Re: [PATCH] D15721: [Sema] Fix ICE on casting a vector of bools to a vector of T

2016-01-27 Thread George Burgess IV via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL259011: [Sema] Make extended vectors of `bool` an error. (authored by gbiv). Changed prior to commit: http://reviews.llvm.org/D15721?vs=46088=46205#toc Repository: rL LLVM

r259011 - [Sema] Make extended vectors of `bool` an error.

2016-01-27 Thread George Burgess IV via cfe-commits
Author: gbiv Date: Wed Jan 27 19:38:18 2016 New Revision: 259011 URL: http://llvm.org/viewvc/llvm-project?rev=259011=rev Log: [Sema] Make extended vectors of `bool` an error. In OpenCL, `bool` vectors are a reserved type, and are therefore illegal. Outside of OpenCL, if we try to make an

Re: [PATCH] D15721: [Sema] Fix ICE on casting a vector of bools to a vector of T

2016-01-26 Thread George Burgess IV via cfe-commits
george.burgess.iv updated this revision to Diff 46053. george.burgess.iv marked an inline comment as done. george.burgess.iv added a comment. Updated comment, as requested. http://reviews.llvm.org/D15721 Files: lib/Sema/SemaExpr.cpp lib/Sema/SemaType.cpp

Re: [PATCH] D15721: [Sema] Fix ICE on casting a vector of bools to a vector of T

2016-01-26 Thread George Burgess IV via cfe-commits
george.burgess.iv added a reviewer: hfinkel. george.burgess.iv updated this revision to Diff 46088. george.burgess.iv added a comment. +hfinkel as a reviewer, because `git` said he originally added the tests I'm removing. I played around a bit, and it turns out that we don't generate correct

Re: [PATCH] D15721: [Sema] Fix ICE on casting a vector of bools to a vector of T

2016-01-25 Thread George Burgess IV via cfe-commits
george.burgess.iv updated this revision to Diff 45930. george.burgess.iv marked an inline comment as done. george.burgess.iv added a comment. - Added diagnostics that prohibit vectors of booleans in OpenCL - Added tests for extended vectors of bools in C (previously existed only in C++) -

Re: [PATCH] D15721: [Sema] Fix ICE on casting a vector of bools to a vector of T

2016-01-25 Thread George Burgess IV via cfe-commits
george.burgess.iv added a comment. > I am generally not clear about the scope of this patch. Is it intended for > OpenCL or C++? Sorry for the lack of clarity; I was mildly confused about what parts of the OpenCL spec apply to extended vectors when compiling code as C/C++. I think I have a

Re: [PATCH] D14274: Add alloc_size attribute to clang

2016-01-21 Thread George Burgess IV via cfe-commits
george.burgess.iv updated this revision to Diff 45622. george.burgess.iv added a comment. - Rebased - Removed bits that were already upstreamed as part of http://reviews.llvm.org/D14877 - Added support for LLVM's `allocsize` attribute (under review at http://reviews.llvm.org/D14933 )

Re: [PATCH] D15721: [Sema] Fix ICE on casting a vector of bools to a vector of T

2016-01-20 Thread George Burgess IV via cfe-commits
george.burgess.iv added a comment. Ping :) http://reviews.llvm.org/D15721 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: [PATCH] D15721: [Sema] Fix ICE on casting a vector of bools to a vector of T

2016-01-12 Thread George Burgess IV via cfe-commits
george.burgess.iv added a comment. Ping :) http://reviews.llvm.org/D15721 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: [PATCH] D14877: Fix ICE on lowering of constexpr vector splats

2016-01-12 Thread George Burgess IV via cfe-commits
george.burgess.iv marked 2 inline comments as done. george.burgess.iv added a comment. Ping :) http://reviews.llvm.org/D14877 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: r249995 - [Sema] Allow C conversions in C overload logic

2016-01-12 Thread George Burgess IV via cfe-commits
t I’m not especially familiar with this part of clang. If >> you or someone else who knows more about this area can figure out the best >> way to fix it, I would appreciate it. >> >> —Bob >> >> > On Oct 11, 2015, at 1:13 PM, George Burgess IV via cfe-commits <

Re: [PATCH] D14877: Fix ICE on lowering of constexpr vector splats

2016-01-12 Thread George Burgess IV via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL257559: [Bugfix] Fix ICE on constexpr vector splat. (authored by gbiv). Changed prior to commit: http://reviews.llvm.org/D14877?vs=44187=44701#toc Repository: rL LLVM http://reviews.llvm.org/D14877

r257559 - [Bugfix] Fix ICE on constexpr vector splat.

2016-01-12 Thread George Burgess IV via cfe-commits
Author: gbiv Date: Tue Jan 12 19:52:39 2016 New Revision: 257559 URL: http://llvm.org/viewvc/llvm-project?rev=257559=rev Log: [Bugfix] Fix ICE on constexpr vector splat. In {CG,}ExprConstant.cpp, we weren't treating vector splats properly. This patch makes us treat splats more properly.

r257016 - [Sema] Teach overload resolution about unaddressable functions.

2016-01-06 Thread George Burgess IV via cfe-commits
Author: gbiv Date: Wed Jan 6 20:26:57 2016 New Revision: 257016 URL: http://llvm.org/viewvc/llvm-project?rev=257016=rev Log: [Sema] Teach overload resolution about unaddressable functions. Given an expression like `()();`, we perform overload resolution as if we are calling `Foo` directly. This

Re: [PATCH] D14877: Fix ICE on lowering of constexpr vector splats

2016-01-06 Thread George Burgess IV via cfe-commits
george.burgess.iv added a comment. > Maybe we could remove CK_BooleanToSignedFloating and model that conversion as > a sequence of CK_BooleanToSignedIntegral followed by CK_IntegralToFloating? I > don't imagine it's a common operation, so the simpler AST representation is > probably worth more

Re: [PATCH] D14877: Fix ICE on lowering of constexpr vector splats

2016-01-06 Thread George Burgess IV via cfe-commits
george.burgess.iv updated this revision to Diff 44187. george.burgess.iv marked an inline comment as done. george.burgess.iv added a comment. Addressed all feedback, and added tests for `bool` -> `[n x i128]` case. http://reviews.llvm.org/D14877 Files: include/clang/AST/ASTContext.h

Re: [PATCH] D15590: [Bugfix] Disqualify unaddressable overload candidates when a function is directly called indirectly.

2016-01-06 Thread George Burgess IV via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL257016: [Sema] Teach overload resolution about unaddressable functions. (authored by gbiv). Changed prior to commit: http://reviews.llvm.org/D15590?vs=43900=44184#toc Repository: rL LLVM

Re: [PATCH] D15721: [Sema] Fix ICE on casting a vector of bools to a vector of T

2016-01-04 Thread George Burgess IV via cfe-commits
george.burgess.iv added a comment. Ping :) http://reviews.llvm.org/D15721 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: [PATCH] D15721: [Sema] Fix ICE on casting a vector of bools to a vector of T

2016-01-04 Thread George Burgess IV via cfe-commits
george.burgess.iv added a comment. Ping :) http://reviews.llvm.org/D15721 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: [PATCH] D14877: Fix ICE on lowering of constexpr vector splats

2016-01-04 Thread George Burgess IV via cfe-commits
george.burgess.iv added a comment. Ping :) http://reviews.llvm.org/D14877 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D15721: [Sema] Fix ICE on casting a vector of bools to a vector of T

2015-12-22 Thread George Burgess IV via cfe-commits
george.burgess.iv created this revision. george.burgess.iv added a reviewer: Anastasia. george.burgess.iv added a subscriber: cfe-commits. Clang generally treats booleans as 8-bit types, but lowers them to 1-bit types. This means we currently happily accept C++ code like: ``` typedef

Re: [PATCH] D14877: Fix ICE on lowering of constexpr vector splats

2015-12-21 Thread George Burgess IV via cfe-commits
george.burgess.iv added a comment. Ping :) http://reviews.llvm.org/D14877 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D15621: [Bugfix] Disallow declarations of named types in parameter lists of overloadable functions in C

2015-12-17 Thread George Burgess IV via cfe-commits
george.burgess.iv created this revision. george.burgess.iv added a subscriber: cfe-commits. This keeps the ICE in https://llvm.org/bugs/show_bug.cgi?id=25836 from happening. Long story short, the following C code will make clang overflow its stack: ``` int Foo(struct A*)

[PATCH] D15591: [Bugfix] Make type deduction work more nicely with unaddressable functions

2015-12-16 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. Given: ``` void foo(int i) __attribute__((enable_if(i < 0, ""))); void foo(double d); auto fooToCall = foo; ``` ...We currently can't determine the type of

Re: [PATCH] D14938: Fix implicit conversion from _Nullable to _Nonnull warnings in C++

2015-12-14 Thread George Burgess IV via cfe-commits
george.burgess.iv added a comment. Ping :) http://reviews.llvm.org/D14938 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: [PATCH] D14938: Fix implicit conversion from _Nullable to _Nonnull warnings in C++

2015-12-14 Thread George Burgess IV via cfe-commits
ts, below. All done. Thanks for the review! :) On Mon, Dec 14, 2015 at 1:20 PM, Justin Bogner <m...@justinbogner.com> wrote: > George Burgess IV via cfe-commits <cfe-commits@lists.llvm.org> writes: > > george.burgess.iv created this revision. > > george.burg

Re: [PATCH] D14938: Fix implicit conversion from _Nullable to _Nonnull warnings in C++

2015-12-14 Thread George Burgess IV via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL26: [Sema] Make nullness warnings appear in C++. (authored by gbiv). Changed prior to commit: http://reviews.llvm.org/D14938?vs=40987=42770#toc Repository: rL LLVM

r255556 - [Sema] Make nullness warnings appear in C++.

2015-12-14 Thread George Burgess IV via cfe-commits
Author: gbiv Date: Mon Dec 14 16:00:49 2015 New Revision: 26 URL: http://llvm.org/viewvc/llvm-project?rev=26=rev Log: [Sema] Make nullness warnings appear in C++. Given the following code: int *_Nullable ptr; int *_Nonnull nn = ptr; ...In C, clang will warn you about `nn =

Re: [PATCH] D14877: Fix ICE on lowering of constexpr vector splats

2015-12-13 Thread George Burgess IV via cfe-commits
george.burgess.iv updated this revision to Diff 42683. george.burgess.iv marked an inline comment as done. george.burgess.iv added a comment. > Changes to ExprConstant and CGExprConstant appear to be pure cleanups; please > check those in as a separate change r255314, thanks. > When this is

Re: [PATCH] D14877: Fix ICE on lowering of constexpr vector splats

2015-12-13 Thread George Burgess IV via cfe-commits
george.burgess.iv added inline comments. Comment at: lib/Sema/SemaExpr.cpp:5576 @@ +5575,3 @@ +return ExprError(); + return ImpCastExprToType(CastExprRes.get(), DestElemTy, CK); +} rsmith wrote: > Looking at `ScalarExprEmitter::VisitCastExpr`, it seems like

Re: [PATCH] D14877: Fix ICE on lowering of constexpr vector splats

2015-12-13 Thread George Burgess IV via cfe-commits
george.burgess.iv updated this revision to Diff 42686. george.burgess.iv added a comment. TIL you can use OpenCL vectors in C++ files. Fixed a bug related to not knowing this + added tests for the constexpr cases. Also, is there a better way to do the `bool` -> `APFloat` conversion in

Re: [PATCH] D14274: Add alloc_size attribute to clang

2015-12-11 Thread George Burgess IV via cfe-commits
george.burgess.iv updated this revision to Diff 42547. george.burgess.iv marked an inline comment as done. george.burgess.iv added a comment. - Fixed wording in AttrDocs - Realized I forgot to press 'submit' on comment responses after the last update. Will correct this in ~5 seconds :)

Re: [PATCH] D14274: Add alloc_size attribute to clang

2015-12-11 Thread George Burgess IV via cfe-commits
george.burgess.iv added inline comments. Comment at: include/clang/Basic/Attr.td:714 @@ +713,3 @@ + let Spellings = [GCC<"alloc_size">]; + let Subjects = SubjectList<[Function]>; + let Args = [IntArgument<"ElemSizeParam">, IntArgument<"NumElemsParam", 1>];

r255288 - [Sema] Replace pointer-to-map with a map. NFC.

2015-12-10 Thread George Burgess IV via cfe-commits
Author: gbiv Date: Thu Dec 10 13:25:21 2015 New Revision: 255288 URL: http://llvm.org/viewvc/llvm-project?rev=255288=rev Log: [Sema] Replace pointer-to-map with a map. NFC. Modified: cfe/trunk/lib/Sema/AnalysisBasedWarnings.cpp Modified: cfe/trunk/lib/Sema/AnalysisBasedWarnings.cpp URL:

r255314 - Clean ExprConstant/CGExprConstant up a bit. NFC.

2015-12-10 Thread George Burgess IV via cfe-commits
Author: gbiv Date: Thu Dec 10 18:23:35 2015 New Revision: 255314 URL: http://llvm.org/viewvc/llvm-project?rev=255314=rev Log: Clean ExprConstant/CGExprConstant up a bit. NFC. Modified: cfe/trunk/lib/AST/ExprConstant.cpp cfe/trunk/lib/CodeGen/CGExprConstant.cpp Modified:

Re: [PATCH] D14274: Add alloc_size attribute to clang

2015-12-09 Thread George Burgess IV via cfe-commits
george.burgess.iv added a comment. Also, due to allowing the evaluation of const expressions as constexpr expressions, this patch needs http://reviews.llvm.org/D14877 to go in so we don't break tests. :) http://reviews.llvm.org/D14274 ___

Re: [PATCH] D15324: [Sema] Emit warnings when comparing result of a function with `returns_nonnull` to null

2015-12-08 Thread George Burgess IV via cfe-commits
george.burgess.iv added inline comments. Comment at: lib/Sema/SemaChecking.cpp:7674 @@ +7673,3 @@ +: diag::warn_cast_nonnull_to_bool; +Diag(E->getExprLoc(), DiagID) << int(IsParam) << S.str() + << E->getSourceRange() << Range << IsEqual;

Re: [PATCH] D15324: [Sema] Emit warnings when comparing result of a function with `returns_nonnull` to null

2015-12-08 Thread George Burgess IV via cfe-commits
george.burgess.iv updated this revision to Diff 42204. george.burgess.iv marked 4 inline comments as done. george.burgess.iv added a comment. - Addressed all feedback - Refactored a loop to make its intent more clear http://reviews.llvm.org/D15324 Files:

r255058 - [Sema] Add warning when comparing nonnull and null

2015-12-08 Thread George Burgess IV via cfe-commits
Author: gbiv Date: Tue Dec 8 16:02:00 2015 New Revision: 255058 URL: http://llvm.org/viewvc/llvm-project?rev=255058=rev Log: [Sema] Add warning when comparing nonnull and null Currently, we emit warnings in some cases where nonnull function parameters are compared against null. This patch

Re: [PATCH] D15324: [Sema] Emit warnings when comparing result of a function with `returns_nonnull` to null

2015-12-08 Thread George Burgess IV via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL255058: [Sema] Add warning when comparing nonnull and null (authored by gbiv). Changed prior to commit: http://reviews.llvm.org/D15324?vs=42204=42221#toc Repository: rL LLVM

[PATCH] D15324: [Sema] Emit warnings when comparing result of a function with `returns_nonnull` to null

2015-12-07 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. Addresses a problem brought up by Xavier here: http://permalink.gmane.org/gmane.comp.compilers.clang.devel/46163 tl;dr: We get a warning on the following code

Re: [PATCH] D14938: Fix implicit conversion from _Nullable to _Nonnull warnings in C++

2015-12-04 Thread George Burgess IV via cfe-commits
george.burgess.iv added a comment. Ping :) http://reviews.llvm.org/D14938 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2015-12-04 Thread George Burgess IV via cfe-commits
george.burgess.iv abandoned this revision. george.burgess.iv added a comment. Patch is no longer necessary -- clang can handle `objectsize` well enough on its own. http://reviews.llvm.org/D12352 ___ cfe-commits mailing list

Re: [PATCH] D14877: Fix ICE on lowering of constexpr vector splats

2015-12-04 Thread George Burgess IV via cfe-commits
george.burgess.iv added a comment. Ping :) http://reviews.llvm.org/D14877 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

r254632 - Add tests for pass_object_size.

2015-12-03 Thread George Burgess IV via cfe-commits
Author: gbiv Date: Thu Dec 3 13:19:09 2015 New Revision: 254632 URL: http://llvm.org/viewvc/llvm-project?rev=254632=rev Log: Add tests for pass_object_size. These additions were meant to go in as a part of r254554; while it's certainly nice to have new functionality, it's nicer if we have tests

r254650 - Fix pass_object_size test on Windows.

2015-12-03 Thread George Burgess IV via cfe-commits
Author: gbiv Date: Thu Dec 3 15:15:22 2015 New Revision: 254650 URL: http://llvm.org/viewvc/llvm-project?rev=254650=rev Log: Fix pass_object_size test on Windows. The tests were failing because the types of some member functions, when printed, unexpectedly had "__attribute__((thiscall))" at the

r254554 - Add the `pass_object_size` attribute to clang.

2015-12-02 Thread George Burgess IV via cfe-commits
Author: gbiv Date: Wed Dec 2 15:58:08 2015 New Revision: 254554 URL: http://llvm.org/viewvc/llvm-project?rev=254554=rev Log: Add the `pass_object_size` attribute to clang. `pass_object_size` is our way of enabling `__builtin_object_size` to produce high quality results without requiring

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

2015-12-02 Thread George Burgess IV via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL254554: Add the `pass_object_size` attribute to clang. (authored by gbiv). Changed prior to commit: http://reviews.llvm.org/D13263?vs=41651=41675#toc Repository: rL LLVM

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

2015-12-02 Thread George Burgess IV via cfe-commits
george.burgess.iv marked 2 inline comments as done. Comment at: lib/AST/ExprConstant.cpp:6507-6509 @@ -6506,5 +6544,1 @@ -// handle all cases where the expression has side-effects. -// Likewise, if Type is 3, we must handle this because CodeGen cannot give a -//

Re: [PATCH] D14877: Fix ICE on lowering of constexpr vector splats

2015-11-22 Thread George Burgess IV via cfe-commits
george.burgess.iv updated this revision to Diff 40895. george.burgess.iv added a comment. We now add implicit casts to splatted literals, as Richard suggested, instead of trying to handle this as a special case in `ExprConstant`. http://reviews.llvm.org/D14877 Files:

Re: [PATCH] D14877: Fix ICE on lowering of constexpr vector splats

2015-11-22 Thread George Burgess IV via cfe-commits
george.burgess.iv added inline comments. Comment at: lib/CodeGen/CGExprConstant.cpp:1362-1363 @@ -1360,3 +1361,4 @@ +Inits[I] = llvm::ConstantFP::get(VMContext, Elt.getFloat()); else -Inits.push_back(llvm::ConstantFP::get(VMContext, Elt.getFloat())); +

[PATCH] D14877: Fix ICE on lowering of constexpr vector splats

2015-11-20 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. When evaluating constexpr vector splats, we weren't doing appropriate type conversions on the literal we were splatting, causing assertion failures in cases

<    1   2   3   4   >