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(

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; + + Self.CheckAddressOfMem

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&view=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

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&id=51119#toc Repository: rL LLVM http://reviews.llvm.or

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&view=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&id=51120#toc Repository: rL LLVM http://

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 lib/CodeGen/CGExprCXX.cp

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, &SynthesizedParams); + RequiredArgs Required = + RequiredArgs::forPrototypePlus(FTP, StartParams + SynthesizedParams); Can

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())) { Matches.push_back(std::make

r264132 - [Sema] Allow implicit conversions of &overloaded_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&view=rev Log: [Sema] Allow implicit conversions of &overloaded_fn in C. Also includes a minor ``enable_if`` docs update. Currently, our address-of overload machinery will only all

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 &overloaded_fn in C. (authored by gbiv). Changed prior to commit: http://reviews.llvm.org/D13704?vs=49333&id=51378#toc Repository: rL LLVM http://reviews

[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

[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 speculativel

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 pr

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

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

2016-01-04 Thread George Burgess IV via cfe-commits
george.burgess.iv updated this revision to Diff 43900. george.burgess.iv added a comment. Rebased http://reviews.llvm.org/D15590 Files: include/clang/Sema/Overload.h include/clang/Sema/Sema.h lib/Sema/SemaExpr.cpp lib/Sema/SemaOverload.cpp test/CodeGenCXX/pass-object-size.cpp test/S

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&view=rev Log: [Sema] Teach overload resolution about unaddressable functions. Given an expression like `(&Foo)();`, we perform overload resolution as if we are calling `Foo` direct

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&id=44184#toc Repository: rL LLVM http://r

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 include

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

2016-01-12 Thread George Burgess IV via cfe-commits
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 < > cfe-commits@lists.llvm.org> w

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
specially 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 < >>

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&view=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. Add

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&id=44701#toc Repository: rL LLVM http://reviews.llvm.org/D148

[PATCH] D16159: [Sema] Fix PR26085 -- regression caused by making overload resolution more lenient in C.

2016-01-13 Thread George Burgess IV via cfe-commits
george.burgess.iv created this revision. george.burgess.iv added reviewers: bob.wilson, rsmith. george.burgess.iv added a subscriber: cfe-commits. Fix PR26085 by suppressing diags from CheckSingleAssignmentConstraints during overload resolution. It seems that passing `Diagnose`/`Complain` flags

r257710 - [Sema] Suppress diags in overload resolution.

2016-01-13 Thread George Burgess IV via cfe-commits
Author: gbiv Date: Wed Jan 13 17:36:34 2016 New Revision: 257710 URL: http://llvm.org/viewvc/llvm-project?rev=257710&view=rev Log: [Sema] Suppress diags in overload resolution. We were emitting diagnostics from our shiny new C-only overload resolution mode. This patch attempts to silence all such

Re: [PATCH] D16159: [Sema] Fix PR26085 -- regression caused by making overload resolution more lenient in C.

2016-01-13 Thread George Burgess IV via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL257710: [Sema] Suppress diags in overload resolution. (authored by gbiv). Changed prior to commit: http://reviews.llvm.org/D16159?vs=44797&id=44803#toc Repository: rL LLVM http://reviews.llvm.org/D1

Re: r257710 - [Sema] Suppress diags in overload resolution.

2016-01-13 Thread George Burgess IV via cfe-commits
FYI: This patch should to be merged into the clang 3.8.0 branch. Thank you! George On Wed, Jan 13, 2016 at 3:36 PM, George Burgess IV via cfe-commits < cfe-commits@lists.llvm.org> wrote: > Author: gbiv > Date: Wed Jan 13 17:36:34 2016 > New Revision: 257710 > > URL: http:/

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] 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 ) http://re

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++) - Clarifi

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 be

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 test/CodeGen/bool-vector-conversio

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 comment. > I think we will also need to forbid the invalid conversions too at some point. test/SemaOpenCL/vector_conv_invalid.cl checks that clang gives you errors converting e.g. a `4 x unsigned` to a `4 x int`. So, unless you were referring to something else, that s

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 mac

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&view=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 ex

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&id=46205#toc Repository: rL LLVM http://reviews.llvm.org

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

2015-11-13 Thread George Burgess IV via cfe-commits
george.burgess.iv added inline comments. Comment at: include/clang/AST/Expr.h:631-634 @@ -630,1 +630,6 @@ + /// tryEvaluateObjectSize - If the current Expr is a pointer, this will try to + /// statically determine how many bytes remain in the object this pointer is + /// poi

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

2015-11-13 Thread George Burgess IV via cfe-commits
george.burgess.iv updated this revision to Diff 40185. george.burgess.iv marked 22 inline comments as done. george.burgess.iv added a comment. - Removed pass_object_size-related information from FunctionType - Unified enable_if/pass_object_size error handling when the address of a function with e

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

2015-11-19 Thread George Burgess IV via cfe-commits
george.burgess.iv added inline comments. Comment at: include/clang/AST/Expr.h:631-634 @@ -630,1 +630,6 @@ + /// \brief If the current Expr is either a pointer, this will try to + /// statically determine the number of bytes available where the pointer is + /// pointing. Retu

[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 lik

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())); +

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: include/clang/Sema/Sema.

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

2015-11-23 Thread George Burgess IV via cfe-commits
george.burgess.iv created this revision. george.burgess.iv added a reviewer: doug.gregor. george.burgess.iv added subscribers: cfe-commits, doug.gregor. Currently, code like this compiles cleanly in C++, but with warnings (as it should) in C: ``` int foo() { void *_Nullable p; void *_Nonnull

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

2015-12-02 Thread George Burgess IV via cfe-commits
george.burgess.iv added a comment. Oops -- I didn't see Richard's comments before I pressed "save". Will address that feedback too. Sorry! :) http://reviews.llvm.org/D13263 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.o

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&view=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 inl

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&id=41675#toc Repository: rL LLVM http://reviews.llvm.org/D

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 -// conse

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&view=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 t

r254646 - Add tests for `&enable_if_function` diagnostics.

2015-12-03 Thread George Burgess IV via cfe-commits
Author: gbiv Date: Thu Dec 3 14:54:58 2015 New Revision: 254646 URL: http://llvm.org/viewvc/llvm-project?rev=254646&view=rev Log: Add tests for `&enable_if_function` diagnostics. The introduction of pass_object_size fixed a few bugs related to taking the address of a function with enable_if attr

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&view=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

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 cfe-commits@lists.llvm.o

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

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

[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] 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: include/clang/Basic/DiagnosticSemaKind

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; --

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&view=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 e

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&id=42221#toc Repository: rL LLVM http://reviews.llvm.o

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

2015-12-09 Thread George Burgess IV via cfe-commits
george.burgess.iv updated the summary for this revision. george.burgess.iv updated this revision to Diff 42348. george.burgess.iv added a comment. As discussed offline: - Added support for treating `const` variables as `constexpr` - Added requirement for `LValue`s with an invalid `alloc_size` bas

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 ___ cfe-comm

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&view=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

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

2015-12-10 Thread George Burgess IV via cfe-commits
george.burgess.iv updated this revision to Diff 42474. george.burgess.iv marked 15 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 include/clang/Basic/Diagn

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&view=rev Log: Clean ExprConstant/CGExprConstant up a bit. NFC. Modified: cfe/trunk/lib/AST/ExprConstant.cpp cfe/trunk/lib/CodeGen/CGExprConstant.cpp Modified: cfe/trunk/l

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>]; aaro

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 :) http://r

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 do

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 w

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 ExprConst

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 wrote: > George Burgess IV via cfe-commits writes: > > george.burgess.iv created this revision. > > george.burgess.iv added a reviewer: doug.gregor. > > george.burgess.iv

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&id=42770#toc Repository: rL LLVM http://reviews.llvm.org/D14

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&view=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 =

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

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. "directly called indirectly" wasn't a typo; I can't think of a better name for this pattern. :) Currently, Sema treats `foo()` and `(&foo)()` both as direct cal

[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 `fo

[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*) __attribute__((overload

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] 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 __attribute

[clang] 275f30d - [clang] Change builtin object size when subobject is invalid

2021-01-07 Thread George Burgess IV via cfe-commits
Author: Jeffrey T Mott Date: 2021-01-07T12:34:07-08:00 New Revision: 275f30df8ad6de75e1f29e4b33eaeb67686caf0d URL: https://github.com/llvm/llvm-project/commit/275f30df8ad6de75e1f29e4b33eaeb67686caf0d DIFF: https://github.com/llvm/llvm-project/commit/275f30df8ad6de75e1f29e4b33eaeb67686caf0d.diff

[clang] b270fd5 - Revert "[clang] Change builtin object size when subobject is invalid"

2021-01-20 Thread George Burgess IV via cfe-commits
Author: George Burgess IV Date: 2021-01-20T11:03:34-08:00 New Revision: b270fd59f0a86fe737853abc43e76b9d29a67eea URL: https://github.com/llvm/llvm-project/commit/b270fd59f0a86fe737853abc43e76b9d29a67eea DIFF: https://github.com/llvm/llvm-project/commit/b270fd59f0a86fe737853abc43e76b9d29a67eea.d

[clang] [Sema] Support negation/parens with __builtin_available (PR #111439)

2024-10-09 Thread George Burgess IV via cfe-commits
gburgessiv wrote: (...Or a reviewer will find me - thank you!) https://github.com/llvm/llvm-project/pull/111439 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Sema] Support negation/parens with __builtin_available (PR #111439)

2024-10-09 Thread George Burgess IV via cfe-commits
https://github.com/gburgessiv closed https://github.com/llvm/llvm-project/pull/111439 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Sema] Support negation/parens with __builtin_available (PR #111439)

2024-10-08 Thread George Burgess IV via cfe-commits
gburgessiv wrote: OK, thanks! I'll try to find someone with more context later today :) https://github.com/llvm/llvm-project/pull/111439 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commit

[clang] [Sema] Support negation/parens with __builtin_available (PR #111439)

2024-10-07 Thread George Burgess IV via cfe-commits
gburgessiv wrote: Hey Damyan, GH suggested you as a reviewer for this. Would you be able to TAL? Happy to find someone else if not :) https://github.com/llvm/llvm-project/pull/111439 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lis

[clang] [Sema] Support negation/parens with __builtin_available (PR #111439)

2024-10-07 Thread George Burgess IV via cfe-commits
https://github.com/gburgessiv created https://github.com/llvm/llvm-project/pull/111439 At present, `__builtin_available` is really restrictive with its use. Overall, this seems like a good thing, since the analyses behind it are not very expensive. That said, it's very straightforward to supp

[clang] [clang] Add comment about misleading alloc_size argument names (PR #134899)

2025-04-08 Thread George Burgess IV via cfe-commits
https://github.com/gburgessiv approved this pull request. LGTM, thanks for adding the clarity! https://github.com/llvm/llvm-project/pull/134899 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-

[clang] [clang] Add comment about misleading alloc_size argument names (PR #134899)

2025-04-08 Thread George Burgess IV via cfe-commits
https://github.com/gburgessiv closed https://github.com/llvm/llvm-project/pull/134899 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Add comment about misleading alloc_size argument names (PR #134899)

2025-04-08 Thread George Burgess IV via cfe-commits
gburgessiv wrote: Done, thanks again! https://github.com/llvm/llvm-project/pull/134899 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

<    1   2   3   4