[PATCH] D56411: [CUDA][HIP][Sema] Fix template kernel with function as template parameter

2019-01-07 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. Sema won't necessarily have resolved a template decl when parsing a template argument list, so trying to propagate that decl down to indicate that we're resolving a template argument is not a good approach. I was going to suggest recording that we're within a template

[PATCH] D56424: [clang-tidy] Add check for underscores in googletest names.

2019-01-07 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added a comment. In D56424#1349218 , @karepker wrote: > Clean up comments in test file. For reference, what documentation sources did you read when creating the review itseft? I thought it was documented that an appropriate category (`[clang-

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

2019-01-07 Thread Sam McCall via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL350612: [ASTMatchers] Improve assert message for broken parent map. (authored by sammccall, committed by ). Herald added a subscriber: llvm-commits. Repository: rL LLVM CHANGES SINCE LAST ACTION http

r350612 - [ASTMatchers] Improve assert message for broken parent map.

2019-01-07 Thread Sam McCall via cfe-commits
Author: sammccall Date: Mon Jan 7 23:29:46 2019 New Revision: 350612 URL: http://llvm.org/viewvc/llvm-project?rev=350612&view=rev Log: [ASTMatchers] Improve assert message for broken parent map. Summary: This assert catches places where the AST (as seen by RecursiveASTVisitor) becomes disconnect

[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. Oh, and please update the commit message to primarily talk about the changes to placeholder checking. You can discuss the impact on the repeated-use-of-weak warning in a follow-up paragraph. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org

[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 inline comments. Comment at: lib/Sema/SemaLambda.cpp:793 + else +Args = Init; + Please maintain the original order here, even though I suspect it doesn't matter: if this is direct-initialization, use the arguments, otherwise use either `Dedu

[PATCH] D56367: [AST] Pack CXXDependentScopeMemberExpr

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. Yeah, LGTM. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D56367/new/ https://reviews.llvm.org/D56367 ___ cfe

[PATCH] D17741: adds __FILE_BASENAME__ builtin macro

2019-01-07 Thread Kristina Brooks via Phabricator via cfe-commits
kristina added a comment. Ping for author? This is one of the changes I'd like to see through, though the complexity here can be massively reduced as stated above. I wouldn't mind opening a new diff if the author is away with just a change in PPMacroExpansion and a testcase (which should probab

[PATCH] D56424: Add check for underscores in googletest names.

2019-01-07 Thread Kar Epker via Phabricator via cfe-commits
karepker updated this revision to Diff 180603. karepker added a comment. Clean up comments in test file. Repository: rCTE Clang Tools Extra CHANGES SINCE LAST ACTION https://reviews.llvm.org/D56424/new/ https://reviews.llvm.org/D56424 Files: clang-tidy/google/AvoidUnderscoreInGoogletest

[PATCH] D56424: Add check for underscores in googletest names.

2019-01-07 Thread Kar Epker via Phabricator via cfe-commits
karepker created this revision. karepker added a reviewer: hokein. Herald added a subscriber: mgorny. Adds a clang-tidy warning for underscores in googletest names. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D56424 Files: clang-tidy/google/AvoidUnderscoreInGoogletestNameCh

[PATCH] D56415: NFC: Port QueryParser to StringRef

2019-01-07 Thread Kristina Brooks via Phabricator via cfe-commits
kristina added a reviewer: kristina. kristina added a comment. LGTM aside from one comment. Comment at: clang-query/QueryParser.cpp:36 + if (Line.front() == '#') { +Line = {}; return StringRef(); I don't think this is the best way of handling it, in f

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

2019-01-07 Thread Bernhard Manfred Gruber via Phabricator via cfe-commits
bernhardmgruber added a comment. @JonasToth Do you really think I should drop the extra information on why I could not provide a FixIt? If truly yes, than I would like to keep them as comments. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D56160/new/ https://reviews.llvm.org/D56160

[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 18 inline comments as done. EricWF added a comment. Mark more review comments as done. Comment at: lib/AST/Expr.cpp:2026-2027 + // human readable name. + if (IdentifierInfo *II = FD->getDeclName().getAsIdentifierInfo()) +return MkStr(II->getNameS

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

2019-01-07 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF updated this revision to Diff 180597. EricWF marked 4 inline comments as done. EricWF added a comment. Address review comments. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D37035/new/ https://reviews.llvm.org/D37035 Files: docs/LanguageExtensions.rst include/clang/AST/ASTCo

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

2019-01-07 Thread Bernhard Manfred Gruber via Phabricator via cfe-commits
bernhardmgruber added inline comments. Comment at: clang-tidy/modernize/UseTrailingReturnCheck.cpp:33 + const TypeSourceInfo *TSI = F.getTypeSourceInfo(); + assert(TSI); + const FunctionTypeLoc FTL = JonasToth wrote: > Please add an error-msg to the assertion

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

2019-01-07 Thread Bernhard Manfred Gruber via Phabricator via cfe-commits
bernhardmgruber updated this revision to Diff 180596. bernhardmgruber marked 31 inline comments as done. bernhardmgruber added a comment. Fixed most of the issues pointed out by @JonasToth and added a few more tests. The tests with data member pointers currently fail and I will investiage this.

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

2019-01-07 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added inline comments. Comment at: include/clang/Basic/DiagnosticGroups.td:108-109 def DeleteNonVirtualDtor : DiagGroup<"delete-non-virtual-dtor">; +def DeleteAbstractNonVirtualDtor : DiagGroup<"delete-abstract-non-virtual-dtor", +

[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 updated this revision to Diff 180593. ahatanak added a comment. Make `deduceVarTypeFromInitializer` and `DeduceVariableDeclarationType` return the new initialization expression and use it in `Sema::AddInitializerToDecl`. Add a test case that tests lambda capture with an initializer. R

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

2019-01-07 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: include/clang/Basic/DiagnosticGroups.td:108-109 def DeleteNonVirtualDtor : DiagGroup<"delete-non-virtual-dtor">; +def DeleteAbstractNonVirtualDtor : DiagGroup<"delete-abstract-non-virtual-dtor", +

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

2019-01-07 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added inline comments. Comment at: include/clang/Basic/DiagnosticGroups.td:108-109 def DeleteNonVirtualDtor : DiagGroup<"delete-non-virtual-dtor">; +def DeleteAbstractNonVirtualDtor : DiagGroup<"delete-abstract-non-virtual-dtor", +

Buildbot numbers for the last week of 12/30/2018 - 01/05/2019

2019-01-07 Thread Galina Kistanova via cfe-commits
Hello everyone, Below are some buildbot numbers for the last week of 12/30/2018 - 01/05/2019. Please see the same data in attached csv files: The longest time each builder was red during the week; "Status change ratio" by active builder (percent of builds that changed the builder status from gre

Buildbot numbers for the week of 12/23/2018 - 12/29/2018

2019-01-07 Thread Galina Kistanova via cfe-commits
Hello everyone, Below are some buildbot numbers for the week of 12/23/2018 - 12/29/2018. Please see the same data in attached csv files: The longest time each builder was red during the week; "Status change ratio" by active builder (percent of builds that changed the builder status from greed to

[PATCH] D55500: [Builtins] Implement __builtin_is_constant_evaluated for use in C++2a

2019-01-07 Thread Bruno Cardoso Lopes via Phabricator via cfe-commits
bruno added inline comments. Comment at: include/clang/Basic/Builtins.def:759 +// Random C++ builtins. +LANGBUILTIN(__builtin_is_constant_evaluated, "b", "ncu", CXX_LANG) + EricWF wrote: > EricWF wrote: > > bruno wrote: > > > Name bikeshedding : perhaps the built

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

2019-01-07 Thread Richard Smith via cfe-commits
On Mon, 7 Jan 2019 at 16:12, Erik Pilkington via cfe-commits < cfe-commits@lists.llvm.org> wrote: > On 1/7/19 3:51 PM, Richard Smith wrote: > > On Mon, 7 Jan 2019 at 13:57, Erik Pilkington via cfe-commits < > cfe-commits@lists.llvm.org> wrote: > >> Author: epilk >> Date: Mon Jan 7 13:54:00 2019 >

r350585 - Split -Wdelete-non-virtual-dtor into -Wdelete-abstract-non-virtual-dtor

2019-01-07 Thread Erik Pilkington via cfe-commits
Author: epilk Date: Mon Jan 7 16:21:05 2019 New Revision: 350585 URL: http://llvm.org/viewvc/llvm-project?rev=350585&view=rev Log: Split -Wdelete-non-virtual-dtor into -Wdelete-abstract-non-virtual-dtor -Wdelete-non-virtual-dtor previously controlled two diagnostics: 1) calling a non-virtual dto

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

2019-01-07 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC350585: Split -Wdelete-non-virtual-dtor into -Wdelete-abstract-non-virtual-dtor (authored by epilk, committed by ). Changed prior to commit: https://reviews.llvm.org/D56405?vs=180532&id=180584#toc Repo

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

2019-01-07 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added inline comments. Comment at: include/clang/AST/ASTContext.h:279 + /// A cache mapping a function declaration to its human-readable function or + /// file name. Comment seems out of date: the key here is a string rather than a function declaratio

[PATCH] D56367: [AST] Pack CXXDependentScopeMemberExpr

2019-01-07 Thread Bruno Ricci via Phabricator via cfe-commits
riccibruno added a comment. > Okay. That comment seems reasonable. Glad to hear you're on top of it. :) I guess that means I can land this as is ? Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D56367/new/ https://reviews.llvm.org/D56367 ___

[clang-tools-extra] r350584 - ReleaseNotes: Update with my clang-query contributions this cycle

2019-01-07 Thread Stephen Kelly via cfe-commits
Author: steveire Date: Mon Jan 7 16:09:34 2019 New Revision: 350584 URL: http://llvm.org/viewvc/llvm-project?rev=350584&view=rev Log: ReleaseNotes: Update with my clang-query contributions this cycle Modified: clang-tools-extra/trunk/docs/ReleaseNotes.rst Modified: clang-tools-extra/trunk/d

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

2019-01-07 Thread Erik Pilkington via cfe-commits
On 1/7/19 3:51 PM, Richard Smith wrote: On Mon, 7 Jan 2019 at 13:57, Erik Pilkington via cfe-commits mailto:cfe-commits@lists.llvm.org>> wrote: Author: epilk Date: Mon Jan  7 13:54:00 2019 New Revision: 350572 URL: http://llvm.org/viewvc/llvm-project?rev=350572&view=rev Lo

[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:161 + { +// Though types are different, initialization can be done with `memcpy`. +int32_t array[1] = {-1}; Quuxplusone wrote

[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
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 rL350583: [libcxx] Optimize vectors construction of trivial types from an iterator range… (authored by vsapsai, committed by

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

2019-01-07 Thread Richard Smith via cfe-commits
On Mon, 7 Jan 2019 at 13:57, Erik Pilkington via cfe-commits < cfe-commits@lists.llvm.org> wrote: > 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 cl

[PATCH] D56050: [Sema] Diagnose array access preceding the array bounds even when the base type is incomplete.

2019-01-07 Thread Eli Friedman via Phabricator via cfe-commits
efriedma accepted this revision. efriedma added a comment. This revision is now accepted and ready to land. LGTM Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D56050/new/ https://reviews.llvm.org/D56050 ___ cfe-commit

[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}; vsapsai wrote

[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 180577. vsapsai added a comment. - Test initializing vector of pointers with array of pointers of convertible type. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D48342/new/ https://reviews.llvm.org/D48342 Files: libcxx/include/memory libcxx/t

[PATCH] D56415: NFC: Port QueryParser to StringRef

2019-01-07 Thread Stephen Kelly via Phabricator via cfe-commits
steveire created this revision. steveire added a reviewer: aaron.ballman. Herald added a subscriber: cfe-commits. There is no reason for it to not be a StringRef. Making it one simplifies existing code, and makes follow-up features easier. Repository: rCTE Clang Tools Extra https://reviews.l

[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: lib/AST/NestedNameSpecifier.cpp:465 TypeLoc NestedNameSpecifierLoc::getTypeLoc() const { - assert((Qualifier->getKind() == NestedNameSpecifier::TypeSpec || - Qualifier->getKind() ==

[PATCH] D56413: [OpenMP] Avoid remainder operations for loop index values on a collapsed loop nest.

2019-01-07 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
gtbercea created this revision. gtbercea added reviewers: ABataev, caomhin. Herald added subscribers: cfe-commits, arphaman, guansong. Change the strategy for computing loop index variables after collapsing a loop nest via the collapse clause by replacing the expensive remainder operation with m

[PATCH] D56411: [CUDA][HIP][Sema] Fix template kernel with function as template parameter

2019-01-07 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl created this revision. yaxunl added reviewers: tra, rjmccall. If a kernel template has a function as its template parameter, a device function should be allowed as template argument since a kernel can call a device function. However, currently if the kernel template is instantiated in a ho

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

2019-01-07 Thread Stephen Kelly via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL350573: NFC: Replace asserts with if() in SourceLocation accessors (authored by steveire, committed by ). Herald added a subscriber: llvm-commits. Changed prior to commit: https://reviews.llvm.org/D5635

r350573 - NFC: Replace asserts with if() in SourceLocation accessors

2019-01-07 Thread Stephen Kelly via cfe-commits
Author: steveire Date: Mon Jan 7 13:57:30 2019 New Revision: 350573 URL: http://llvm.org/viewvc/llvm-project?rev=350573&view=rev Log: NFC: Replace asserts with if() in SourceLocation accessors Summary: Nowhere else in the AST classes assert on these kinds of accessors. This way, we can call the

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

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/D56405/new/ https://reviews.llvm.org/D56405 ___

[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:161 + { +// Though types are different, initialization can be done with `memcpy`. +int32_t array[1] = {-1}; Quuxplusone wrote

[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

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

[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

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

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

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

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

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

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

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

[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] 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/

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

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

[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

[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

[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

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

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

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

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

[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

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

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

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

[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

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

[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

  1   2   >