[PATCH] D56358: [AST] Move back BasePathSize to the bit-fields of CastExpr

2019-01-07 Thread John McCall via Phabricator via cfe-commits
rjmccall added inline comments. Comment at: include/clang/AST/Expr.h:3029 +assert((CastExprBits.BasePathSize == BasePathSize) && + "BasePathSize overflow!"); assert(CastConsistency()); riccibruno wrote: > lebedev.ri wrote: > > riccibruno wrote:

[PATCH] D56367: [AST] Pack CXXDependentScopeMemberExpr

2019-01-07 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. Does the regression disappear if you make the scope specifier the first trailing object? Later trailing objects are more expensive to access, and I would imagine that the scope specifier and template arguments are more important than the other fields. Repository:

[PATCH] D56368: [AST] Store the results in OverloadExpr in a trailing array

2019-01-07 Thread John McCall via Phabricator via cfe-commits
rjmccall accepted this revision. rjmccall added a comment. This revision is now accepted and ready to land. LGTM. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D56368/new/ https://reviews.llvm.org/D56368 ___ cfe-commi

[PATCH] D56365: [X86] Use funnel shift intrinsics for the VBMI2 vshld/vshrd builtins.

2019-01-07 Thread Craig Topper via Phabricator via cfe-commits
craig.topper updated this revision to Diff 180441. craig.topper added a comment. Rebase after fixing immediates to be in range without a modulo Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D56365/new/ https://reviews.llvm.org/D56365 Files: include/clang/Basic/

[PATCH] D56358: [AST] Move back BasePathSize to the bit-fields of CastExpr

2019-01-07 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri accepted this revision. lebedev.ri added a comment. This revision is now accepted and ready to land. LG in principle. Comment at: include/clang/AST/Expr.h:3029 +assert((CastExprBits.BasePathSize == BasePathSize) && + "BasePathSize overflow!"); asse

[PATCH] D56380: [clangd] Fix a regression issue caused by r348365.

2019-01-07 Thread Haojian Wu via Phabricator via cfe-commits
hokein created this revision. hokein added a reviewer: ilya-biryukov. Herald added subscribers: kadircet, arphaman, jkorous, MaskRay, ioeric. With r348365, we now detect libc++ dir using the actual compiler path (from the compilation command), rather than the resource-dir. This new behavior will

[PATCH] D56066: [OpenCL] Address space for default class members

2019-01-07 Thread Bevin Hansson via Phabricator via cfe-commits
ebevhan added inline comments. Comment at: lib/Sema/SemaInit.cpp:4539 + if (InitCategory.isPRValue() || InitCategory.isXValue()) +T1Quals.removeAddressSpace(); + rjmccall wrote: > rjmccall wrote: > > I can understand why a pr-value wouldn't have an address s

[PATCH] D56343: [clang-tidy] Refactor: Compose Method on check_clang_tidy.py

2019-01-07 Thread serge via Phabricator via cfe-commits
serge-sans-paille added inline comments. Comment at: test/clang-tidy/check_clang_tidy.py:103 + return (has_check_fixes, has_check_messages, has_check_notes, \ +check_fixes_prefixes, check_messages_prefixes, check_notes_prefixes) Such a long list of returne

Re: [clang-tools-extra] r349496 - [clangd] BackgroundIndex rebuilds symbol index periodically.

2019-01-07 Thread Diana Picus via cfe-commits
Hi Eric, This is still failing intermittently on AArch64 in spite of your and Ilya's timeout increases. Could you please revert and rework this test? Thanks, Diana http://lab.llvm.org:8011/builders/clang-cmake-aarch64-lld/builds/5872 http://lab.llvm.org:8011/builders/clang-cmake-aarch64-lld/buil

[PATCH] D56365: [X86] Use funnel shift intrinsics for the VBMI2 vshld/vshrd builtins.

2019-01-07 Thread Simon Pilgrim via Phabricator via cfe-commits
RKSimon accepted this revision. RKSimon added a comment. This revision is now accepted and ready to land. LGTM in conjunction with the fast-isel changes in D56377 Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D56365/new/ https://

[clang-tools-extra] r350512 - [clangd] Disable BackgroundIndexTest.PeriodicalIndex

2019-01-07 Thread Ilya Biryukov via cfe-commits
Author: ibiryukov Date: Mon Jan 7 03:18:11 2019 New Revision: 350512 URL: http://llvm.org/viewvc/llvm-project?rev=350512&view=rev Log: [clangd] Disable BackgroundIndexTest.PeriodicalIndex It sometimes fails on AArch64. Modified: clang-tools-extra/trunk/unittests/clangd/BackgroundIndexTests.

Re: [clang-tools-extra] r349496 - [clangd] BackgroundIndex rebuilds symbol index periodically.

2019-01-07 Thread Ilya Biryukov via cfe-commits
Temporarily disabled the test in r350512. On Mon, Jan 7, 2019 at 10:54 AM Diana Picus wrote: > Hi Eric, > > This is still failing intermittently on AArch64 in spite of your and > Ilya's timeout increases. Could you please revert and rework this > test? > > Thanks, > Diana > > http://lab.llvm.org

[PATCH] D56380: [clangd] Fix a regression issue caused by r348365.

2019-01-07 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov accepted this revision. ilya-biryukov added a comment. This revision is now accepted and ready to land. LGTM. Thanks Repository: rCTE Clang Tools Extra CHANGES SINCE LAST ACTION https://reviews.llvm.org/D56380/new/ https://reviews.llvm.org/D56380 __

[PATCH] D56314: [clangd] Don't store completion info if the symbol is not used for code completion.

2019-01-07 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added a comment. @hokein, do you need reviewers for this? I'm happy to volunteer. In D56314#1347511 , @nridge wrote: > Might we want to keep some of this information for `workspace/symbol`? I > mean, surely not "documentation", but perhaps

[PATCH] D53072: [clang-format] Introduce the flag which allows not to shrink lines

2019-01-07 Thread Ivan Donchevskii via Phabricator via cfe-commits
yvvan added a comment. In D53072#1342363 , @djasper wrote: > I don't quite understand. What you are describing should already be the > behavior with ColumnLimit=0 and I think your test should pass without the new > option. Doesn't it? As far as I see h

[PATCH] D55212: Handle alloc_size attribute on function pointers

2019-01-07 Thread Alexander Richardson via Phabricator via cfe-commits
arichardson added a comment. I don't see an easy way of fixing the pragma clang attribute support for this. Would it be okay to commit this change anyway? Since `alloc_size` is only used for very few functions I'd be very surprised if there's any existing code that relies on using `#pragma clang

[PATCH] D56385: clang-format: [JS] support goog.requireType.

2019-01-07 Thread Martin Probst via Phabricator via cfe-commits
mprobst created this revision. mprobst added a reviewer: krasimir. It's a new primitive for importing symbols, and should be treated like the (previously handled) `goog.require` and `goog.forwardDeclare`. Repository: rC Clang https://reviews.llvm.org/D56385 Files: lib/Format/TokenAnnotator

[PATCH] D54309: [AST] Allow limiting the scope of common AST traversals (getParents, RAV).

2019-01-07 Thread Sam McCall via Phabricator via cfe-commits
sammccall added a comment. In D54309#1320628 , @JonasToth wrote: > this patch "broke" `ExprMutAnalyzer`, at least it creates an assertion > failure that seems harmless. Your thought on it would be great! As mentioned on the bug, this assertion already e

Re: [clang-tools-extra] r349496 - [clangd] BackgroundIndex rebuilds symbol index periodically.

2019-01-07 Thread Diana Picus via cfe-commits
Thanks, Ilya! On Mon, 7 Jan 2019 at 12:22, Ilya Biryukov wrote: > > Temporarily disabled the test in r350512. > > On Mon, Jan 7, 2019 at 10:54 AM Diana Picus wrote: >> >> Hi Eric, >> >> This is still failing intermittently on AArch64 in spite of your and >> Ilya's timeout increases. Could you pl

[PATCH] D56380: [clangd] Fix a regression issue caused by r348365.

2019-01-07 Thread Haojian Wu via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rCTE350515: [clangd] Fix a regression issue caused by r348365. (authored by hokein, committed by ). Changed prior to commit: https://reviews.llvm.org/D56380?vs=180447&id=180460#toc Repository: rCTE Cla

[clang-tools-extra] r350515 - [clangd] Fix a regression issue caused by r348365.

2019-01-07 Thread Haojian Wu via cfe-commits
Author: hokein Date: Mon Jan 7 04:35:02 2019 New Revision: 350515 URL: http://llvm.org/viewvc/llvm-project?rev=350515&view=rev Log: [clangd] Fix a regression issue caused by r348365. Summary: With r348365, we now detect libc++ dir using the actual compiler path (from the compilation command), ra

[PATCH] D53072: [clang-format] Introduce the flag which allows not to shrink lines

2019-01-07 Thread Daniel Jasper via Phabricator via cfe-commits
djasper added a comment. $ cat /tmp/test.cc int foo(int a, int b) { f(); } $ clang-format -style="{ColumnLimit: 0}" /tmp/test.cc int foo(int a, int b) { f(); } Is this not what you want? If so, in what way? CHANGES SINCE LAST ACTION https://

[PATCH] D53072: [clang-format] Introduce the flag which allows not to shrink lines

2019-01-07 Thread Ivan Donchevskii via Phabricator via cfe-commits
yvvan added a comment. In D53072#1348033 , @djasper wrote: > $ cat /tmp/test.cc > int foo(int a, > int b) { > f(); > } > > $ clang-format -style="{ColumnLimit: 0}" /tmp/test.cc > int foo(int a, > int b) { >

[PATCH] D53072: [clang-format] Introduce the flag which allows not to shrink lines

2019-01-07 Thread Daniel Jasper via Phabricator via cfe-commits
djasper added a comment. Without understanding this in more detail I do not know how to move forward with this. What this patch is describing is what should already be the case with ColumnLimit set to zero. If it isn't this might be a bug or there might be a different way to move forward. Howev

[PATCH] D53072: [clang-format] Introduce the flag which allows not to shrink lines

2019-01-07 Thread Ivan Donchevskii via Phabricator via cfe-commits
yvvan added a comment. @djasper Ok, if there's a possible way to go forward I will find time to provide a better test which behaves differently depending on this check. Also my current patch is a bit bigger than this version. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D53072/new/ ht

[PATCH] D55948: Modify DeclaratorChuck::getFunction to use DeclSpec for qualifiers

2019-01-07 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia updated this revision to Diff 180464. Anastasia added a comment. Added `hasMethodTypeQualifiers` method. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55948/new/ https://reviews.llvm.org/D55948 Files: include/clang/Sema/DeclSpec.h lib/Parse/ParseDecl.cpp lib/Parse/Parse

[PATCH] D56358: [AST] Move back BasePathSize to the bit-fields of CastExpr

2019-01-07 Thread Bruno Ricci via Phabricator via cfe-commits
riccibruno marked an inline comment as done. riccibruno added inline comments. Comment at: include/clang/AST/Expr.h:3029 +assert((CastExprBits.BasePathSize == BasePathSize) && + "BasePathSize overflow!"); assert(CastConsistency()); lebedev.ri w

[PATCH] D56358: [AST] Move back BasePathSize to the bit-fields of CastExpr

2019-01-07 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added inline comments. Comment at: include/clang/AST/Expr.h:3029 +assert((CastExprBits.BasePathSize == BasePathSize) && + "BasePathSize overflow!"); assert(CastConsistency()); riccibruno wrote: > lebedev.ri wrote: > > rjmccall wrote:

r350516 - clang-format: [JS] support goog.requireType.

2019-01-07 Thread Martin Probst via cfe-commits
Author: mprobst Date: Mon Jan 7 05:12:50 2019 New Revision: 350516 URL: http://llvm.org/viewvc/llvm-project?rev=350516&view=rev Log: clang-format: [JS] support goog.requireType. Summary: It's a new primitive for importing symbols, and should be treated like the (previously handled) `goog.require

[PATCH] D56367: [AST] Pack CXXDependentScopeMemberExpr

2019-01-07 Thread Bruno Ricci via Phabricator via cfe-commits
riccibruno added a comment. In D56367#1347845 , @rjmccall wrote: > Does the regression disappear if you make the scope specifier the first > trailing object? Later trailing objects are more expensive to access, and I > would imagine that the scope speci

[PATCH] D56385: clang-format: [JS] support goog.requireType.

2019-01-07 Thread Martin Probst via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL350516: clang-format: [JS] support goog.requireType. (authored by mprobst, committed by ). Herald added a subscriber: llvm-commits. Repository: rL LLVM CHANGES SINCE LAST ACTION https://reviews.llvm.

[PATCH] D56358: [AST] Move back BasePathSize to the bit-fields of CastExpr

2019-01-07 Thread Bruno Ricci via Phabricator via cfe-commits
riccibruno marked an inline comment as done. riccibruno added inline comments. Comment at: include/clang/AST/Expr.h:3029 +assert((CastExprBits.BasePathSize == BasePathSize) && + "BasePathSize overflow!"); assert(CastConsistency()); lebedev.ri w

r350519 - [AST][NFC] Pack OpaqueValueExpr

2019-01-07 Thread Bruno Ricci via cfe-commits
Author: brunoricci Date: Mon Jan 7 05:39:26 2019 New Revision: 350519 URL: http://llvm.org/viewvc/llvm-project?rev=350519&view=rev Log: [AST][NFC] Pack OpaqueValueExpr Use the newly available space in the bit-fields of Stmt. This saves 1 pointer per OpaqueValueExpr. NFC. Modified: cfe/trun

[PATCH] D56314: [clangd] Don't store completion info if the symbol is not used for code completion.

2019-01-07 Thread Haojian Wu via Phabricator via cfe-commits
hokein added a comment. In D56314#1347964 , @ilya-biryukov wrote: > @hokein, do you need reviewers for this? I'm happy to volunteer. Thanks. > In D56314#1347511 , @nridge wrote: > >> Might we want to keep some

[PATCH] D56354: [AST] Replace asserts with if() in SourceLocation accessors

2019-01-07 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. The downside to this change is that callers now have to check the return values for validity where they didn't previously because the assertion covered it. However, I think that's probably reasonable in these cases since they're mostly returning source locations o

[PATCH] D54309: [AST] Allow limiting the scope of common AST traversals (getParents, RAV).

2019-01-07 Thread Sam McCall via Phabricator via cfe-commits
sammccall added a comment. @JonasToth As noted on https://bugs.llvm.org/show_bug.cgi?id=39949, this assertion is a pre-existing problem with the parent map + lambdas, unrelated to this patch. I've analyzed where it comes from (details in the bug) but don't know what the right fix should be. @k

[PATCH] D55280: [CTU] Make loadExternalAST return with non nullptr on success

2019-01-07 Thread Gabor Marton via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC350521: [CTU] Make loadExternalAST return with non nullptr on success (authored by martong, committed by ). Changed prior to commit: https://reviews.llvm.org/D55280?vs=176779&id=180479#toc Repository:

r350521 - [CTU] Make loadExternalAST return with non nullptr on success

2019-01-07 Thread Gabor Marton via cfe-commits
Author: martong Date: Mon Jan 7 06:05:19 2019 New Revision: 350521 URL: http://llvm.org/viewvc/llvm-project?rev=350521&view=rev Log: [CTU] Make loadExternalAST return with non nullptr on success Summary: In loadExternalAST we return with either an error or with a valid ASTUnit pointer which shou

[PATCH] D56288: [ELF] Do not enable 'new dtags' on NetBSD by default

2019-01-07 Thread Michał Górny via Phabricator via cfe-commits
mgorny added a comment. Ok, maybe I'm being silly but since clang driver has to pass `--enable-new-dtags` for GNU ld compatibility anyway, wouldn't it make sense to keep the default as disabled in order to match GNU ld behavior? Repository: rLLD LLVM Linker CHANGES SINCE LAST ACTION https

r350523 - [clang] Add AST matcher for initializer list members

2019-01-07 Thread Hyrum Wright via cfe-commits
Author: hwright Date: Mon Jan 7 06:14:36 2019 New Revision: 350523 URL: http://llvm.org/viewvc/llvm-project?rev=350523&view=rev Log: [clang] Add AST matcher for initializer list members Summary: Much like hasArg for various call expressions, this allows LibTooling users to match against a member

[PATCH] D56090: Add a matcher for members of an initializer list expression

2019-01-07 Thread Hyrum Wright via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL350523: [clang] Add AST matcher for initializer list members (authored by hwright, committed by ). Herald added a subscriber: llvm-commits. Changed prior to commit: https://reviews.llvm.org/D56090?vs=18

[PATCH] D56288: [ELF] Do not enable 'new dtags' on NetBSD by default

2019-01-07 Thread Kamil Rytarowski via Phabricator via cfe-commits
krytarowski added a comment. In D56288#1348148 , @mgorny wrote: > Ok, maybe I'm being silly but since clang driver has to pass > `--enable-new-dtags` for GNU ld compatibility anyway, wouldn't it make sense > to keep the default as disabled in order to ma

[PATCH] D56358: [AST] Move back BasePathSize to the bit-fields of CastExpr

2019-01-07 Thread Bruno Ricci via Phabricator via cfe-commits
riccibruno marked an inline comment as done. riccibruno added inline comments. Comment at: include/clang/AST/Expr.h:3029 +assert((CastExprBits.BasePathSize == BasePathSize) && + "BasePathSize overflow!"); assert(CastConsistency()); riccibruno w

r350525 - [AST][NFC] Pack DependentScopeDeclRefExpr and CXXUnresolvedConstructExpr

2019-01-07 Thread Bruno Ricci via cfe-commits
Author: brunoricci Date: Mon Jan 7 06:27:04 2019 New Revision: 350525 URL: http://llvm.org/viewvc/llvm-project?rev=350525&view=rev Log: [AST][NFC] Pack DependentScopeDeclRefExpr and CXXUnresolvedConstructExpr Use the newly available space in the bit-fields of Stmt. This saves 1 pointer per Depen

[clang-tools-extra] r350526 - [clang-tidy] Use the public hasInit matcher, rather than defining our own, NFC

2019-01-07 Thread Hyrum Wright via cfe-commits
Author: hwright Date: Mon Jan 7 06:36:47 2019 New Revision: 350526 URL: http://llvm.org/viewvc/llvm-project?rev=350526&view=rev Log: [clang-tidy] Use the public hasInit matcher, rather than defining our own, NFC Modified: clang-tools-extra/trunk/clang-tidy/abseil/DurationRewriter.cpp Modifi

r350527 - [AST] Store some data of CXXNewExpr as trailing objects

2019-01-07 Thread Bruno Ricci via cfe-commits
Author: brunoricci Date: Mon Jan 7 07:04:45 2019 New Revision: 350527 URL: http://llvm.org/viewvc/llvm-project?rev=350527&view=rev Log: [AST] Store some data of CXXNewExpr as trailing objects Store the optional array size expression, optional initialization expression and optional placement new

[PATCH] D55701: [analyzer] Pass the correct loc Expr from VisitIncDecOp to evalStore

2019-01-07 Thread Rafael Stahl via Phabricator via cfe-commits
r.stahl updated this revision to Diff 180487. r.stahl added a comment. rebased Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55701/new/ https://reviews.llvm.org/D55701 Files: lib/StaticAnalyzer/Core/ExprEngineC.cpp unittests/StaticAnalyzer/RegisterCustomChec

[PATCH] D56134: [AST] Store some data of CXXNewExpr as trailing objects

2019-01-07 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL350527: [AST] Store some data of CXXNewExpr as trailing objects (authored by brunoricci, committed by ). Herald added a subscriber: llvm-commits. Changed prior to commit: https://reviews.llvm.org/D56134

r350528 - [analyzer] Pass the correct loc Expr from VisitIncDecOp to evalStore

2019-01-07 Thread Rafael Stahl via cfe-commits
Author: r.stahl Date: Mon Jan 7 07:07:01 2019 New Revision: 350528 URL: http://llvm.org/viewvc/llvm-project?rev=350528&view=rev Log: [analyzer] Pass the correct loc Expr from VisitIncDecOp to evalStore Summary: The LocationE parameter of evalStore is documented as "The location expression that

[PATCH] D55701: [analyzer] Pass the correct loc Expr from VisitIncDecOp to evalStore

2019-01-07 Thread Rafael Stahl via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC350528: [analyzer] Pass the correct loc Expr from VisitIncDecOp to evalStore (authored by r.stahl, committed by ). Changed prior to commit: https://reviews.llvm.org/D55701?vs=180487&id=180489#toc Repos

[PATCH] D55701: [analyzer] Pass the correct loc Expr from VisitIncDecOp to evalStore

2019-01-07 Thread Rafael Stahl via Phabricator via cfe-commits
r.stahl added a comment. I tried adding isGLValue to evalStore and the test suite didn't complain. For evalLoad (on BoundEx) it failed in pretty much every test. Should the evalStore assert also go into trunk? Since the analyzer behavior itself remains unchanged, I don't believe any other chec

[PATCH] D55775: [Driver] Don't override '-march' when using '-arch x86_64h'

2019-01-07 Thread Francis Visoiu Mistrih via Phabricator via cfe-commits
thegameg added a comment. In D55775#1338512 , @qcolombet wrote: > Should we emit an error if we request x86_64h with an arch older than haswell? Makes sense. I'll put up a patch soon. Repository: rL LLVM CHANGES SINCE LAST ACTION https://reviews.l

[PATCH] D56390: Generate Checkers.inc under clang/Driver and use from CC1Options.td

2019-01-07 Thread Yuka Takahashi via Phabricator via cfe-commits
yamaguchi created this revision. yamaguchi added a reviewer: thakis. Herald added a subscriber: mgorny. Generate Checkers.inc also under include/clang/Driver so that we can include this file from Driver/CC1Options.td without making Driver's tablegen output depending on StaticAnalyzer/Checker's tab

r350529 - [Sema] Fix unused variable warning in Release builds

2019-01-07 Thread Benjamin Kramer via cfe-commits
Author: d0k Date: Mon Jan 7 07:22:08 2019 New Revision: 350529 URL: http://llvm.org/viewvc/llvm-project?rev=350529&view=rev Log: [Sema] Fix unused variable warning in Release builds Modified: cfe/trunk/lib/Sema/SemaDeclCXX.cpp Modified: cfe/trunk/lib/Sema/SemaDeclCXX.cpp URL: http://llvm.o

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

2019-01-07 Thread Louis Dionne via Phabricator via cfe-commits
ldionne accepted this revision. ldionne added a comment. LGTM, but I suggest you address @Quuxplusone 's concerns regarding the tests. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D48342/new/ https://reviews.llvm.org/D48342 ___ cfe-commits

[PATCH] D56391: Limit COFF 'common' emission to <=32 alignment types.

2019-01-07 Thread Erich Keane via Phabricator via cfe-commits
erichkeane created this revision. erichkeane added reviewers: majnemer, rnk, pengfei. As reported in PR33035, LLVM crashes if given a common object with an alignment of greater than 32 bits. This is because the COFF file format does not support these alignments, so emitting them is broken anyway.

r350530 - [OPENMP][NVPTX]Reduce number of barriers in reductions.

2019-01-07 Thread Alexey Bataev via cfe-commits
Author: abataev Date: Mon Jan 7 07:45:09 2019 New Revision: 350530 URL: http://llvm.org/viewvc/llvm-project?rev=350530&view=rev Log: [OPENMP][NVPTX]Reduce number of barriers in reductions. After the fix for the syncthreads we don't need to generate extra barriers for the parallel reductions. Mo

[PATCH] D55212: Handle alloc_size attribute on function pointers

2019-01-07 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added reviewers: erik.pilkington, dexonsmith. aaron.ballman added a comment. In D55212#1347994 , @arichardson wrote: > I don't see an easy way of fixing the pragma clang attribute support for > this. > Would it be okay to commit this chang

[PATCH] D56314: [clangd] Don't store completion info if the symbol is not used for code completion.

2019-01-07 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added inline comments. Comment at: clangd/index/Index.h:232 /// See also isIndexedForCodeCompletion(). +/// Note that we don't store completion information (signature, snippet, +/// documentation, type, inclues, etc) if the symbol is not indexed for co

[PATCH] D54945: This commit adds a chapter about clang-tidy integrations

2019-01-07 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh added a comment. In D54945#1340528 , @MarinaKalashina wrote: > @alexfh Just for me to be sure, should there be the following structure in > http://clang.llvm.org/extra/index.html: ... Roughly like that. More specifically, I'd suggest to modify t

[PATCH] D56393: [DebugInfo] Don't emit DW_AT_enum_class unless it's actually an 'enum class'.

2019-01-07 Thread Paul Robinson via Phabricator via cfe-commits
probinson created this revision. probinson added reviewers: dblaikie, rnk, zturner. probinson added a project: debug-info. Herald added subscribers: cfe-commits, JDevlieghere, aprantl. The original fix for PR36168 would emit DW_AT_enum_class for both of these cases: enum Fixed : short { F1

[PATCH] D56012: [clang-tidy] Be more liberal about literal zeroes in abseil checks

2019-01-07 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh added a comment. One random late comment. Comment at: clang-tools-extra/trunk/test/clang-tidy/abseil-duration-factory-scale.cpp:38 + // CHECK-MESSAGES: :[[@LINE-1]]:7: warning: use ZeroDuration() for zero-length time intervals [abseil-duration-factory-scale] + // CHE

Re: [PATCH] D56393: [DebugInfo] Don't emit DW_AT_enum_class unless it's actually an 'enum class'.

2019-01-07 Thread Zachary Turner via cfe-commits
PDB/CodeView doesn’t doesn’t distinguish between various flavors of enums On Mon, Jan 7, 2019 at 8:14 AM Paul Robinson via Phabricator < revi...@reviews.llvm.org> wrote: > probinson created this revision. > probinson added reviewers: dblaikie, rnk, zturner. > probinson added a project: debug-info.

[PATCH] D56323: [clang-tidy] Handle member variables in readability-simplify-boolean-expr

2019-01-07 Thread Jonas Toth via Phabricator via cfe-commits
JonasToth added a comment. In D56323#1347489 , @LegalizeAdulthood wrote: > I managed to do some limited testing on the original source file from the bug > report in lldb and verified that the correct fix was applied there. I also > tried a few other fi

[PATCH] D56303: [clang-tidy] Handle case/default statements when simplifying boolean expressions

2019-01-07 Thread Jonas Toth via Phabricator via cfe-commits
JonasToth added inline comments. Comment at: clang-tidy/readability/SimplifyBooleanExprCheck.cpp:386 - bool BoolValue = Bool->getValue(); + const bool BoolValue = Bool->getValue(); aaron.ballman wrote: > LegalizeAdulthood wrote: > > JonasToth wrote: > > > `

[PATCH] D56395: [ASTMatchers] Improve assert message for broken parent map.

2019-01-07 Thread Sam McCall via Phabricator via cfe-commits
sammccall created this revision. sammccall added a reviewer: ilya-biryukov. Herald added a subscriber: cfe-commits. This assert catches places where the AST (as seen by RecursiveASTVisitor) becomes disconnected due to incomplete traversal. Making it print the actual parent-less node is a lot more

[PATCH] D54309: [AST] Allow limiting the scope of common AST traversals (getParents, RAV).

2019-01-07 Thread Jonas Toth via Phabricator via cfe-commits
JonasToth added a comment. @sammccall Thank you for analyzing and investigation! Keeping the assertion is of course good and I am not sure on how to proceed. Given the close branch for 8.0 we might opt for an hotfix that resolves the issue for now. I think the bug-report is the better place to

[clang-tools-extra] r350540 - [clangd] Include instead of . NFC

2019-01-07 Thread Ilya Biryukov via cfe-commits
Author: ibiryukov Date: Mon Jan 7 08:55:59 2019 New Revision: 350540 URL: http://llvm.org/viewvc/llvm-project?rev=350540&view=rev Log: [clangd] Include instead of . NFC This fixes the only clang-tidy check currently enabled by clangd. Modified: clang-tools-extra/trunk/clangd/fuzzer/ClangdF

[clang-tools-extra] r350542 - [clangd] Fix Windows build after r350531

2019-01-07 Thread Ilya Biryukov via cfe-commits
Author: ibiryukov Date: Mon Jan 7 09:03:15 2019 New Revision: 350542 URL: http://llvm.org/viewvc/llvm-project?rev=350542&view=rev Log: [clangd] Fix Windows build after r350531 Modified: clang-tools-extra/trunk/clangd/FSProvider.cpp Modified: clang-tools-extra/trunk/clangd/FSProvider.cpp URL

[PATCH] D56226: [clang-format] square parens that are followed by '=' are not Objective-C message sends

2019-01-07 Thread Ben Hamilton via Phabricator via cfe-commits
benhamilton added inline comments. Comment at: lib/Format/TokenAnnotator.cpp:501 +CurrentToken->Next->is(tok::equal))) || + (CurrentToken->Previous->Previous == Left)) && Left->is(TT_ObjCMethodExpr)) { I thin

[PATCH] D56160: [clang-tidy] modernize-use-trailing-return check

2019-01-07 Thread Jonas Toth via Phabricator via cfe-commits
JonasToth added a comment. > - if the closing parenthesis of the function is inside a macro, no FixIt will > be created (I cannot relyably lex for subsequent CV and ref qualifiers and > maybe we do not want to make changes in macros) Usually macros are untouched because its impossible to transf

[PATCH] D55433: [clang-tidy] Adding a new modernize use nodiscard checker

2019-01-07 Thread Jonas Toth via Phabricator via cfe-commits
JonasToth added a comment. In D55433#1347553 , @MyDeveloperDay wrote: > libprotobuf still builds cleanly with just the one expected warning..despite > adding over 500 [[nodiscards]] > > F7800873: image.png > > I'll con

[PATCH] D56395: [ASTMatchers] Improve assert message for broken parent map.

2019-01-07 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman accepted this revision. aaron.ballman added a comment. This revision is now accepted and ready to land. LGTM! Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D56395/new/ https://reviews.llvm.org/D56395 ___

r350555 - [X86] Use funnel shift intrinsics for the VBMI2 vshld/vshrd builtins.

2019-01-07 Thread Craig Topper via cfe-commits
Author: ctopper Date: Mon Jan 7 11:10:22 2019 New Revision: 350555 URL: http://llvm.org/viewvc/llvm-project?rev=350555&view=rev Log: [X86] Use funnel shift intrinsics for the VBMI2 vshld/vshrd builtins. Differential Revision: https://reviews.llvm.org/D56365 Modified: cfe/trunk/include/clang

[PATCH] D56365: [X86] Use funnel shift intrinsics for the VBMI2 vshld/vshrd builtins.

2019-01-07 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL350555: [X86] Use funnel shift intrinsics for the VBMI2 vshld/vshrd builtins. (authored by ctopper, committed by ). Repository: rL LLVM CHANGES SINCE LAST ACTION https://reviews.llvm.org/D56365/new/

[PATCH] D56288: [ELF] Do not enable 'new dtags' on NetBSD by default

2019-01-07 Thread Rui Ueyama via Phabricator via cfe-commits
ruiu added a comment. I think when we implemented the feature, there was an understanding that the "new dtags" might be "new" 20 years ago but they are not new at all now. This is not the only example of changing the default in lld; one example being that text segments are not writable by defau

[PATCH] D56367: [AST] Pack CXXDependentScopeMemberExpr

2019-01-07 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. Okay. That comment seems reasonable. Glad to hear you're on top of it. :) Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D56367/new/ https://reviews.llvm.org/D56367 ___ cfe-commits mailing l

r350563 - Revert r350555 "[X86] Use funnel shift intrinsics for the VBMI2 vshld/vshrd builtins."

2019-01-07 Thread Craig Topper via cfe-commits
Author: ctopper Date: Mon Jan 7 11:39:25 2019 New Revision: 350563 URL: http://llvm.org/viewvc/llvm-project?rev=350563&view=rev Log: Revert r350555 "[X86] Use funnel shift intrinsics for the VBMI2 vshld/vshrd builtins." Had to revert the LLVM patch this depends on to fix a MSVC compiler limit i

[PATCH] D55662: [Sema][ObjC] Do not warn about repeated uses of weak variables when the variables are accessed in an unevaluated context.

2019-01-07 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak added a comment. We can make `DeduceVariableDeclarationType` return the rewritten expression and replace `Init` in `Sema::AddInitializerToDecl` with it. Alternatively, we can keep a set of `ObjCPropertyRefExpr`s passed to `recordUseOfWeak` (the original `ObjCPropertyRefExpr`, if it was

[PATCH] D56066: [OpenCL] Address space for default class members

2019-01-07 Thread John McCall via Phabricator via cfe-commits
rjmccall added inline comments. Comment at: lib/Sema/SemaInit.cpp:4539 + if (InitCategory.isPRValue() || InitCategory.isXValue()) +T1Quals.removeAddressSpace(); + ebevhan wrote: > rjmccall wrote: > > rjmccall wrote: > > > I can understand why a pr-value woul

[PATCH] D55662: [Sema][ObjC] Do not warn about repeated uses of weak variables when the variables are accessed in an unevaluated context.

2019-01-07 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. If it's at all reasonable to just avoid doing the work multiple times, let's do that. It should also avoid duplicate diagnostics if e.g. an overload is resolved to an unavailable function. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D

[PATCH] D56405: Split -Wdelete-non-virtual-dtor into two groups

2019-01-07 Thread Erik Pilkington via Phabricator via cfe-commits
erik.pilkington created this revision. erik.pilkington added reviewers: rsmith, aaron.ballman. Herald added subscribers: dexonsmith, jkorous. `-Wdelete-non-virtual-dtor` controlled two diagnostics: 1) calling a non-virtual dtor from an abstract class, and 2) calling a non-virtual dtor from a pol

[libclc] r350565 - cmake: Install libraries to DATADIR from GNUInstallDirs

2019-01-07 Thread Jan Vesely via cfe-commits
Author: jvesely Date: Mon Jan 7 12:20:37 2019 New Revision: 350565 URL: http://llvm.org/viewvc/llvm-project?rev=350565&view=rev Log: cmake: Install libraries to DATADIR from GNUInstallDirs This moves default installation location to /usr/share to match libclc.pc. Signed-off-by: Jan Vesely Revie

[PATCH] D56288: [ELF] Do not enable 'new dtags' on NetBSD by default

2019-01-07 Thread Kamil Rytarowski via Phabricator via cfe-commits
krytarowski added a comment. On NetBSD the 'new' semantics was already implemented with 'old' RPATH. I don't know the timing whether there already existed RUNPATH, but the result is that we never implemented it and never needed it. The core of NetBSD was convinced to add an alias as it was ver

[PATCH] D55948: Modify DeclaratorChuck::getFunction to use DeclSpec for qualifiers

2019-01-07 Thread John McCall via Phabricator via cfe-commits
rjmccall accepted this revision. rjmccall added a comment. This revision is now accepted and ready to land. Thanks! LGTM. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55948/new/ https://reviews.llvm.org/D55948 ___ cfe-commits mailing list

[PATCH] D56215: [lld] [ELF] Include default search paths for NetBSD driver

2019-01-07 Thread Ed Maste via Phabricator via cfe-commits
emaste added a comment. > There is a list of 140-150 unsafe (LLD_UNSAFE) packages with LLD. Some of these are tagged with a PR or comment explaining why they are LLD_UNSAFE, but we haven't done it consistently. Some of these 140-150 were probably added in the early days of bringing lld into Fre

[PATCH] D56391: Limit COFF 'common' emission to <=32 alignment types.

2019-01-07 Thread David Majnemer via Phabricator via cfe-commits
majnemer added inline comments. Comment at: lib/CodeGen/CodeGenModule.cpp:3766 + // in common. + if (Context.getTargetInfo().getTriple().isOSBinFormatCOFF() && + Context.getTypeAlignIfKnown(D->getType()) > 32) I think this should be isKnownWindowsMSVCEnvir

[PATCH] D56354: [AST] Replace asserts with if() in SourceLocation accessors

2019-01-07 Thread Stephen Kelly via Phabricator via cfe-commits
steveire updated this revision to Diff 180548. steveire added a comment. Fix formatting Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D56354/new/ https://reviews.llvm.org/D56354 Files: include/clang/AST/DeclarationName.h include/clang/AST/TemplateBase.h lib

[PATCH] D56354: [AST] Replace asserts with if() in SourceLocation accessors

2019-01-07 Thread Stephen Kelly via Phabricator via cfe-commits
steveire marked an inline comment as done. steveire added inline comments. Comment at: include/clang/AST/DeclarationName.h:735 + Name.getNameKind() != DeclarationName::CXXConversionFunctionName) + return nullptr; return LocInfo.NamedType.TInfo; ---

r350568 - Recommit r350555 "[X86] Use funnel shift intrinsics for the VBMI2 vshld/vshrd builtins."

2019-01-07 Thread Craig Topper via cfe-commits
Author: ctopper Date: Mon Jan 7 13:00:41 2019 New Revision: 350568 URL: http://llvm.org/viewvc/llvm-project?rev=350568&view=rev Log: Recommit r350555 "[X86] Use funnel shift intrinsics for the VBMI2 vshld/vshrd builtins." The MSVC limit hit in AutoUpgrade.cpp has been worked around for now. Mo

[PATCH] D56354: [AST] Replace asserts with if() in SourceLocation accessors

2019-01-07 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman accepted this revision. aaron.ballman added a comment. This revision is now accepted and ready to land. LGTM aside from a formatting nit. Comment at: include/clang/AST/DeclarationName.h:735 + Name.getNameKind() != DeclarationName::CXXConversionFunctionNa

[PATCH] D56407: Implement the TreeStructure interface through the TextNodeDumper

2019-01-07 Thread Stephen Kelly via Phabricator via cfe-commits
steveire created this revision. steveire added reviewers: aaron.ballman, erichkeane. Herald added a subscriber: cfe-commits. This way, when the generic ASTTraverser is extracted from ASTDumper, there can't be any problem related to ordering of class members, a concern that was raised in https://re

[PATCH] D55337: NFC: Move dumpDeclRef to NodeDumper

2019-01-07 Thread Stephen Kelly via Phabricator via cfe-commits
steveire marked an inline comment as done. steveire added inline comments. Comment at: include/clang/AST/TextNodeDumper.h:28 const comments::FullComment *> { + TextTreeStructure &TreeStructure; raw_ostream &OS; stev

[PATCH] D37035: Implement __builtin_LINE() et. al. to support source location capture.

2019-01-07 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF marked 13 inline comments as done. EricWF added a comment. Address review comments. Updated patch coming shortly. Comment at: include/clang/AST/Expr.h:4147 + SourceLocation getBeginLoc() const LLVM_READONLY { return BuiltinLoc; } + SourceLocation getEndLoc() const LLVM

r350571 - [OPENMP]Add call to __kmpc_push_target_tripcount() function.

2019-01-07 Thread Alexey Bataev via cfe-commits
Author: abataev Date: Mon Jan 7 13:30:43 2019 New Revision: 350571 URL: http://llvm.org/viewvc/llvm-project?rev=350571&view=rev Log: [OPENMP]Add call to __kmpc_push_target_tripcount() function. Each we create the target regions with the teams distribute inner region, we can better estimate numbe

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

2019-01-07 Thread Volodymyr Sapsai via Phabricator via cfe-commits
vsapsai updated this revision to Diff 180556. vsapsai added a comment. - Test initializing vector of `unsigned int` with array of `int`. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D48342/new/ https://reviews.llvm.org/D48342 Files: libcxx/include/memory libcxx/test/std/containers

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

2019-01-07 Thread Arthur O'Dwyer via Phabricator via cfe-commits
Quuxplusone added inline comments. Comment at: libcxx/test/std/containers/sequences/vector/vector.cons/construct_iter_iter.pass.cpp:161 + { +// Though types are different, initialization can be done with `memcpy`. +int32_t array[1] = {-1}; I might add "

[PATCH] D56410: Forbid combination of --status-bugs and non-HTML output

2019-01-07 Thread Rob Day via Phabricator via cfe-commits
rkday created this revision. rkday added a reviewer: dcoughlin. Herald added a subscriber: cfe-commits. I recently spent some time resolving an issue where the --status-bugs parameter conflicted with -plist, and scan-build always returned 0 even when there were errors. This change means that sc

r350572 - Add a __has_feature check for namespaces on #pragma clang attribute.

2019-01-07 Thread Erik Pilkington via cfe-commits
Author: epilk Date: Mon Jan 7 13:54:00 2019 New Revision: 350572 URL: http://llvm.org/viewvc/llvm-project?rev=350572&view=rev Log: Add a __has_feature check for namespaces on #pragma clang attribute. Support for this was added in r349845. Modified: cfe/trunk/docs/LanguageExtensions.rst

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

2019-01-07 Thread Volodymyr Sapsai via Phabricator via cfe-commits
vsapsai added inline comments. Comment at: libcxx/test/std/containers/sequences/vector/vector.cons/construct_iter_iter.pass.cpp:196 test_ctor_under_alloc(); + test_ctor_with_different_value_type(); } Quuxplusone wrote: > vsapsai wrote: > > Quuxplusone wrote

  1   2   >