[PATCH] D43787: Fix which Darwin versions have ObjC runtime with full subscripting support.

2018-02-26 Thread Volodymyr Sapsai via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL326143: Fix which Darwin versions have ObjC runtime with full subscripting support. (authored by vsapsai, committed by ). Herald added subscribers: llvm-commits, delcypher. Changed prior to commit: http

[PATCH] D41311: [CodeGen] Fix crash when a function taking transparent union is redeclared.

2017-12-15 Thread Volodymyr Sapsai via Phabricator via cfe-commits
vsapsai created this revision. vsapsai added reviewers: rjmccall, rafael. Herald added subscribers: kristof.beyls, aemerson. When a function taking transparent union is declared as taking one of union members earlier in the translation unit, clang would hit an "Invalid cast" assertion during EmitF

[PATCH] D41405: Fix an assertion failure regression in isDesignatorAtObjectEnd for __builtin_object_size with incomplete array type in struct

2017-12-19 Thread Volodymyr Sapsai via Phabricator via cfe-commits
vsapsai added inline comments. Comment at: test/Sema/builtin-object-size.c:105 +void rd36094951_IAS_builtin_object_size_assertion(IncompleteArrayStruct* p) { + __builtin___strlcpy_chk (p->session[0].string, "ab", 2, __builtin_object_size(p->session[0].string, 1)); +} -

[PATCH] D41423: [Lex] Avoid out-of-bounds dereference in LexAngledStringLiteral.

2017-12-19 Thread Volodymyr Sapsai via Phabricator via cfe-commits
vsapsai created this revision. vsapsai added reviewers: arphaman, kcc. Fix makes the loop in LexAngledStringLiteral more like the loops in LexStringLiteral, LexCharConstant. When we skip a character after backslash, we need to check if we reached the end of the file instead of reading the next cha

[PATCH] D41311: [CodeGen] Fix crash when a function taking transparent union is redeclared.

2017-12-19 Thread Volodymyr Sapsai via Phabricator via cfe-commits
vsapsai added inline comments. Comment at: clang/lib/CodeGen/CGCall.cpp:2321 + !isa(ConvertType(Arg->getType())) && ArgI.getCoerceToType() == ConvertType(Ty) && ArgI.getDirectOffset() == 0) { rjmccall wrote: > I think the right fix

[PATCH] D41311: [CodeGen] Fix crash when a function taking transparent union is redeclared.

2017-12-20 Thread Volodymyr Sapsai via Phabricator via cfe-commits
vsapsai added inline comments. Comment at: clang/lib/CodeGen/CGCall.cpp:2321 + !isa(ConvertType(Arg->getType())) && ArgI.getCoerceToType() == ConvertType(Ty) && ArgI.getDirectOffset() == 0) { vsapsai wrote: > rjmccall wrote: > > I t

[PATCH] D41311: [CodeGen] Fix crash when a function taking transparent union is redeclared.

2017-12-20 Thread Volodymyr Sapsai via Phabricator via cfe-commits
vsapsai updated this revision to Diff 127779. vsapsai added a comment. - Address review comment, compare ArgI type with Arg type. Update tests to account for coerced store when types don't match. https://reviews.llvm.org/D41311 Files: clang/lib/CodeGen/CGCall.cpp clang/test/CodeGen/kr-func

[PATCH] D41311: [CodeGen] Fix crash when a function taking transparent union is redeclared.

2017-12-21 Thread Volodymyr Sapsai via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC321296: [CodeGen] Fix crash when a function taking transparent union is redeclared. (authored by vsapsai, committed by ). Changed prior to commit: https://reviews.llvm.org/D41311?vs=127779&id=127923#toc

[PATCH] D41528: [Sema] Don't emit the -Wstrict-prototypes warning for variadic functions.

2017-12-21 Thread Volodymyr Sapsai via Phabricator via cfe-commits
vsapsai created this revision. vsapsai added reviewers: arphaman, ahatanak. rdar://problem/33251668 https://reviews.llvm.org/D41528 Files: clang/lib/Sema/SemaType.cpp clang/test/Sema/warn-strict-prototypes.c Index: clang/test/Sema/warn-strict-prototypes.c =

[PATCH] D41528: [Sema] Don't emit the -Wstrict-prototypes warning for variadic functions.

2018-01-02 Thread Volodymyr Sapsai via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL321660: [Sema] Don't emit the -Wstrict-prototypes warning for variadic functions. (authored by vsapsai, committed by ). Changed prior to commit: https://reviews.llvm.org/D41528?vs=127965&id=128430#toc

[PATCH] D23934: Add a -ffixed-date-time= flag that sets the initial value of __DATE__, __TIME__, __TIMESTAMP__

2018-01-02 Thread Volodymyr Sapsai via Phabricator via cfe-commits
vsapsai added a comment. Cannot tell for sure from code but looks like we are still emitting `-Wdate-time` "expansion of date or time macro is not reproducible" with this flag. At least it's not covered by tests. And another similar warning is `-Wpch-date-time`. https://reviews.llvm.org/D2393

[PATCH] D41688: [Lex] Fix crash on code completion in comment in included file.

2018-01-02 Thread Volodymyr Sapsai via Phabricator via cfe-commits
vsapsai created this revision. vsapsai added reviewers: akyrtzi, doug.gregor. Herald added subscribers: kbarton, nemanjai. This fixes PR32732 by updating CurLexerKind to reflect available lexers. We were hitting null pointer in Preprocessor::Lex because CurLexerKind was CLK_Lexer but CurLexer was

[PATCH] D41688: [Lex] Fix crash on code completion in comment in included file.

2018-01-02 Thread Volodymyr Sapsai via Phabricator via cfe-commits
vsapsai added a comment. A few approaches that I've considered but decided not to pursue: - Change code completion in comment so we don't exit file early but more gracefully. Decided not to do it because I believe early exit is important for code completion performance. And `CurLexer`/`CurLexer

[PATCH] D41311: [CodeGen] Fix crash when a function taking transparent union is redeclared.

2018-01-04 Thread Volodymyr Sapsai via Phabricator via cfe-commits
vsapsai reopened this revision. vsapsai added a comment. This revision is now accepted and ready to land. The fix wasn't entirely correct and was reverted in r321306 as it caused test failures FAIL: imp.execution_time FAIL: 2007-01-04-KNR-Args.execution_time FAIL: sse_expandfft.execution_time FA

[PATCH] D41311: [CodeGen] Fix crash when a function taking transparent union is redeclared.

2018-01-04 Thread Volodymyr Sapsai via Phabricator via cfe-commits
vsapsai updated this revision to Diff 128643. vsapsai added a comment. - Fix using CreateCoercedStore for promoted float parameters. For promoted parameters double -> float conversion should use fptrunc, not casting through memory preserving bits. Tried to change CreateCoercedStore to do CreateFP

[PATCH] D41311: [CodeGen] Fix crash when a function taking transparent union is redeclared.

2018-01-04 Thread Volodymyr Sapsai via Phabricator via cfe-commits
vsapsai added a subscriber: ahatanak. vsapsai added a comment. Add Akira as __fp16 expert to make sure I don't break some edge cases. https://reviews.llvm.org/D41311 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-b

[PATCH] D41750: Fix TLS support check for Darwin 32-bit simulator targets.

2018-01-04 Thread Volodymyr Sapsai via Phabricator via cfe-commits
vsapsai created this revision. vsapsai added reviewers: arphaman, bob.wilson. Also instead of checking architecture explicitly, use recently added "simulator" environment in the triple. rdar://problem/35083787 https://reviews.llvm.org/D41750 Files: clang/lib/Basic/Targets/OSTargets.h clang

[PATCH] D41423: [Lex] Avoid out-of-bounds dereference in LexAngledStringLiteral.

2018-01-05 Thread Volodymyr Sapsai via Phabricator via cfe-commits
vsapsai added a comment. Ping. OSS-Fuzz classifies the bug as medium severity security issue, would be great to include the fix in Clang 6.0. https://reviews.llvm.org/D41423 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.

[PATCH] D41750: Fix TLS support check for Darwin 32-bit simulator targets.

2018-01-05 Thread Volodymyr Sapsai via Phabricator via cfe-commits
vsapsai added a comment. Thanks for prompt review. https://reviews.llvm.org/D41750 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D41750: Fix TLS support check for Darwin 32-bit simulator targets.

2018-01-05 Thread Volodymyr Sapsai via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL321890: Fix TLS support check for Darwin 32-bit simulator targets. (authored by vsapsai, committed by ). Changed prior to commit: https://reviews.llvm.org/D41750?vs=128696&id=128783#toc Repository: r

[PATCH] D41834: [Lex] Fix handling numerical literals ending with ' and signed exponent.

2018-01-08 Thread Volodymyr Sapsai via Phabricator via cfe-commits
vsapsai created this revision. vsapsai added reviewers: rsmith, t.p.northover. For input `0'e+1` lexer tokenized as numeric constant only `0'e`. Later NumericLiteralParser skipped 0 and ' as digits and parsed `e+1` as valid exponent going past the end of the token. Because it didn't mark numeric l

[PATCH] D41834: [Lex] Fix handling numerical literals ending with ' and signed exponent.

2018-01-08 Thread Volodymyr Sapsai via Phabricator via cfe-commits
vsapsai added a comment. This fixes the OSS-Fuzz bug but I don't know if it is sufficient. Should I also make `Lexer::LexNumericConstant` to include `+1` part as tok::numeric_constant? https://reviews.llvm.org/D41834 ___ cfe-commits mailing list cf

[PATCH] D41834: [Lex] Fix handling numerical literals ending with ' and signed exponent.

2018-01-08 Thread Volodymyr Sapsai via Phabricator via cfe-commits
vsapsai planned changes to this revision. vsapsai added a comment. Yep, the plan sounds reasonable. I also noticed that we have if (*s == '+' || *s == '-') s++; // sign code in `NumericLiteralParser::ParseNumberStartingWithZero` too. I plan to make the same change for hexadecimal numbers and

[PATCH] D41834: [Lex] Fix handling numerical literals ending with ' and signed exponent.

2018-01-09 Thread Volodymyr Sapsai via Phabricator via cfe-commits
vsapsai updated this revision to Diff 129125. vsapsai added a comment. - Don't parse exponent past the end of token, add same test+fix for hexadecimal numbers. https://reviews.llvm.org/D41834 Files: clang/lib/Lex/LiteralSupport.cpp clang/test/Lexer/cxx1y_digit_separators.cpp Index: clang

[PATCH] D40677: [libcxx] Make std::basic_istream::get 0-terminate input array in case of error.

2018-01-09 Thread Volodymyr Sapsai via Phabricator via cfe-commits
vsapsai added a comment. Ping. https://reviews.llvm.org/D40677 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D41423: [Lex] Avoid out-of-bounds dereference in LexAngledStringLiteral.

2018-01-10 Thread Volodymyr Sapsai via Phabricator via cfe-commits
vsapsai updated this revision to Diff 129346. vsapsai added a comment. - Remove rdar link from the comment per review. Also rebased on top of master so diff between diffs can be noisy. https://reviews.llvm.org/D41423 Files: clang/lib/Lex/Lexer.cpp clang/unittests/Lex/LexerTest.cpp Index:

[PATCH] D41423: [Lex] Avoid out-of-bounds dereference in LexAngledStringLiteral.

2018-01-10 Thread Volodymyr Sapsai via Phabricator via cfe-commits
vsapsai marked an inline comment as done. vsapsai added inline comments. Comment at: clang/lib/Lex/Lexer.cpp:2014-2015 +// getAndAdvanceChar. +if (C == '\\') + C = getAndAdvanceChar(CurPtr, Result); + dexonsmith wrote: > If `CurPtr` is already equal

[PATCH] D41311: [CodeGen] Fix crash when a function taking transparent union is redeclared.

2018-01-10 Thread Volodymyr Sapsai via Phabricator via cfe-commits
vsapsai added inline comments. Comment at: clang/lib/CodeGen/CGCall.cpp:2321 + ArgI.getCoerceToType() == + ConvertType(isPromoted ? Ty : Arg->getType()) && ArgI.getDirectOffset() == 0) { ahatanak wrote: > Maybe a comment explainin

[PATCH] D41423: [Lex] Avoid out-of-bounds dereference in LexAngledStringLiteral.

2018-01-10 Thread Volodymyr Sapsai via Phabricator via cfe-commits
vsapsai updated this revision to Diff 129379. vsapsai added a comment. - Add a test for null character in string/character literals. https://reviews.llvm.org/D41423 Files: clang/lib/Lex/Lexer.cpp clang/test/Lexer/null-character-in-literal.c clang/unittests/Lex/LexerTest.cpp Index: clang

[PATCH] D41423: [Lex] Avoid out-of-bounds dereference in LexAngledStringLiteral.

2018-01-10 Thread Volodymyr Sapsai via Phabricator via cfe-commits
vsapsai marked 2 inline comments as done. vsapsai added inline comments. Comment at: clang/lib/Lex/Lexer.cpp:2026 + +if (C == 0) { NulCharacter = CurPtr-1; dexonsmith wrote: > vsapsai wrote: > > dexonsmith wrote: > > > Should this check still be skippe

[PATCH] D41423: [Lex] Avoid out-of-bounds dereference in LexAngledStringLiteral.

2018-01-10 Thread Volodymyr Sapsai via Phabricator via cfe-commits
vsapsai marked an inline comment as done. vsapsai added inline comments. Comment at: clang/lib/Lex/Lexer.cpp:2026 + +if (C == 0) { NulCharacter = CurPtr-1; vsapsai wrote: > dexonsmith wrote: > > vsapsai wrote: > > > dexonsmith wrote: > > > > Should thi

[PATCH] D41423: [Lex] Avoid out-of-bounds dereference in LexAngledStringLiteral.

2018-01-11 Thread Volodymyr Sapsai via Phabricator via cfe-commits
vsapsai added inline comments. Comment at: clang/lib/Lex/Lexer.cpp:2012-2015 +// Skip escaped characters. Escaped newlines will already be processed by +// getAndAdvanceChar. +if (C == '\\') + C = getAndAdvanceChar(CurPtr, Result); rsmith wrote:

[PATCH] D42755: [libcxx] Fix last_write_time tests for filesystems that don't support very small times.

2018-02-28 Thread Volodymyr Sapsai via Phabricator via cfe-commits
vsapsai added a comment. I am going to commit this change as I've addressed the review comments. If anybody has anything else to add, we can discuss that in post-commit review. https://reviews.llvm.org/D42755 ___ cfe-commits mailing list cfe-commit

[PATCH] D42755: [libcxx] Fix last_write_time tests for filesystems that don't support very small times.

2018-02-28 Thread Volodymyr Sapsai via Phabricator via cfe-commits
This revision was not accepted when it landed; it landed in state "Needs Review". This revision was automatically updated to reflect the committed changes. Closed by commit rL326383: [libcxx] Fix last_write_time test for filesystems that don't support very small… (authored by vsapsai, committed b

[PATCH] D42938: [Sema] Emit -Winteger-overflow for arguments in function calls, ObjC messages.

2018-03-01 Thread Volodymyr Sapsai via Phabricator via cfe-commits
vsapsai added a comment. Ping. It would be helpful to know how reasonable is the idea to handle more expression types in `Sema::CheckForIntOverflow`. https://reviews.llvm.org/D42938 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lis

[PATCH] D42938: [Sema] Emit -Winteger-overflow for arguments in function calls, ObjC messages.

2018-03-02 Thread Volodymyr Sapsai via Phabricator via cfe-commits
vsapsai added a comment. In https://reviews.llvm.org/D42938#1025151, @jkorous-apple wrote: > Maybe a stupid idea but in case it makes sense to add these expression types > could we also add integer template arguments? The idea isn't stupid but I think it is already handled. For template voi

[PATCH] D44103: Adding additional UNSUPPORTED platform in libcxx/test/std/strings/basic.string/string.cons/iter_alloc_deduction.fail.cpp

2018-03-05 Thread Volodymyr Sapsai via Phabricator via cfe-commits
vsapsai added a comment. In https://reviews.llvm.org/D44103#1027664, @vsk wrote: > Is the test expected to pass with clang-902? If not, then it'd be best to use > "apple-clang-9" instead of "apple-clang-9.0". That means that most likely it should be `apple-clang-8` instead of 8.0. But on the

[PATCH] D43494: [Modules] Fix creating fake definition data for lambdas.

2018-03-06 Thread Volodymyr Sapsai via Phabricator via cfe-commits
vsapsai added a comment. Ping. https://reviews.llvm.org/D43494 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D43494: [Modules] Fix creating fake definition data for lambdas.

2018-03-06 Thread Volodymyr Sapsai via Phabricator via cfe-commits
vsapsai updated this revision to Diff 137299. vsapsai added a comment. - Don't set to-be-deserialized definition data if there is another decl with definition data. https://reviews.llvm.org/D43494 Files: clang/lib/Serialization/ASTReaderDecl.cpp clang/test/Modules/Inputs/self-referencing-l

[PATCH] D43494: [Modules] Fix creating fake definition data for lambdas.

2018-03-06 Thread Volodymyr Sapsai via Phabricator via cfe-commits
vsapsai added inline comments. Comment at: clang/lib/Serialization/ASTReaderDecl.cpp:1795 CXXRecordDecl *Canon = D->getCanonicalDecl(); - if (Canon->DefinitionData) { + if (Canon->DefinitionData && Canon->DefinitionData != DD) { MergeDefinitionData(Canon, std::move(*DD)

[PATCH] D43494: [Modules] Fix creating fake definition data for lambdas.

2018-03-09 Thread Volodymyr Sapsai via Phabricator via cfe-commits
vsapsai updated this revision to Diff 137801. vsapsai added a comment. - Claim the definition data more eagerly. Not sure that added "different" in the existing comment is actually useful. It makes sense to me but don't know about others. https://reviews.llvm.org/D43494 Files: clang/lib/Seri

[PATCH] D43494: [Modules] Fix creating fake definition data for lambdas.

2018-03-09 Thread Volodymyr Sapsai via Phabricator via cfe-commits
vsapsai added inline comments. Comment at: clang/lib/Serialization/ASTReaderDecl.cpp:1811 if (Update || Canon != D) { Canon->DefinitionData = D->DefinitionData; Reader.PendingDefinitions.insert(D); This store seems to be dead too. Need to spend more

[PATCH] D43494: [Modules] Fix creating fake definition data for lambdas.

2018-03-12 Thread Volodymyr Sapsai via Phabricator via cfe-commits
vsapsai updated this revision to Diff 138059. vsapsai added a comment. - Some more cleanup. NFC. https://reviews.llvm.org/D43494 Files: clang/lib/Serialization/ASTReaderDecl.cpp clang/test/Modules/Inputs/self-referencing-lambda/a.h clang/test/Modules/Inputs/self-referencing-lambda/module.

[PATCH] D43494: [Modules] Fix creating fake definition data for lambdas.

2018-03-12 Thread Volodymyr Sapsai via Phabricator via cfe-commits
vsapsai marked 6 inline comments as done. vsapsai added inline comments. Comment at: clang/lib/Serialization/ASTReaderDecl.cpp:1798 + // already done some merging. Either way, just merge into it. + if (Canon->DefinitionData && Canon->DefinitionData != DD) { MergeDefinition

[PATCH] D44449: [Parser] Fix assertion-on-invalid for unexpected typename.

2018-03-13 Thread Volodymyr Sapsai via Phabricator via cfe-commits
vsapsai created this revision. vsapsai added reviewers: rsmith, arphaman. Herald added a subscriber: jkorous-apple. In `ParseDeclarationSpecifiers` for the code class A typename A; we were able to annotate token `kw_typename` because it refers to existing type. But later during processing toke

[PATCH] D44449: [Parser] Fix assertion-on-invalid for unexpected typename.

2018-03-13 Thread Volodymyr Sapsai via Phabricator via cfe-commits
vsapsai added a comment. I had performance considerations regarding this change because `ConsumeAnyToken` is heavier than `ConsumeToken`. But I didn't notice any problems. If you know this is a hot path that deserves more attention, please let me know. Comment at: clang/lib/

[PATCH] D44589: [Sema] Make deprecation fix-it replace all multi-parameter ObjC method slots.

2018-03-16 Thread Volodymyr Sapsai via Phabricator via cfe-commits
vsapsai created this revision. vsapsai added reviewers: aaron.ballman, erik.pilkington. Herald added a subscriber: jkorous-apple. Deprecation replacement can be any text but if it looks like a name of ObjC method and has the same number of arguments as original method, replace all slot names so af

[PATCH] D44589: [Sema] Make deprecation fix-it replace all multi-parameter ObjC method slots.

2018-03-16 Thread Volodymyr Sapsai via Phabricator via cfe-commits
vsapsai added inline comments. Comment at: clang/lib/Sema/SemaDeclAttr.cpp:7207-7217 +} else { + FixIts.push_back(FixItHint::CreateInsertion( + SelectorLocs[I], SelectorSlotNames[I])); +} + } +} else { +

[PATCH] D43494: [Modules] Fix creating fake definition data for lambdas.

2018-03-19 Thread Volodymyr Sapsai via Phabricator via cfe-commits
vsapsai added a comment. I think we have agreement on this change. If there are no objections, I plan to commit it on Wednesday, March 21. https://reviews.llvm.org/D43494 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org

[PATCH] D47557: Filesystem tests: un-confuse write time

2018-05-30 Thread Volodymyr Sapsai via Phabricator via cfe-commits
vsapsai added inline comments. Comment at: test/std/experimental/filesystem/fs.op.funcs/fs.op.last_write_time/last_write_time.pass.cpp:257-258 TEST_CHECK(dtime2 > dtime); -TEST_CHECK(LastAccessTime(file) == file_access_time || - LastAccessTime(file) == Clo

[PATCH] D47557: Filesystem tests: un-confuse write time

2018-05-30 Thread Volodymyr Sapsai via Phabricator via cfe-commits
vsapsai added inline comments. Comment at: test/std/experimental/filesystem/fs.op.funcs/fs.op.last_write_time/last_write_time.pass.cpp:257-258 TEST_CHECK(dtime2 > dtime); -TEST_CHECK(LastAccessTime(file) == file_access_time || - LastAccessTime(file) == Clo

[PATCH] D47301: Warning for framework include violation from Headers to PrivateHeaders

2018-06-08 Thread Volodymyr Sapsai via Phabricator via cfe-commits
vsapsai added inline comments. Comment at: lib/Lex/HeaderSearch.cpp:683 + // from Foo.framework/PrivateHeaders, since this violates public/private + // api boundaries and can cause modular dependency cycles. + if (!IsIncluderPrivateHeader && IsIncludeeInFramework && --

[PATCH] D45015: [Preprocessor] Allow libc++ to detect when aligned allocation is unavailable.

2018-06-08 Thread Volodymyr Sapsai via Phabricator via cfe-commits
vsapsai added a comment. Sorry for the churn but can you please take out `-nostdinc++` part out of this change? After more thinking and discussion we think there is a chance developers can use `-nostdinc++` not only for building the standard library. `-nostdinc++` is a signal of building the st

[PATCH] D45015: [Preprocessor] Allow libc++ to detect when aligned allocation is unavailable.

2018-06-08 Thread Volodymyr Sapsai via Phabricator via cfe-commits
vsapsai added a comment. In https://reviews.llvm.org/D45015#1121762, @EricWF wrote: > In https://reviews.llvm.org/D45015#1121581, @ahatanak wrote: > > > Could you elaborate on what kind of changes you are planning to make in > > libc++ after committing this patch? > > > Libc++ shouldn't actually

[PATCH] D47341: [Sema] Fix infinite typo correction loop.

2018-06-11 Thread Volodymyr Sapsai via Phabricator via cfe-commits
vsapsai added a comment. Ping. https://reviews.llvm.org/D47341 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D45015: [Preprocessor] Allow libc++ to detect when aligned allocation is unavailable.

2018-06-11 Thread Volodymyr Sapsai via Phabricator via cfe-commits
vsapsai added a comment. With this change and the mentioned libc++ change the tests with old libc++ dylib are passing (didn't test all possible configurations though). Would like to get more feedback from other reviewers on this matter. https://reviews.llvm.org/D45015 __

[PATCH] D48297: [Darwin] Add a warning for missing include path for libstdc++

2018-06-18 Thread Volodymyr Sapsai via Phabricator via cfe-commits
vsapsai added inline comments. Comment at: lib/Frontend/InitHeaderSearch.cpp:374-377 + IsBaseFound = AddGnuCPlusPlusIncludePaths("/usr/include/c++/4.2.1", +"powerpc-apple-darwin10", "", +

[PATCH] D47341: [Sema] Fix infinite typo correction loop.

2018-06-18 Thread Volodymyr Sapsai via Phabricator via cfe-commits
vsapsai added a comment. Ping. https://reviews.llvm.org/D47341 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D48342: [libcxx] Optimize vectors construction of trivial types from an iterator range with const-ness mismatch.

2018-06-19 Thread Volodymyr Sapsai via Phabricator via cfe-commits
vsapsai created this revision. vsapsai added reviewers: mclow.lists, EricWF. Herald added a subscriber: christof. We already have a specialization that will use memcpy for construction of trivial types from an iterator range like std::vector(int *, int *); But if we have const-ness mismatch li

[PATCH] D48342: [libcxx] Optimize vectors construction of trivial types from an iterator range with const-ness mismatch.

2018-06-19 Thread Volodymyr Sapsai via Phabricator via cfe-commits
vsapsai added a comment. Related change is https://reviews.llvm.org/D8109 For me the performance improvement was a twice faster execution on a dirty benchmark that doesn't exclude set up and tear down. https://reviews.llvm.org/D48342 ___ cfe-commi

[PATCH] D47301: Warning for framework include violation from Headers to PrivateHeaders

2018-06-22 Thread Volodymyr Sapsai via Phabricator via cfe-commits
vsapsai accepted this revision. vsapsai added a comment. This revision is now accepted and ready to land. Looks good to me. The only problem is I'm not entirely sure this warning will interact with real code the way I expect it to. We'll need to keep an eye on it and tweak if necessary. https:

[PATCH] D53228: [VFS] Remove 'ignore-non-existent-contents' attribute for YAML-based VFS.

2018-10-12 Thread Volodymyr Sapsai via Phabricator via cfe-commits
vsapsai created this revision. vsapsai added a reviewer: bruno. Herald added subscribers: dexonsmith, hiraditya. 'ignore-non-existent-contents' stopped working after r342232 in a way that the actual attribute value isn't used and it works as if it is always `true`. Common use case for VFS iterati

[PATCH] D50539: [VFS] Add property 'fallthrough' that controls fallback to real file system.

2018-10-16 Thread Volodymyr Sapsai via Phabricator via cfe-commits
vsapsai updated this revision to Diff 169849. vsapsai added a comment. Herald added a subscriber: hiraditya. - Rebase on top of the latest changes in trunk. - Address review comments. I expect diff between diffs to be noisy due to rebase. https://reviews.llvm.org/D50539 Files: clang/lib/Fron

[PATCH] D50539: [VFS] Add property 'fallthrough' that controls fallback to real file system.

2018-10-16 Thread Volodymyr Sapsai via Phabricator via cfe-commits
vsapsai marked 5 inline comments as done. vsapsai added inline comments. Comment at: clang/lib/Basic/VirtualFileSystem.cpp:934 RedirectingFileSystem &FS; RedirectingDirectoryEntry::iterator Current, End; + bool IsExternalFSCurrent; bruno wrote: > Can you a

[PATCH] D50539: [VFS] Add property 'fallthrough' that controls fallback to real file system.

2018-10-16 Thread Volodymyr Sapsai via Phabricator via cfe-commits
vsapsai marked 3 inline comments as done. vsapsai added a comment. In https://reviews.llvm.org/D50539#1241034, @bruno wrote: > > - Current way of working with modules in VFS "root" is clunky and > > error-prone. > > Why? Mostly because when you approach it in a straightforward way, you cannot

[PATCH] D47687: [Sema] Missing -Wlogical-op-parentheses warnings in macros (PR18971)

2018-10-16 Thread Volodymyr Sapsai via Phabricator via cfe-commits
vsapsai added a comment. Sorry about the delay. The change seems to be correct but `ninja check-clang` reveals the test "Misc/caret-diags-macros.c" is failing. Can you please look into that? Appreciate your contribution, Xing, and thanks for verifying your change with tests. ===

[PATCH] D53522: [Frontend] Include module map header declaration in dependency file output

2018-10-23 Thread Volodymyr Sapsai via Phabricator via cfe-commits
vsapsai added a comment. Have a few comments but didn't try to come up with edge cases yet. Comment at: clang/include/clang/Lex/ModuleMap.h:649-650 + ///This can differ from \c Header's name due to symlinks. void addHeader(Module *Mod, Module::Header Header, -

[PATCH] D53522: [Frontend] Include module map header declaration in dependency file output

2018-10-23 Thread Volodymyr Sapsai via Phabricator via cfe-commits
vsapsai added inline comments. Comment at: clang/test/Modules/dependency-file-symlinks.c:3 + +// RUN: rm -fr %t +// RUN: mkdir -p %t/cache Oh, and can you please change the order of flags, so it is `rm -rf %t`? The real reason is my personal preference but `-rf`

[PATCH] D50539: [VFS] Add property 'fallthrough' that controls fallback to real file system.

2018-10-23 Thread Volodymyr Sapsai via Phabricator via cfe-commits
vsapsai added a comment. In https://reviews.llvm.org/D50539#1272924, @bruno wrote: > LGTM with some minor changes. I was using `//` instead of `///` on purpose. Class `VFSFromYamlDirIterImpl` resides entirely in .cpp file and isn't available outside of it. Comments are supposed to cover imple

[PATCH] D53674: [CodeGen] Fix assertion on referencing constexpr Obj-C object with ARC.

2018-10-24 Thread Volodymyr Sapsai via Phabricator via cfe-commits
vsapsai created this revision. vsapsai added reviewers: ahatanak, rjmccall. Herald added a subscriber: dexonsmith. Failed assertion is > Assertion failed: ((ND->isUsed(false) || !isa(ND) || > !E->getLocation().isValid()) && "Should not use decl without marking it > used!"), function EmitDeclRef

[PATCH] D53228: [VFS] Remove 'ignore-non-existent-contents' attribute for YAML-based VFS.

2018-10-24 Thread Volodymyr Sapsai via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC345212: [VFS] Remove 'ignore-non-existent-contents' attribute for YAML-based VFS. (authored by vsapsai, committed by ). Changed prior to commit: https://reviews.llvm.org/D53228?vs=169520&id=171010#toc

[PATCH] D53228: [VFS] Remove 'ignore-non-existent-contents' attribute for YAML-based VFS.

2018-10-24 Thread Volodymyr Sapsai via Phabricator via cfe-commits
vsapsai added a comment. Thanks for the review. Repository: rC Clang https://reviews.llvm.org/D53228 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D53674: [CodeGen] Fix assertion on referencing constexpr Obj-C object with ARC.

2018-10-25 Thread Volodymyr Sapsai via Phabricator via cfe-commits
vsapsai added inline comments. Comment at: clang/lib/CodeGen/CGObjC.cpp:2480 + SuppressResultRetain); } rjmccall wrote: > This switch is just checking what you already computed as > `SuppressResultRetain`. Please just assert in the

[PATCH] D53674: [CodeGen] Fix assertion on referencing constexpr Obj-C object with ARC.

2018-10-25 Thread Volodymyr Sapsai via Phabricator via cfe-commits
vsapsai updated this revision to Diff 171168. vsapsai added a comment. - Address review comments. https://reviews.llvm.org/D53674 Files: clang/lib/CodeGen/CGExpr.cpp clang/lib/CodeGen/CGExprScalar.cpp clang/lib/CodeGen/CGObjC.cpp clang/lib/CodeGen/CodeGenFunction.h clang/test/CodeGenO

[PATCH] D53725: [CodeGen] Move `emitConstant` from ScalarExprEmitter to CodeGenFunction. NFC.

2018-10-25 Thread Volodymyr Sapsai via Phabricator via cfe-commits
vsapsai created this revision. vsapsai added reviewers: rjmccall, ahatanak. Herald added a subscriber: dexonsmith. The goal is to use `emitConstant` in more places. Didn't move `ComplexExprEmitter::emitConstant` because it returns a different type. https://reviews.llvm.org/D53725 Files: clang

[PATCH] D53674: [CodeGen] Fix assertion on referencing constexpr Obj-C object with ARC.

2018-10-25 Thread Volodymyr Sapsai via Phabricator via cfe-commits
vsapsai marked 2 inline comments as done. vsapsai added inline comments. Comment at: clang/lib/CodeGen/CGObjC.cpp:2527 + return TryEmitResult(CGF.EmitScalarExpr(e), + !shouldRetainObjCLifetime(type.getObjCLifetime())); + } vsapsai

[PATCH] D50539: [VFS] Add property 'fallthrough' that controls fallback to real file system.

2018-10-25 Thread Volodymyr Sapsai via Phabricator via cfe-commits
vsapsai added a comment. In https://reviews.llvm.org/D50539#1273688, @dexonsmith wrote: > In https://reviews.llvm.org/D50539#1273654, @vsapsai wrote: > > > I was using `//` instead of `///` on purpose. Class > > `VFSFromYamlDirIterImpl` resides entirely in .cpp file and isn't available > > outs

[PATCH] D50539: [VFS] Add property 'fallthrough' that controls fallback to real file system.

2018-10-25 Thread Volodymyr Sapsai via Phabricator via cfe-commits
vsapsai updated this revision to Diff 171210. vsapsai added a comment. - Rebase once again. - Use Doxygen comments in some places. https://reviews.llvm.org/D50539 Files: clang/lib/Frontend/CompilerInvocation.cpp clang/test/VFS/Inputs/Broken.framework/Headers/Error.h clang/test/VFS/Inputs/

[PATCH] D50539: [VFS] Add property 'fallthrough' that controls fallback to real file system.

2018-10-26 Thread Volodymyr Sapsai via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL345431: [VFS] Add property 'fallthrough' that controls fallback to real file system. (authored by vsapsai, committed by ). Herald added subscribers: llvm-commits, kristina. Changed prior to commit: http

[PATCH] D53725: [CodeGen] Move `emitConstant` from ScalarExprEmitter to CodeGenFunction. NFC.

2018-10-30 Thread Volodymyr Sapsai via Phabricator via cfe-commits
vsapsai updated this revision to Diff 171751. vsapsai added a comment. - Rename `EmitConstant` to `EmitScalarConstant`. https://reviews.llvm.org/D53725 Files: clang/lib/CodeGen/CGExpr.cpp clang/lib/CodeGen/CGExprScalar.cpp clang/lib/CodeGen/CodeGenFunction.h Index: clang/lib/CodeGen/Cod

[PATCH] D53725: [CodeGen] Move `emitConstant` from ScalarExprEmitter to CodeGenFunction. NFC.

2018-10-30 Thread Volodymyr Sapsai via Phabricator via cfe-commits
vsapsai added a comment. In https://reviews.llvm.org/D53725#1278067, @rjmccall wrote: > This should at least be named `emitScalarConstant`. Agree. I've just capitalized 'e' as it looks like the majority of `Emit...` methods are capitalized that way. https://reviews.llvm.org/D53725 ___

[PATCH] D56631: [MSVC Compat] Fix typo correction for inclusion directives.

2019-01-11 Thread Volodymyr Sapsai via Phabricator via cfe-commits
vsapsai created this revision. vsapsai added reviewers: christylee, compnerd. Herald added subscribers: dexonsmith, jkorous. In MSVC compatibility mode we were checking not the typo corrected filename but the original filename. https://reviews.llvm.org/D56631 Files: clang/lib/Lex/PPDirectives

[PATCH] D56631: [MSVC Compat] Fix typo correction for inclusion directives.

2019-01-15 Thread Volodymyr Sapsai via Phabricator via cfe-commits
vsapsai added a comment. Thanks for the review. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D56631/new/ https://reviews.llvm.org/D56631 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/

[PATCH] D56631: [MSVC Compat] Fix typo correction for inclusion directives.

2019-01-15 Thread Volodymyr Sapsai via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL351232: [MSVC Compat] Fix typo correction for inclusion directives. (authored by vsapsai, committed by ). Herald added a subscriber: llvm-commits. Changed prior to commit: https://reviews.llvm.org/D5663

[PATCH] D56766: [Frontend] Make WrapperFrontendAction call WrappedAction.PrepareToExecuteAction.

2019-01-15 Thread Volodymyr Sapsai via Phabricator via cfe-commits
vsapsai created this revision. vsapsai added a reviewer: rsmith. Herald added subscribers: dexonsmith, jkorous. Fixes `-emit-header-module` when GenerateHeaderModuleAction is wrapped by another frontend action. rdar://problem/47302588 https://reviews.llvm.org/D56766 Files: clang/include/clan

[PATCH] D56766: [Frontend] Make WrapperFrontendAction call WrappedAction.PrepareToExecuteAction.

2019-01-16 Thread Volodymyr Sapsai via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC351402: [Frontend] Make WrapperFrontendAction call WrappedAction.PrepareToExecuteAction. (authored by vsapsai, committed by ). Changed prior to commit: https://reviews.llvm.org/D56766?vs=181946&id=18218

[PATCH] D56766: [Frontend] Make WrapperFrontendAction call WrappedAction.PrepareToExecuteAction.

2019-01-16 Thread Volodymyr Sapsai via Phabricator via cfe-commits
vsapsai added a comment. Thanks for the review. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D56766/new/ https://reviews.llvm.org/D56766 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/c

[PATCH] D57075: [ObjC] For type substitution in generics use a regular recursive type visitor.

2019-01-22 Thread Volodymyr Sapsai via Phabricator via cfe-commits
vsapsai created this revision. vsapsai added reviewers: ahatanak, erik.pilkington. Herald added subscribers: dexonsmith, jkorous. Switch to the inheritance-based visitor from the lambda-based visitor to allow both preorder and postorder customizations during type transformation. NFC intended. ht

[PATCH] D57076: [ObjC generics] Fix applying `__kindof` to the type parameter.

2019-01-22 Thread Volodymyr Sapsai via Phabricator via cfe-commits
vsapsai created this revision. vsapsai added reviewers: ahatanak, erik.pilkington. Herald added subscribers: dexonsmith, jkorous. Fixes the warning about incompatible pointer types on assigning to a subclass of type argument an expression of type `__kindof TypeParam`. We already have a mechanism

[PATCH] D56561: [Preprocessor] For missing file in framework add note about framework location.

2019-01-23 Thread Volodymyr Sapsai via Phabricator via cfe-commits
vsapsai added a comment. Ping. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D56561/new/ https://reviews.llvm.org/D56561 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D57076: [ObjC generics] Fix applying `__kindof` to the type parameter.

2019-01-23 Thread Volodymyr Sapsai via Phabricator via cfe-commits
vsapsai added a comment. In D57076#1368407 , @jordan_rose wrote: > I //think// this is reasonable but Doug was the one who worked on this. I > wonder if it also helps with the test cases in rdar://problem/24619481. Yep, it helps with the test cases in r

[PATCH] D57076: [ObjC generics] Fix applying `__kindof` to the type parameter.

2019-01-23 Thread Volodymyr Sapsai via Phabricator via cfe-commits
vsapsai updated this revision to Diff 183216. vsapsai added a comment. Update diff to ignore parent patch. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D57076/new/ https://reviews.llvm.org/D57076 Files: clang/lib/AST/Type.cpp clang/test/SemaObjC/kindof.m Index: clang/test/SemaObjC

[PATCH] D57076: [ObjC generics] Fix applying `__kindof` to the type parameter.

2019-01-23 Thread Volodymyr Sapsai via Phabricator via cfe-commits
vsapsai updated this revision to Diff 183215. vsapsai added a comment. - Add a test that `__kindof` works with type sugar such as typedef. - Use early return to reduce nesting. Also it's consistent with the previous early returns. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D57076/new/

[PATCH] D57076: [ObjC generics] Fix applying `__kindof` to the type parameter.

2019-01-24 Thread Volodymyr Sapsai via Phabricator via cfe-commits
vsapsai marked 2 inline comments as done. vsapsai added inline comments. Comment at: clang/lib/AST/Type.cpp:1293 + +const auto *newAttrType = dyn_cast(newType.getTypePtr()); +if (newAttrType->getAttrKind() != attr::ObjCKindOf) doug.gregor wrote: > Either

[PATCH] D57076: [ObjC generics] Fix applying `__kindof` to the type parameter.

2019-01-24 Thread Volodymyr Sapsai via Phabricator via cfe-commits
vsapsai updated this revision to Diff 183338. vsapsai added a comment. - Address review comment: don't crash when AttributedType is transformed to another type class. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D57076/new/ https://reviews.llvm.org/D57076 Files: clang/lib/AST/Type.c

[PATCH] D57075: [ObjC] For type substitution in generics use a regular recursive type visitor.

2019-01-24 Thread Volodymyr Sapsai via Phabricator via cfe-commits
vsapsai planned changes to this revision. vsapsai added inline comments. Comment at: clang/lib/AST/Type.cpp:1295 + + QualType VisitObjCObjectType(const ObjCObjectType *objType) { +if (!objType->isKindOfType()) erik.pilkington wrote: > Does this works with ty

[PATCH] D57075: [ObjC] For type substitution in generics use a regular recursive type visitor.

2019-01-24 Thread Volodymyr Sapsai via Phabricator via cfe-commits
vsapsai updated this revision to Diff 183450. vsapsai added a comment. - Add a failing test case. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D57075/new/ https://reviews.llvm.org/D57075 Files: clang/lib/AST/Type.cpp clang/test/SemaObjC/parameterized_classes_subst.m Index: clang/t

[PATCH] D57075: [ObjC] For type substitution in generics use a regular recursive type visitor.

2019-01-24 Thread Volodymyr Sapsai via Phabricator via cfe-commits
vsapsai added a comment. I've added a test case with typedef and think it should be emitting a warning. I.e., the behaviour with typedef should be the same as without it, modulo different pretty-printing in diagnostic. The interesting part is that this test is failing even without my change. I'

[PATCH] D57075: [ObjC] For type substitution in generics use a regular recursive type visitor.

2019-01-25 Thread Volodymyr Sapsai via Phabricator via cfe-commits
vsapsai planned changes to this revision. vsapsai added inline comments. Comment at: clang/lib/AST/Type.cpp:1295 + + QualType VisitObjCObjectType(const ObjCObjectType *objType) { +if (!objType->isKindOfType()) vsapsai wrote: > erik.pilkington wrote: > > Does

[PATCH] D57270: [ObjC] Fix non-canonical types preventing type arguments substitution.

2019-01-25 Thread Volodymyr Sapsai via Phabricator via cfe-commits
vsapsai created this revision. vsapsai added reviewers: ahatanak, erik.pilkington. Herald added subscribers: dexonsmith, jkorous. `QualType::substObjCTypeArgs` doesn't go past non-canonical types and as the result misses some of the substitutions like `ObjCTypeParamType`. Update `SimpleTransformV

<    1   2   3   4   5   6   7   8   9   10   >