ahatanak added inline comments.
Comment at: lib/Sema/SemaExpr.cpp:7007
@@ +7006,3 @@
+/// expression.
+static QualType modifyNullability(QualType ResTy, Expr *RHSExpr,
+ ASTContext &Ctx) {
doug.gregor wrote:
> This name could be im
ahatanak updated this revision to Diff 64077.
ahatanak added a comment.
Remove unused variable.
https://reviews.llvm.org/D22392
Files:
lib/Sema/SemaExpr.cpp
test/Sema/nullability.c
Index: test/Sema/nullability.c
===
--- test/S
ahatanak created this revision.
ahatanak added a reviewer: doug.gregor.
ahatanak added a subscriber: cfe-commits.
Currently clang issues a warning when the following code using a shorthand form
of the conditional operator is compiled:
$ cat test1.c
```
void foo() {
int * _Nullable p0;
int *
ahatanak created this revision.
ahatanak added a reviewer: doug.gregor.
ahatanak added a subscriber: cfe-commits.
This patch makes clang issue a warning when a null constant is used in a
context where a non null expression is expected. For example:
```
int * _Nonnull p0 = 0; // warning expected
ahatanak added inline comments.
Comment at: include/clang/Basic/DiagnosticSemaKinds.td:2170
@@ +2169,3 @@
+ "'flexible_array' attribute only applies to %select{"
+ "the last member of a struct|members of structs or classes|"
+ "fixed sized array members|array members that have
ahatanak updated this revision to Diff 63596.
ahatanak added a comment.
Change diagnostic messages.
http://reviews.llvm.org/D21453
Files:
include/clang/AST/Decl.h
include/clang/Basic/Attr.td
include/clang/Basic/AttrDocs.td
include/clang/Basic/DiagnosticSemaKinds.td
include/clang/Sema/
ahatanak added a comment.
Assuming http://reviews.llvm.org/D21514 will get accepted, this looks find to
me.
http://reviews.llvm.org/D21515
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-co
ahatanak marked 7 inline comments as done.
Comment at: include/clang/AST/Decl.h:3249
@@ -3248,1 +3248,3 @@
+ /// This is true if this struct ends with an array marked 'flexible_array'.
+ bool HasFlexibleArrayAttr : 1;
Probably it can be looked up although it w
ahatanak updated this revision to Diff 63299.
ahatanak added a comment.
Address review comments.
http://reviews.llvm.org/D21453
Files:
include/clang/AST/Decl.h
include/clang/Basic/Attr.td
include/clang/Basic/AttrDocs.td
include/clang/Basic/DiagnosticSemaKinds.td
include/clang/Sema/Att
ahatanak added inline comments.
Comment at: include/clang/Basic/TargetInfo.h:585
@@ +584,3 @@
+ StringRef
+ TargetInfo::getNormalizedGCCRegisterName(StringRef Name,
+ bool ReturnCannonical = false)
const;
This gives bui
ahatanak updated this revision to Diff 62560.
ahatanak added a comment.
The new patch defines a new attribute "flexible_array", which gets attached to
the last array member of a struct.
I made changes to clang to treat arrays marked "flexible_array" as C99's
flexible array members where it made
Author: ahatanak
Date: Wed Jun 29 19:07:17 2016
New Revision: 274190
URL: http://llvm.org/viewvc/llvm-project?rev=274190&view=rev
Log:
Use the same type for adjacent bit field members.
MSVC doesn't pack the bit field members if different types are used.
This came up in a patch review.
http://lis
This revision was automatically updated to reflect the committed changes.
Closed by commit rL274132: [libcxx] Fix a bug in strstreambuf::overflow.
(authored by ahatanak).
Changed prior to commit:
http://reviews.llvm.org/D20334?vs=58740&id=62225#toc
Repository:
rL LLVM
http://reviews.llvm.or
Author: ahatanak
Date: Wed Jun 29 10:26:13 2016
New Revision: 274132
URL: http://llvm.org/viewvc/llvm-project?rev=274132&view=rev
Log:
[libcxx] Fix a bug in strstreambuf::overflow.
The end pointer should point to one past the end of the newly allocated
buffer.
rdar://problem/24265174
Differenti
ahatanak added a comment.
I think you are right. There are other places that need to be fixed to properly
support over-allocated structures. I'll see if I can come up with a patch that
treats the over-allocated array as flexible array member.
http://reviews.llvm.org/D21453
_
ahatanak added a comment.
Sorry for not replying for a long time. I'll get back to this soon.
http://reviews.llvm.org/D14471
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
ahatanak updated this revision to Diff 61743.
ahatanak added a comment.
Address review comments and change the wording in AttrDocs.td to explain what
the attribute means and how it is used. Also, fixed the code in VisitMemberExpr
to set LValue::OverAllocated before the base class of the member e
ahatanak added inline comments.
Comment at: include/clang/Basic/AttrDocs.td:2073-2079
@@ +2072,9 @@
+ let Content = [{
+Use ``overallocated`` to indicate a struct or union is over-allocated. For
example,
+
+.. code-block:: c++
+
+struct S {
+ char a[4], char b[4];
+} __attribut
ahatanak updated this revision to Diff 61145.
ahatanak added a comment.
Fix a bug in tryEvaluateBuiltinObjectSize. If the pointer passed to
__builtin_object_size doesn't point to an array, it should be able to compute
the exact size of the subobject the pointer points to. Therefore, it should be
ahatanak created this revision.
ahatanak added reviewers: rsmith, george.burgess.iv, aaron.ballman.
ahatanak added subscribers: cfe-commits, dexonsmith, hfinkel.
This patch adds support for attribute "overallocated", which will be used to
indicate a union or struct is over-allocated. This is need
ahatanak added a comment.
Sorry for my late reply.
Comment at: lib/Sema/SemaExpr.cpp:12825
@@ -12824,1 +12824,3 @@
+ // BlockContext.
+ } else if (!Rec.IsArrayBound) {
// C++1y [expr.const]p2:
rsmith wrote:
> This isn't correct; you still need
ahatanak created this revision.
ahatanak added a subscriber: cfe-commits.
clang currently errors out when a lambda expression is used to compute the size
of an array even though clang supports variable-length arrays as a C99
extension. For example,
$ cat vla1.cpp
```
int foo3();
struct S1 {
ahatanak created this revision.
ahatanak added a reviewer: rjmccall.
ahatanak added a subscriber: cfe-commits.
This patch fixes a bug in code-gen where it uses the type of the declared
variable rather than the type of the capture of the enclosing lambda or block
for the block capture. For exampl
ahatanak created this revision.
ahatanak added a subscriber: cfe-commits.
Sema::CheckCastAlign currently ignores the aligned attribute attached to the
declared variables, which causes clang to issue spurious warnings. This patch
fixes the bug.
http://reviews.llvm.org/D21099
Files:
lib/Sema/S
ahatanak added a subscriber: ahatanak.
Comment at: test/std/utilities/meta/meta.rel/is_nothrow_callable.pass.cpp:57
@@ -56,3 +56,3 @@
struct Dummy { void foo() noexcept {} static void bar() noexcept {} };
-#if !defined(__cpp_noexcept_function_type)
+#if !defined(__cpp_noexcep
ahatanak added a comment.
Thanks!
Marshall, I've filed a PR for this bug:
https://llvm.org/bugs/show_bug.cgi?id=27915
http://reviews.llvm.org/D20334
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listi
ahatanak marked an inline comment as done.
ahatanak added a comment.
I spent some time debugging the code and here is what I found.
The initial buffer size is 0 when strstreambuf is constructed and all six
pointers are null initially. When the first character is pushed,
strstreambuf::overflow a
ahatanak updated this revision to Diff 58740.
ahatanak added a comment.
Remove unused variable and add test case.
http://reviews.llvm.org/D20334
Files:
src/strstream.cpp
test/std/depr/depr.str.strstreams/depr.strstreambuf/depr.strstreambuf.members/overflow.pass.cpp
Index:
test/std/depr/d
Author: ahatanak
Date: Wed May 25 21:32:10 2016
New Revision: 270817
URL: http://llvm.org/viewvc/llvm-project?rev=270817&view=rev
Log:
Don't feed standard error to FileCheck.
This is an attempt to fix the buildbot that started failing after
r270808.
http://lab.llvm.org:8011/builders/sanitizer-x8
Author: ahatanak
Date: Wed May 25 19:37:30 2016
New Revision: 270808
URL: http://llvm.org/viewvc/llvm-project?rev=270808&view=rev
Log:
[ObjC] Remove _Atomic from return type and parameter type of
objective-c properties.
This fixes an assert in CodeGen that fires when the getter and setter
functio
This revision was automatically updated to reflect the committed changes.
Closed by commit rL270808: [ObjC] Remove _Atomic from return type and parameter
type of (authored by ahatanak).
Changed prior to commit:
http://reviews.llvm.org/D20407?vs=58544&id=58549#toc
Repository:
rL LLVM
http://
ahatanak updated this revision to Diff 58544.
ahatanak added a comment.
Thanks for the review. I've removed parameter ASTContext that was unused.
http://reviews.llvm.org/D20407
Files:
include/clang/AST/Type.h
lib/AST/Type.cpp
lib/CodeGen/CGObjC.cpp
lib/Sema/SemaObjCProperty.cpp
test/C
ahatanak added a comment.
In http://reviews.llvm.org/D20334#439248, @bcraig wrote:
> ASAN is complaining about an excessively large read. If the problem was in
> overflow, I would expect ASAN to complain about an out-of-bounds write
> instead.
According to the example shown in the link below
ahatanak added a comment.
In http://reviews.llvm.org/D20407#439951, @rjmccall wrote:
> The C standard is poorly-written in this area, but I think it would be
> reasonable for CheckFunctionReturnType to just silently remove _Atomic. (You
> will not be able to just re-use your new method there;
ahatanak updated this revision to Diff 58512.
ahatanak added a comment.
Rename variables.
http://reviews.llvm.org/D20407
Files:
include/clang/AST/Type.h
lib/AST/Type.cpp
lib/CodeGen/CGObjC.cpp
lib/Sema/SemaObjCProperty.cpp
test/CodeGenObjC/property-atomic-bool.m
test/SemaObjC/proper
ahatanak marked 2 inline comments as done.
ahatanak added a comment.
I reverted the changes I made in SemaDeclObjC.cpp as they weren't needed to
pass the regression tests I added. clang still asserts when it compiles an
objective-c method returning _Atomic and those changes will become necessary
ahatanak marked 7 inline comments as done.
Comment at: lib/AST/Type.cpp:1282
@@ -1277,1 +1281,3 @@
+}
+
Optional> Type::getObjCSubstitutions(
I added getTypePtr() because the code didn't compile.
Comment at: lib/CodeGen/CGObjC.cpp:901
@@ -903,1
ahatanak updated this revision to Diff 58495.
ahatanak added a comment.
Address John's review comments.
http://reviews.llvm.org/D20407
Files:
include/clang/AST/Type.h
lib/AST/Type.cpp
lib/CodeGen/CGObjC.cpp
lib/Sema/SemaObjCProperty.cpp
test/CodeGenObjC/property-atomic-bool.m
test/S
ahatanak added a comment.
My understanding is that typically std::ends is explicitly appended to
null-terminate the stream buffer. The test case in the example does that.
http://en.cppreference.com/w/cpp/io/ostrstream/str
http://reviews.llvm.org/D20334
__
ping.
> On May 17, 2016, at 12:20 PM, Akira Hatanaka via cfe-commits
> wrote:
>
> ahatanak created this revision.
> ahatanak added reviewers: mclow.lists, EricWF, howard.hinnant.
> ahatanak added a subscriber: cfe-commits.
>
> The end pointer should point to one p
ahatanak updated this revision to Diff 58144.
ahatanak added a comment.
Rewrote the patch based on John's review comment.
Remove typedefs and _Atomic from the return and parameter types of getters and
setters of objective-c properties.
http://reviews.llvm.org/D20407
Files:
include/clang/AST
ahatanak added a comment.
I've managed to remove _Atomic from the types of the return and parameter of
getter and setter functions in my new patch.
I'm not sure how I should handle typedefs though. If I had the following
typedef,
typedef _Atomic(_Bool) AtomicBool,
would it be OK to desugar th
ahatanak added a comment.
In http://reviews.llvm.org/D20407#433915, @rjmccall wrote:
> _Atomic is functionally a type qualifier and should be removed in Sema when
> computing the result type of the getter and the parameter type of the setter.
> That is, if the user declares a property of type
ahatanak added a comment.
Also, it seems that there are bugs in the way clang handles functions whose
return types are atomic. Clang asserts when compiling the following test case:
$ cat t1.c
_Atomic _Bool b1;
_Atomic _Bool foo1() {
return b1;
}
$ clang -std=c11 -o - -S t1.c -emit
ahatanak created this revision.
ahatanak added a reviewer: rjmccall.
ahatanak added a subscriber: cfe-commits.
This patch fixes an assert that fires when there is a property that has
attribute nonatomic and type _Atomic(_Bool). The assert fires when an i1 value
is bitcast to i8 (which is the typ
ahatanak created this revision.
ahatanak added reviewers: mclow.lists, EricWF, howard.hinnant.
ahatanak added a subscriber: cfe-commits.
The end pointer should point to one past the end of the newly allocated buffer.
Without this fix, asan reports an error when the following code is compiled and
This revision was automatically updated to reflect the committed changes.
Closed by commit rL269385: [ObjC][CodeGen] Remove an assert that is no longer
correct. (authored by ahatanak).
Changed prior to commit:
http://reviews.llvm.org/D20045?vs=57111&id=57125#toc
Repository:
rL LLVM
http://r
Author: ahatanak
Date: Thu May 12 20:21:23 2016
New Revision: 269385
URL: http://llvm.org/viewvc/llvm-project?rev=269385&view=rev
Log:
[ObjC][CodeGen] Remove an assert that is no longer correct.
clang asserts when compiling the following code because r231508 made
changes to promote constant tempo
ahatanak updated this revision to Diff 57111.
ahatanak added a comment.
Thanks, I updated the comment in the new patch.
http://reviews.llvm.org/D20045
Files:
lib/CodeGen/CGExpr.cpp
test/CodeGenObjCXX/arc-cxx11-init-list.mm
Index: test/CodeGenObjCXX/arc-cxx11-init-list.mm
==
ahatanak added a comment.
In http://reviews.llvm.org/D20045#425903, @manmanren wrote:
> After r231508 made changes to promote constant temporaries to globals, the
> assert fires when a std::initializer_list is constructed using Objective-C
> string literals.
>
> --> Can you explain the code pat
ahatanak updated this revision to Diff 57088.
ahatanak added a comment.
Add a comment explaining why it is OK to return early if the global variable
has an initializer.
http://reviews.llvm.org/D20045
Files:
lib/CodeGen/CGExpr.cpp
test/CodeGenObjCXX/arc-cxx11-init-list.mm
Index: test/CodeG
ahatanak created this revision.
ahatanak added reviewers: rjmccall, rsmith, manmanren.
ahatanak added a subscriber: cfe-commits.
The assert was committed in r183967. After r231508 made changes to promote
constant temporaries to globals, the assert fires when a std::initializer_list
is constructe
Author: ahatanak
Date: Wed May 4 20:41:07 2016
New Revision: 268589
URL: http://llvm.org/viewvc/llvm-project?rev=268589&view=rev
Log:
Do not add uwtable attribute by default for MachO targets.
r217178 changed clang to add function attribute uwtable by default on
Win64, which caused the __eh_fram
Author: ahatanak
Date: Wed May 4 13:40:33 2016
New Revision: 268532
URL: http://llvm.org/viewvc/llvm-project?rev=268532&view=rev
Log:
[CodeGenObjCXX] Fix handling of blocks in lambda.
This fixes a crash that occurs when a block captures a reference that is
captured by its enclosing lambda.
rdar
This revision was automatically updated to reflect the committed changes.
Closed by commit rL268532: [CodeGenObjCXX] Fix handling of blocks in lambda.
(authored by ahatanak).
Changed prior to commit:
http://reviews.llvm.org/D19536?vs=56090&id=56183#toc
Repository:
rL LLVM
http://reviews.llv
This revision was automatically updated to reflect the committed changes.
Closed by commit rL268527: [ObjC] Enter a new evaluation context before calling
(authored by ahatanak).
Changed prior to commit:
http://reviews.llvm.org/D18815?vs=56092&id=56178#toc
Repository:
rL LLVM
http://reviews.
Author: ahatanak
Date: Wed May 4 13:07:20 2016
New Revision: 268527
URL: http://llvm.org/viewvc/llvm-project?rev=268527&view=rev
Log:
[ObjC] Enter a new evaluation context before calling
BuildBlockForLambdaConversion.
Previously, clang would build an incorrect AST for the following code:
id tes
ahatanak added reviewers: manmanren, doug.gregor, rjmccall.
ahatanak updated this revision to Diff 56092.
ahatanak added a comment.
Rebase and add reviewers.
http://reviews.llvm.org/D18815
Files:
lib/Sema/SemaExprCXX.cpp
test/SemaObjCXX/block-cleanup.mm
Index: test/SemaObjCXX/block-cleanup
ahatanak updated this revision to Diff 56090.
ahatanak added a comment.
Apply John's patch with a few modifications.
I had to special case __block variables and remove the line creating a load
from a reference to fix the failing regression tests.
http://reviews.llvm.org/D19536
Files:
lib/Co
Thanks, fixed in r268318.
> On May 2, 2016, at 3:05 PM, Richard Smith wrote:
>
> On Mon, May 2, 2016 at 2:52 PM, Akira Hatanaka via cfe-commits
> mailto:cfe-commits@lists.llvm.org>> wrote:
> Author: ahatanak
> Date: Mon May 2 16:52:57 2016
> New Revision: 26831
ahatanak added inline comments.
Comment at: lib/CodeGen/CGBlocks.cpp:806
@@ -792,1 +805,3 @@
+ }
+ src = Builder.CreateStructGEP(Addr, Idx, Offset, FD->getName());
} else {
rjmccall wrote:
> Hmm. It's become increasingly clear that my original deci
Author: ahatanak
Date: Mon May 2 17:29:40 2016
New Revision: 268318
URL: http://llvm.org/viewvc/llvm-project?rev=268318&view=rev
Log:
Remove unneeded test in tryCaptureAsConstant.
It isn't necessary to call hasDefaultArg because we can't rematerialize
a captured variable that is a function param
It looks like turning it to an assert wouldn’t be correct, I’ll probably just
remove it.
> On May 2, 2016, at 3:12 PM, Akira Hatanaka via cfe-commits
> wrote:
>
> I see. Perhaps this should be an assert?
>
>> On May 2, 2016, at 3:05 PM, Richard Smith > <mailto:ri
I see. Perhaps this should be an assert?
> On May 2, 2016, at 3:05 PM, Richard Smith wrote:
>
> On Mon, May 2, 2016 at 2:52 PM, Akira Hatanaka via cfe-commits
> mailto:cfe-commits@lists.llvm.org>> wrote:
> Author: ahatanak
> Date: Mon May 2 16:52:57 2016
> New Revi
Author: ahatanak
Date: Mon May 2 16:52:57 2016
New Revision: 268314
URL: http://llvm.org/viewvc/llvm-project?rev=268314&view=rev
Log:
[CodeGenObjCXX] Don't rematerialize default arguments of function
parameters in the body of a block.
This fixes a bug where clang would materialize the default ar
PM, Richard Smith wrote:
>
> On Fri, Apr 29, 2016 at 12:12 PM, Akira Hatanaka via cfe-commits
> mailto:cfe-commits@lists.llvm.org>> wrote:
> Scope’s constructor passes the parameter ScopeFlags to Scope::Init, which
> calls setFlags(Scope *parent, unsigned flags) and setFlags ini
11:07 AM, Akira Hatanaka via cfe-commits
> mailto:cfe-commits@lists.llvm.org>> wrote:
> If I add an assert to check (F != Flags) in setFlags, 2700+ out of 5000+
> clang regression tests fail. I haven’t figured out which parts of clang are
> passing the same value to setFlags.
>
6 at 7:34 PM, Akira Hatanaka via cfe-commits
> mailto:cfe-commits@lists.llvm.org>> wrote:
> ahatanak added a comment.
>
> Thanks for the review. I committed the patch in r267956 and r267975.
>
> Do you think I should make setFlags(unsigned F) return early if F == Flags?
>
ahatanak added a comment.
Thanks for the review. I committed the patch in r267956 and r267975.
Do you think I should make setFlags(unsigned F) return early if F == Flags?
Repository:
rL LLVM
http://reviews.llvm.org/D19175
___
cfe-commits mailing
Author: ahatanak
Date: Thu Apr 28 21:24:14 2016
New Revision: 267975
URL: http://llvm.org/viewvc/llvm-project?rev=267975&view=rev
Log:
[Parser] Clear the TemplateParamScope bit of the current scope's flag
if we are parsing a template specialization.
This commit makes changes to clear the Template
This revision was automatically updated to reflect the committed changes.
Closed by commit rL267975: [Parser] Clear the TemplateParamScope bit of the
current scope's flag (authored by ahatanak).
Changed prior to commit:
http://reviews.llvm.org/D19175?vs=55484&id=55523#toc
Repository:
rL LLVM
Author: ahatanak
Date: Thu Apr 28 18:50:12 2016
New Revision: 267956
URL: http://llvm.org/viewvc/llvm-project?rev=267956&view=rev
Log:
[Sema] Fix a crash that occurs when a variable template is initialized
with a generic lambda.
This patch fixes Sema::InstantiateVariableInitializer to switch to t
ahatanak updated this revision to Diff 55484.
ahatanak added a comment.
- Defined a private overload of Scope::setFlags which is called from
Scope::setFlags and Scope::Init.
- Stop checking TmplScope->isTemplateParamScope() in
Sema::ActOnStartOfLambdaDefinition.
- Fix test case test/CXX/drs/dr1x
ahatanak added a comment.
If I try calling Init(AnyParent, F) in Scope::setFlags, clang fails to compile
the following code because it cannot find the definition of struct "foo":
void foo3(void)
struct foo {
int a, f;
};
char *np = nullptr;
int *ip = &(((struct foo *)np)
ahatanak updated this revision to Diff 55453.
ahatanak added a comment.
Use ParseScopeFlags to clear the TemplateParamScope rather than calling
setFlags directly.
I tried calling Init(AnyParent, F) is Scope::setFlags, but it caused a lot of
test cases to fail, which I'm currently investigating.
ahatanak updated this revision to Diff 55356.
ahatanak added a comment.
Made a couple of changes to distinguish between an explicit specialization
('template<>') and a template declaration which doesn't have a named template
parameter (see the variable template fn0 in test case vartemplate-lambd
ahatanak added a comment.
I'm looking for a way to avoid the assert in Sema::PerformDependentDiagnostics
that is fired when a template parameter doesn't have a name.
In order to avoid the assert, CXXRecordDecl::isDependentLambda() should return
true for the old lambda class, and in order to do
ahatanak created this revision.
ahatanak added a reviewer: rjmccall.
ahatanak added a subscriber: cfe-commits.
This fixes a crash that occurs when a block nested in a c++ lambda captures a
reference that is captured by the enclosing lambda.
rdar://problem/18586651
http://reviews.llvm.org/D19536
Thanks for catching this, r266706.
> On Apr 18, 2016, at 11:38 AM, Richard Smith wrote:
>
> On Mon, Apr 18, 2016 at 11:19 AM, Akira Hatanaka via cfe-commits
> mailto:cfe-commits@lists.llvm.org>> wrote:
> Author: ahatanak
> Date: Mon Apr 18 13:19:45 2016
> New Revi
Author: ahatanak
Date: Mon Apr 18 21:21:47 2016
New Revision: 266706
URL: http://llvm.org/viewvc/llvm-project?rev=266706&view=rev
Log:
Add a test case to check a member's default constructor is also run.
This is a follow-up to r266645.
Modified:
cfe/trunk/test/Parser/objc-default-ctor-init.m
ahatanak updated this revision to Diff 54088.
ahatanak added a comment.
Address Richard's review comments and add a test case.
The test case currently asserts when fn0 is instantiated. This doesn't happen
if I give the template parameter a name.
template auto fn0 = [] {};
instead of
template
Author: ahatanak
Date: Mon Apr 18 13:19:45 2016
New Revision: 266645
URL: http://llvm.org/viewvc/llvm-project?rev=266645&view=rev
Log:
[Parser][ObjC] Make sure c++11 in-class initialization is done when the
constructor's definition is in an implementation block.
Without this commit, ptr doesn't g
ahatanak created this revision.
ahatanak added a reviewer: rsmith.
ahatanak added a subscriber: cfe-commits.
I'm sending a WIP patch which fixes PR27015 to get an early feedback from the
community.
This patch attempts to fix a crash which happens when a variable template is
initialized with a g
This revision was automatically updated to reflect the committed changes.
Closed by commit rL266147: [ObjC] Pop all cleanups created in
EmitObjCForCollectionStmt before (authored by ahatanak).
Changed prior to commit:
http://reviews.llvm.org/D18618?vs=52609&id=53489#toc
Repository:
rL LLVM
Author: ahatanak
Date: Tue Apr 12 18:10:58 2016
New Revision: 266147
URL: http://llvm.org/viewvc/llvm-project?rev=266147&view=rev
Log:
[ObjC] Pop all cleanups created in EmitObjCForCollectionStmt before
exiting the for-in loop.
This commit fixes a bug where EmitObjCForCollectionStmt didn't pop
cl
ahatanak created this revision.
ahatanak added a subscriber: cfe-commits.
Currently, when clang compiles the following code,
id test() {
return @{@"a": [](){}, @"b": [](){}};
}
it builds an AST that is incorrect:
ReturnStmt 0x10d080448
`-ExprWithCleanups 0x10d080428
|-cleanup Block 0x10d0
ahatanak added a comment.
Also, fixed the regex in test case so that the test passes on release builds
too.
http://reviews.llvm.org/D18618
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-co
ahatanak updated this revision to Diff 52609.
ahatanak added a comment.
Changed the patch based on review comments.
Added code to enter RunCleanupsScope before the condition is evaluated and
force its cleanup before emitting LoopEnd.
http://reviews.llvm.org/D18618
Files:
lib/CodeGen/CGObjC.
Author: ahatanak
Date: Sat Apr 2 22:36:22 2016
New Revision: 265257
URL: http://llvm.org/viewvc/llvm-project?rev=265257&view=rev
Log:
Fix test case committed in r265197.
The test was failing on some release build because the basic block names
I was expecting weren't printed.
Modified:
cfe/t
This revision was automatically updated to reflect the committed changes.
Closed by commit rL265197: [CodeGen] Emit lifetime.end intrinsic after objects
are destructed in (authored by ahatanak).
Changed prior to commit:
http://reviews.llvm.org/D18196?vs=52110&id=52440#toc
Repository:
rL LLVM
Author: ahatanak
Date: Fri Apr 1 17:58:55 2016
New Revision: 265197
URL: http://llvm.org/viewvc/llvm-project?rev=265197&view=rev
Log:
[CodeGen] Emit lifetime.end intrinsic after objects are destructed in
landing pads.
Previously, lifetime.end intrinsics were inserted only on normal control
flows
ahatanak added inline comments.
Comment at: cfe/trunk/include/clang/Basic/TargetInfo.h:426
@@ +425,3 @@
+/// we assume that alignment here. (It's generally 16 bytes, but
+/// some targets overwrite it.)
+return getDefaultAlignForAttributeAligned();
rj
Author: ahatanak
Date: Thu Mar 31 13:32:38 2016
New Revision: 265035
URL: http://llvm.org/viewvc/llvm-project?rev=265035&view=rev
Log:
Fix the comment for the function added in r264998.
Modified:
cfe/trunk/include/clang/Basic/TargetInfo.h
Modified: cfe/trunk/include/clang/Basic/TargetInfo.h
Author: ahatanak
Date: Thu Mar 31 01:36:07 2016
New Revision: 264998
URL: http://llvm.org/viewvc/llvm-project?rev=264998&view=rev
Log:
[CodeGenCXX] Fix ItaniumCXXABI::getAlignmentOfExnObject to return 8-byte
alignment on Darwin.
Itanium C++ ABI specifies that _Unwind_Exception should be double-wo
This revision was automatically updated to reflect the committed changes.
Closed by commit rL264998: [CodeGenCXX] Fix
ItaniumCXXABI::getAlignmentOfExnObject to return 8-byte (authored by ahatanak).
Changed prior to commit:
http://reviews.llvm.org/D18479?vs=52171&id=52175#toc
Repository:
rL L
ahatanak updated this revision to Diff 52171.
ahatanak added a comment.
Thank you for the review, John.
I've updated the patch as per your request. I defined virtual function
getExnObjectAlignment instead of adding a ExnObjectAlignment field to
TargetInfo since I found that getDefaultAlignForAt
ahatanak added a comment.
In CodeGenFunction::EmitARCRetainScalarExpr, if I move the declaration of
"scope" above the call to enterFullExpression, the cleanup is popped before the
loop body is entered right after the method returning the collection (foo1 in
the test case) is called.
if (const
ahatanak updated this revision to Diff 52110.
ahatanak added a comment.
Add "REQUIRES: asserts" to test case to enable checking basic block names.
http://reviews.llvm.org/D18196
Files:
lib/CodeGen/CGCleanup.cpp
lib/CodeGen/CGDecl.cpp
lib/CodeGen/EHScopeStack.h
test/CodeGenCXX/destructor
ahatanak created this revision.
ahatanak added a reviewer: rjmccall.
ahatanak added a subscriber: cfe-commits.
This patch fixes a bug where EmitObjCForCollectionStmt doesn't pop cleanups for
captures.
For example, in the following for-in loop, a block which captures self is
passed to foo1:
for
> On Mar 25, 2016, at 2:23 PM, Akira Hatanaka via cfe-commits
> wrote:
>
>>
>> On Mar 25, 2016, at 2:06 PM, David Majnemer via cfe-commits
>> mailto:cfe-commits@lists.llvm.org>> wrote:
>>
>>
>>
>> On Fri, Mar 25, 2016 at 12:57
701 - 800 of 971 matches
Mail list logo