[PATCH] D52771: [clang-tidy] Non-private member variables in classes (MISRA, CppCoreGuidelines, HICPP)

2018-10-12 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri marked an inline comment as done. lebedev.ri added inline comments. Comment at: docs/ReleaseNotes.rst:113 + +- New alias :doc:`cppcoreguidelines-non-private-member-variables-in-classes + ` Eugene.Zelenko wrote: > Please move new alias after new check

[PATCH] D51762: First part of the calendar stuff

2018-10-12 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF added inline comments. Comment at: test/std/utilities/time/time.cal/time.cal.ymwd/time.cal.ymwd.members/ctor.sys_days.pass.cpp:10 +// UNSUPPORTED: c++03, c++11, c++14, c++17 +// XFAIL + mclow.lists wrote: > EricWF wrote: > > What? > The `sys_days` type is

[PATCH] D53213: [clangd] Send CodeAction responses to textDocument/codeAction (LSP 3.8)

2018-10-12 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added inline comments. Comment at: clangd/ClangdLSPServer.cpp:338 + Command Cmd; + if (Action.command && Action.edit) +return llvm::None; What would you think about emitting two commands in this case? First the edit and then the command. I believe

[PATCH] D51762: First part of the calendar stuff

2018-10-12 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists added a comment. This is the first of part of this functionality. Some of these bits are not here yet. Comment at: test/std/utilities/time/time.cal/time.cal.ymwd/time.cal.ymwd.members/ctor.sys_days.pass.cpp:10 +// UNSUPPORTED: c++03, c++11, c++14, c++17 +// XFAIL

[PATCH] D50860: [libc++][test] Remove non-portable assumption that thread's constructor allocates with ::new

2018-10-12 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF added inline comments. Comment at: test/std/thread/thread.threads/thread.thread.class/thread.thread.constr/F.pass.cpp:121 //allocations. +int numAllocs; + Why? Comment at: test/std/thread/thread.threads/thread.thread.class/thread.

[PATCH] D50860: [libc++][test] Remove non-portable assumption that thread's constructor allocates with ::new

2018-10-12 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF requested changes to this revision. EricWF added a comment. This revision now requires changes to proceed. Requesting changes to move this out of my TODO review queue. https://reviews.llvm.org/D50860 ___ cfe-commits mailing list cfe-commits@l

[PATCH] D51868: [libcxx] Build and test fixes for Windows

2018-10-12 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF requested changes to this revision. EricWF added inline comments. This revision now requires changes to proceed. Comment at: CMakeLists.txt:550 +endif() add_compile_flags_if_supported( +-Wextra -W -Wwrite-strings Couldn't we keep the "-Wall" here? And

[PATCH] D53206: Allow padding checker to traverse simple class hierarchies

2018-10-12 Thread Ben Craig via Phabricator via cfe-commits
bcraig added inline comments. Comment at: test/Analysis/padding_cpp.cpp:204-212 +// expected-warning@+1{{Excessive padding in 'struct FakeIntSandwich'}} +struct FakeIntSandwich { + char c1; + int i; + char c2; +}; + Looking at this again... what new cases does

[PATCH] D53238: [Driver] Add -static-{rtlib, stdlib} and make -static-{libgcc, libstdc++} their aliases

2018-10-12 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay updated this revision to Diff 169538. MaskRay added a comment. Rename local variables Repository: rC Clang https://reviews.llvm.org/D53238 Files: include/clang/Driver/Options.td lib/Driver/ToolChains/CommonArgs.cpp lib/Driver/ToolChains/Darwin.cpp lib/Driver/ToolChains/Dragon

[PATCH] D53239: [python] [tests] Disable python binding tests when building with LLVM_USE_SANITIZER=Address

2018-10-12 Thread Dan Liew via Phabricator via cfe-commits
delcypher accepted this revision. delcypher added a comment. This revision is now accepted and ready to land. LGTM. But then I would say that because I wrote the patch 😛... Repository: rC Clang https://reviews.llvm.org/D53239 ___ cfe-commits mail

[PATCH] D53239: [python] [tests] Disable python binding tests when building with LLVM_USE_SANITIZER=Address

2018-10-12 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ created this revision. NoQ added reviewers: mgorny, delcypher. Herald added a subscriber: cfe-commits. @mgorny: These fail for me on macOS too, if LLVM is configured as cmake ../llvm/ -DCMAKE_BUILD_TYPE=Release -DLLVM_USE_SANITIZER=Address I guess we might have to outright disable them und

[PATCH] D53238: [Driver] Add -static-{rtlib, stdlib} and make -static-{libgcc, libstdc++} their aliases

2018-10-12 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay created this revision. MaskRay added reviewers: martell, rsmith. Herald added a subscriber: cfe-commits. Repository: rC Clang https://reviews.llvm.org/D53238 Files: include/clang/Driver/Options.td lib/Driver/ToolChains/CommonArgs.cpp lib/Driver/ToolChains/Darwin.cpp lib/Driver/

[PATCH] D48866: [clang-tidy] Add incorrect-pointer-cast checker

2018-10-12 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tidy/misc/IncorrectPointerCastCheck.cpp:80 + } +} // namespace misc + Somehow, misc namespace is closed twice. Comment at: docs/ReleaseNotes.rst:60 +- New :doc:`misc-incorrect-pointer-c

[PATCH] D52771: [clang-tidy] Non-private member variables in classes (MISRA, CppCoreGuidelines, HICPP)

2018-10-12 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: docs/ReleaseNotes.rst:113 + +- New alias :doc:`cppcoreguidelines-non-private-member-variables-in-classes + ` Please move new alias after new checks. Repository: rCTE Clang Tools Extra https://reviews.llvm.o

[PATCH] D52750: [Diagnostics] Check for integer overflow in array size expressions

2018-10-12 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added a comment. Yeah, this looks better. Though this really highlights that the "warn on undefined behavior" behavior of the constant evaluator should be orthogonal to the evaluation mode... we don't really need/want to evaluate past a side-effect or non-constant expression here. http

[PATCH] D53207: Fix bug 26547 - alignof should return ABI alignment, not preferred alignment

2018-10-12 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added a comment. Please extend the tests to check that the `-fclang-abi-compat=7` switch undoes your change here. One other comment, and otherwise this looks good. Will you need someone to commit this for you? Comment at: test/SemaCXX/align-x86.cpp:4-5 + +#include +#

[PATCH] D37726: clang: alias -static-{libstdc++, libgcc} for LLVM variants

2018-10-12 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. In https://reviews.llvm.org/D37726#1264233, @rsmith wrote: > It would be nice to have a flag here that's agnostic to the value supplied to > `-rtlib` or `-stdlib`. Perhaps `-static-rtlib` (for either libgcc or > compiler-rt) and `-static-stdlib` (for either libc++ or li

[PATCH] D37726: clang: alias -static-{libstdc++, libgcc} for LLVM variants

2018-10-12 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added a comment. It would be nice to have a flag here that's agnostic to the value supplied to `-rtlib` or `-stdlib`. Perhaps `-static-rtlib` (for either libgcc or compiler-rt) and `-static-stdlib` (for either libc++ or libstdc++). (Yes, it's bad that we use `stdlib` to mean "the C++ sta

[PATCH] D53217: [clang-tidy] add IgnoreMacros option to modernize-use-equals-delete

2018-10-12 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh accepted this revision. alexfh added a comment. This revision is now accepted and ready to land. LG with a nit. Comment at: clang-tidy/modernize/UseEqualsDeleteCheck.h:46 void check(const ast_matchers::MatchFinder::MatchResult &Result) override; +private: + const boo

[PATCH] D53231: [Sema] Fix PR38987: keep end location of a direct initializer list

2018-10-12 Thread Orivej Desh via Phabricator via cfe-commits
orivej created this revision. orivej added reviewers: rsmith, vsk, aaron.ballman. Herald added a subscriber: cfe-commits. If PerformConstructorInitialization of a direct initializer list constructor is called while instantiating a template, it has brace locations in its BraceLoc arguments but no

[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] D52814: [PassManager/Sanitizer] Enable usage of ported AddressSanitizer passes with -fsanitize=address

2018-10-12 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan added a comment. In https://reviews.llvm.org/D52814#1262550, @philip.pfaffe wrote: > You're right, my bad; I missed the fact that it's EP_OptimizerLast, which has > no equivalent in the new PM. Your implementation is actually correct here. > > Did you run your test in a debug build?

[PATCH] D52814: [PassManager/Sanitizer] Enable usage of ported AddressSanitizer passes with -fsanitize=address

2018-10-12 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan updated this revision to Diff 169516. Repository: rC Clang https://reviews.llvm.org/D52814 Files: lib/CodeGen/BackendUtil.cpp test/CodeGen/asan-new-pm.ll Index: test/CodeGen/asan-new-pm.ll === --- /dev/null +++ t

[PATCH] D41921: [Parse] Forward brace locations to TypeConstructExpr

2018-10-12 Thread Orivej Desh via Phabricator via cfe-commits
orivej added inline comments. Comment at: lib/Sema/SemaInit.cpp:6034 TSInfo = S.Context.getTrivialTypeSourceInfo(Entity.getType(), Loc); -SourceRange ParenOrBraceRange = - (Kind.getKind() == InitializationKind::IK_DirectList) - ? SourceRange(LBraceLoc, RBrace

[PATCH] D53219: Update hexagon driver tests

2018-10-12 Thread David Zarzycki via Phabricator via cfe-commits
davezarzycki added a comment. Tested and verified with `-DCLANG_DEFAULT_LINKER=lld` Repository: rC Clang https://reviews.llvm.org/D53219 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-co

[PATCH] D53210: Revert 344389 "Revert r344375 "[Driver] check for exit code from SIGPIPE""

2018-10-12 Thread Reid Kleckner via Phabricator via cfe-commits
rnk accepted this revision. rnk added a comment. This revision is now accepted and ready to land. I think it's fine, just remove the git hash from the commit message and just refer to the svn number. Repository: rC Clang https://reviews.llvm.org/D53210

[PATCH] D53066: [RFC] [MinGW] Print paths with forward slashes in commands printed with -v

2018-10-12 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo added inline comments. Comment at: lib/Driver/Job.cpp:104-105 + std::string Buf; + if (PathStyle == llvm::sys::path::Style::posix) { +Buf = llvm::sys::path::convert_to_slash(Arg); +Arg = Buf; rnk wrote: > mstorsjo wrote: > > rnk wrote: > > > Th

[PATCH] D53207: Fix bug 26547 - alignof should return ABI alignment, not preferred alignment

2018-10-12 Thread Nicole Mazzuca via Phabricator via cfe-commits
ubsan updated this revision to Diff 169503. ubsan added a comment. add tests fix nits Repository: rC Clang https://reviews.llvm.org/D53207 Files: include/clang/ASTMatchers/ASTMatchers.h include/clang/Basic/LangOptions.h include/clang/Basic/TypeTraits.h lib/AST/ASTDumper.cpp lib/AS

[PATCH] D53066: [RFC] [MinGW] Print paths with forward slashes in commands printed with -v

2018-10-12 Thread Reid Kleckner via Phabricator via cfe-commits
rnk added inline comments. Comment at: lib/Driver/Job.cpp:104-105 + std::string Buf; + if (PathStyle == llvm::sys::path::Style::posix) { +Buf = llvm::sys::path::convert_to_slash(Arg); +Arg = Buf; mstorsjo wrote: > rnk wrote: > > This is blindly treating

[PATCH] D53206: Allow padding checker to traverse simple class hierarchies

2018-10-12 Thread Max Bernstein via Phabricator via cfe-commits
tekknolagi updated this revision to Diff 169501. tekknolagi added a comment. Fix confusing & wrong if-statements, add new test suggested by @bcraig Repository: rC Clang https://reviews.llvm.org/D53206 Files: lib/StaticAnalyzer/Checkers/PaddingChecker.cpp test/Analysis/padding_cpp.cpp t

[PATCH] D53025: [clang-tidy] implement new check for const return types.

2018-10-12 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel added inline comments. Comment at: clang-tidy/readability/ConstValueReturnCheck.cpp:64 + + // Fix the definition. + llvm::Optional Loc = findConstToRemove(Def, Result); JonasToth wrote: > ymandel wrote: > > JonasToth wrote: > > > I feel that this commen

[PATCH] D50616: [Fixed Point Arithmetic] FixedPointCast

2018-10-12 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan updated this revision to Diff 169500. leonardchan added a comment. - Removed target hook Repository: rC Clang https://reviews.llvm.org/D50616 Files: include/clang/AST/OperationKinds.def include/clang/AST/Type.h include/clang/Basic/DiagnosticCommonKinds.td lib/AST/Expr.cpp

[PATCH] D53206: Allow padding checker to traverse simple class hierarchies

2018-10-12 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added a reviewer: george.karpenkov. NoQ added a comment. I'll take care of this review as an [analyzer]-responsible person, maybe not immediately because i'm a bit overwhelmed right now - sorry! - and George may want to have a look (also or instead). Repository: rC Clang https://reviews

[PATCH] D50616: [Fixed Point Arithmetic] FixedPointCast

2018-10-12 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan updated this revision to Diff 169495. Repository: rC Clang https://reviews.llvm.org/D50616 Files: include/clang/AST/OperationKinds.def include/clang/AST/Type.h include/clang/Basic/DiagnosticCommonKinds.td lib/AST/Expr.cpp lib/AST/ExprConstant.cpp lib/AST/Type.cpp lib/

[PATCH] D53206: Allow padding checker to traverse simple class hierarchies

2018-10-12 Thread Max Bernstein via Phabricator via cfe-commits
tekknolagi added inline comments. Comment at: lib/StaticAnalyzer/Checkers/PaddingChecker.cpp:167-171 } +// How do you reorder fields if you haven't got any? +else if (RD->field_empty()) + return true; + bcraig wrote: > I think this should just b

[PATCH] D53066: [RFC] [MinGW] Print paths with forward slashes in commands printed with -v

2018-10-12 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo added inline comments. Comment at: lib/Driver/Job.cpp:104-105 + std::string Buf; + if (PathStyle == llvm::sys::path::Style::posix) { +Buf = llvm::sys::path::convert_to_slash(Arg); +Arg = Buf; rnk wrote: > This is blindly treating every argument

[PATCH] D51725: Allow un-setting the compilation database path

2018-10-12 Thread Simon Marchi via Phabricator via cfe-commits
simark added a comment. Thanks for your input. I have opened https://reviews.llvm.org/D53220, which removes that option. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D51725 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D53206: Allow padding checker to traverse simple class hierarchies

2018-10-12 Thread Max Bernstein via Phabricator via cfe-commits
tekknolagi edited reviewers, added: dcoughlin; removed: malcolm.parsons. tekknolagi added a comment. Sorry @malcolm.parsons -- I misunderstood code owners. Should not have just looked at a blame of the file... Repository: rC Clang https://reviews.llvm.org/D53206 __

[PATCH] D53220: Remove possibility to change compile database path at runtime

2018-10-12 Thread Simon Marchi via Phabricator via cfe-commits
simark created this revision. Herald added subscribers: cfe-commits, kadircet, arphaman, jkorous, ioeric, ilya-biryukov. This patch removes the possibility to change the compilation database path at runtime using the didChangeConfiguration request. Instead, it is suggested to use the setting on

[PATCH] D53038: [Hexagon] Use GetLinkerPath method instead of hard-coded linker name.

2018-10-12 Thread Sid Manning via Phabricator via cfe-commits
sidneym added a comment. I updated the tests: https://reviews.llvm.org/D53219 Repository: rC Clang https://reviews.llvm.org/D53038 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D53219: Update hexagon driver tests

2018-10-12 Thread Sid Manning via Phabricator via cfe-commits
sidneym created this revision. sidneym added reviewers: bcain, davezarzycki, kparzysz, shankare. Herald added a subscriber: cfe-commits. Don't assume the linker is hexagon-link. https://reviews.llvm.org/D53038 removed the hard-coded name so now it is possible for the other named linkers to be u

[PATCH] D53217: clang-tidy: add IgnoreMacros option to modernize-use-equals-delete

2018-10-12 Thread Miklos Vajna via Phabricator via cfe-commits
vmiklos created this revision. vmiklos added reviewers: alexfh, malcolm.parsons. Herald added a subscriber: cfe-commits. And also enable it by default to be consistent with e.g. modernize-use-using. This improves consistency inside the check itself as well: both checks are now disabled in macros

LLVM buildmaster will be restarted tonight

2018-10-12 Thread Galina Kistanova via cfe-commits
Hello everyone, LLVM buildmaster will be updated and restarted after 6PM Pacific time today. Thanks Galina ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D53066: [RFC] [MinGW] Print paths with forward slashes in commands printed with -v

2018-10-12 Thread Reid Kleckner via Phabricator via cfe-commits
rnk added inline comments. Comment at: lib/Driver/Job.cpp:104-105 + std::string Buf; + if (PathStyle == llvm::sys::path::Style::posix) { +Buf = llvm::sys::path::convert_to_slash(Arg); +Arg = Buf; This is blindly treating every argument as if it were a p

[PATCH] D53066: [RFC] [MinGW] Print paths with forward slashes in commands printed with -v

2018-10-12 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo added a comment. Ping @rnk or others with good ideas Repository: rC Clang https://reviews.llvm.org/D53066 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

r344413 - [OPENMP][NVPTX]Reduce memory usage in target region.

2018-10-12 Thread Alexey Bataev via cfe-commits
Author: abataev Date: Fri Oct 12 13:19:59 2018 New Revision: 344413 URL: http://llvm.org/viewvc/llvm-project?rev=344413&view=rev Log: [OPENMP][NVPTX]Reduce memory usage in target region. Additional reduction of the global memory usage in the target regions without parallel regions. Modified:

[PATCH] D53195: [MinGW] Allow using LTO when lld is used as linker

2018-10-12 Thread Martin Storsjö via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL344412: [MinGW] Allow using LTO when lld is used as linker (authored by mstorsjo, committed by ). Herald added a subscriber: llvm-commits. Changed prior to commit: https://reviews.llvm.org/D53195?vs=169

r344412 - [MinGW] Allow using LTO when lld is used as linker

2018-10-12 Thread Martin Storsjo via cfe-commits
Author: mstorsjo Date: Fri Oct 12 13:15:51 2018 New Revision: 344412 URL: http://llvm.org/viewvc/llvm-project?rev=344412&view=rev Log: [MinGW] Allow using LTO when lld is used as linker Differential Revision: https://reviews.llvm.org/D53195 Added: cfe/trunk/test/Driver/mingw-lto.c Modified:

[PATCH] D53153: [OpenCL] Mark namespace scope variables and kernel functions with default visibility

2018-10-12 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added a comment. In https://reviews.llvm.org/D53153#1263848, @scott.linder wrote: > Beyond constructors/destructors I believe an API which we implement through > access to dynamic symbols for global variable is `clGetProgramBuildInfo(..., > CL_PROGRAM_BUILD_GLOBAL_VARIABLE_TOTAL_SIZE, ..

[PATCH] D53212: inhereit LLVM_ENABLE_LIBXML2

2018-10-12 Thread David Callahan via Phabricator via cfe-commits
david2050 updated this revision to Diff 169482. david2050 added a comment. fix typo Repository: rC Clang https://reviews.llvm.org/D53212 Files: CMakeLists.txt Index: CMakeLists.txt === --- CMakeLists.txt +++ CMakeLists.txt @

[PATCH] D53212: inhereit LLVM_ENABLE_LIBXML2

2018-10-12 Thread Michał Górny via Phabricator via cfe-commits
mgorny added inline comments. Comment at: CMakeLists.txt:92 option(CLANG_ENABLE_BOOTSTRAP "Generate the clang bootstrap target" OFF) + option(LLVM_ENABLE_LIBXM2 "Use libxml2 if available." ON) I suppose it will work better without typos. Repository: rC

[PATCH] D53213: [clangd] Send CodeAction responses to textDocument/codeAction (LSP 3.8)

2018-10-12 Thread Sam McCall via Phabricator via cfe-commits
sammccall created this revision. sammccall added a reviewer: kadircet. Herald added subscribers: cfe-commits, arphaman, jkorous, MaskRay, ioeric, ilya-biryukov. I don't bother mirroring the full capabilities struct, just parse the bits we care about. I'll send a new patch to use this approach els

[PATCH] D53212: inhereit LLVM_ENABLE_LIBXML2

2018-10-12 Thread David Callahan via Phabricator via cfe-commits
david2050 created this revision. Herald added subscribers: cfe-commits, mgorny. When building in an LLVM context, we should respect its LLVM_ENABLE_LIBXML2 option. Repository: rC Clang https://reviews.llvm.org/D53212 Files: CMakeLists.txt Index: CMakeLists.txt ==

[PATCH] D53153: [OpenCL] Mark namespace scope variables and kernel functions with default visibility

2018-10-12 Thread Scott Linder via Phabricator via cfe-commits
scott.linder added a comment. Beyond constructors/destructors I believe an API which we implement through access to dynamic symbols for global variable is `clGetProgramBuildInfo(..., CL_PROGRAM_BUILD_GLOBAL_VARIABLE_TOTAL_SIZE, ...)` which is defined as "The total amount of storage, in bytes, u

r344411 - [python] [tests] Re-add once again, this time without Windows

2018-10-12 Thread Michal Gorny via cfe-commits
Author: mgorny Date: Fri Oct 12 13:03:54 2018 New Revision: 344411 URL: http://llvm.org/viewvc/llvm-project?rev=344411&view=rev Log: [python] [tests] Re-add once again, this time without Windows Modified: cfe/trunk/bindings/python/tests/CMakeLists.txt Modified: cfe/trunk/bindings/python/test

[PATCH] D53153: [OpenCL] Mark namespace scope variables and kernel functions with default visibility

2018-10-12 Thread Scott Linder via Phabricator via cfe-commits
scott.linder added a comment. In https://reviews.llvm.org/D53153#1263835, @yaxunl wrote: > In https://reviews.llvm.org/D53153#1263810, @scott.linder wrote: > > > In https://reviews.llvm.org/D53153#1263804, @rsmith wrote: > > > > > In https://reviews.llvm.org/D53153#1263771, @scott.linder wrote: >

r344408 - Revert rL344365: [tests] Readd Python binding tests to check-all

2018-10-12 Thread Simon Pilgrim via cfe-commits
Author: rksimon Date: Fri Oct 12 12:46:40 2018 New Revision: 344408 URL: http://llvm.org/viewvc/llvm-project?rev=344408&view=rev Log: Revert rL344365: [tests] Readd Python binding tests to check-all Windows buildbots are still not happy Now that both issues found out during the last iteration ha

[PATCH] D53153: [OpenCL] Mark namespace scope variables and kernel functions with default visibility

2018-10-12 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added a comment. In https://reviews.llvm.org/D53153#1263810, @scott.linder wrote: > In https://reviews.llvm.org/D53153#1263804, @rsmith wrote: > > > In https://reviews.llvm.org/D53153#1263771, @scott.linder wrote: > > > > > The rationale is that `-fvisibility` only affects the default, and

[PATCH] D53197: [clang-format] Fix BraceWrapping AfterFunction for ObjC methods

2018-10-12 Thread Ben Hamilton via Phabricator via cfe-commits
benhamilton added a comment. > @benhamilton Could you land this patch? Done. Thanks for your contribution! Repository: rC Clang https://reviews.llvm.org/D53197 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin

[PATCH] D53197: [clang-format] Fix BraceWrapping AfterFunction for ObjC methods

2018-10-12 Thread Ben Hamilton via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC344406: [clang-format] Fix BraceWrapping AfterFunction for ObjC methods (authored by benhamilton, committed by ). Repository: rC Clang https://reviews.llvm.org/D53197 Files: lib/Format/UnwrappedLine

r344406 - [clang-format] Fix BraceWrapping AfterFunction for ObjC methods

2018-10-12 Thread Ben Hamilton via cfe-commits
Author: benhamilton Date: Fri Oct 12 12:43:01 2018 New Revision: 344406 URL: http://llvm.org/viewvc/llvm-project?rev=344406&view=rev Log: [clang-format] Fix BraceWrapping AfterFunction for ObjC methods Summary: > clang-format --version > clang-format version 7.0.0 (tags/RELEASE_700/final) > echo

[PATCH] D53207: Fix bug 26547 - alignof should return ABI alignment, not preferred alignment

2018-10-12 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added a comment. Thanks, this generally looks good, but it needs tests. For `_Alignof`, test/Sema/align-x86.c` would be a reasonable place for the test; for C++ `alignof`, I don't see a suitable existing test file, but you could add one to test/SemaCXX, perhaps based on test/Sema/align-x

[PATCH] D53001: [Driver] check for exit code from SIGPIPE

2018-10-12 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers marked an inline comment as done. nickdesaulniers added inline comments. Comment at: cfe/trunk/lib/Driver/Driver.cpp:81-85 +#include #include #if LLVM_ON_UNIX #include // getpid #endif nickdesaulniers wrote: > @rnk || @majnemer thoughts on

[PATCH] D53210: Revert 344389 "Revert r344375 "[Driver] check for exit code from SIGPIPE""

2018-10-12 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers created this revision. nickdesaulniers added reviewers: rnk, majnemer, jfb. Herald added a subscriber: cfe-commits. Add preprocessor guards for UNIX. This reverts commit c2275676c1bde4ed20c06affdeeb1a93692f29a8. Repository: rC Clang https://reviews.llvm.org/D53210 Files: l

[PATCH] D53153: [OpenCL] Mark namespace scope variables and kernel functions with default visibility

2018-10-12 Thread Scott Linder via Phabricator via cfe-commits
scott.linder added a subscriber: b-sumner. scott.linder added a comment. In https://reviews.llvm.org/D53153#1263804, @rsmith wrote: > In https://reviews.llvm.org/D53153#1263771, @scott.linder wrote: > > > The rationale is that `-fvisibility` only affects the default, and already > > does not app

[PATCH] D53153: [OpenCL] Mark namespace scope variables and kernel functions with default visibility

2018-10-12 Thread Scott Linder via Phabricator via cfe-commits
scott.linder added a comment. That's my understanding, at least. Take for example: $ cat foo.c static void foo() { } void bar() { } void baz() { bar(); foo(); } $ clang -fvisibility=protected -O0 -S -emit-llvm foo.c -o - ... ; Function Attrs: noinline nounwind optnone uwtab

[PATCH] D53153: [OpenCL] Mark namespace scope variables and kernel functions with default visibility

2018-10-12 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added a comment. In https://reviews.llvm.org/D53153#1263771, @scott.linder wrote: > The rationale is that `-fvisibility` only affects the default, and already > does not apply in many cases. For example, see the rest of the conditions > above the fvisibility check in `getLVForNamespaceSc

r344400 - Fix a clang::driver::ArgStringList usage I missed in rL344398. NFCI.

2018-10-12 Thread Simon Pilgrim via cfe-commits
Author: rksimon Date: Fri Oct 12 12:14:43 2018 New Revision: 344400 URL: http://llvm.org/viewvc/llvm-project?rev=344400&view=rev Log: Fix a clang::driver::ArgStringList usage I missed in rL344398. NFCI. Modified: cfe/trunk/examples/clang-interpreter/main.cpp Modified: cfe/trunk/examples/clan

[PATCH] D53153: [OpenCL] Mark namespace scope variables and kernel functions with default visibility

2018-10-12 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added a comment. In https://reviews.llvm.org/D53153#1263771, @scott.linder wrote: > The rationale is that `-fvisibility` only affects the default, and already > does not apply in many cases. For example, see the rest of the conditions > above the fvisibility check in `getLVForNamespaceSc

[PATCH] D52839: Inform AST's UnaryOperator of FENV_ACCESS

2018-10-12 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added a comment. In https://reviews.llvm.org/D52839#1262449, @kpn wrote: > I forgot to address the template question. I've spend the past 18 years doing > SystemZ backend work on multiple {,JIT} compilers. I'm not really in a > position to answer your question about how to handle getting

r344398 - Consistently make llvm::opt::ArgStringList usage explicit to try and appease MSVC 2015 buildbots. NFCI.

2018-10-12 Thread Simon Pilgrim via cfe-commits
Author: rksimon Date: Fri Oct 12 11:55:36 2018 New Revision: 344398 URL: http://llvm.org/viewvc/llvm-project?rev=344398&view=rev Log: Consistently make llvm::opt::ArgStringList usage explicit to try and appease MSVC 2015 buildbots. NFCI. Modified: cfe/trunk/include/clang/Driver/Job.h cfe

[PATCH] D45050: [clang-tidy] New checker for not null-terminated result caused by strlen(), size() or equal length

2018-10-12 Thread Jonas Toth via Phabricator via cfe-commits
JonasToth added a comment. Committed with https://reviews.llvm.org/rCTE344374 https://reviews.llvm.org/D45050 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D53025: [clang-tidy] implement new check for const return types.

2018-10-12 Thread Jonas Toth via Phabricator via cfe-commits
JonasToth added inline comments. Comment at: clang-tidy/readability/ConstValueReturnCheck.cpp:25 + +// Finds the location of the relevant "const" token in `Def`. +llvm::Optional findConstToRemove( ymandel wrote: > JonasToth wrote: > > ymandel wrote: > > > JonasTo

[PATCH] D45050: [clang-tidy] New checker for not null-terminated result caused by strlen(), size() or equal length

2018-10-12 Thread Csaba Dabis via Phabricator via cfe-commits
Charusso added a comment. Thanks everyone for the contribution! https://reviews.llvm.org/D45050 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D53001: [Driver] check for exit code from SIGPIPE

2018-10-12 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers added inline comments. Comment at: cfe/trunk/lib/Driver/Driver.cpp:81-85 +#include #include #if LLVM_ON_UNIX #include // getpid #endif @rnk || @majnemer thoughts on making this: ``` #if LLVM_ON_UNIX ​#include // getpid #include // EX_IOE

[PATCH] D53195: [MinGW] Allow using LTO when lld is used as linker

2018-10-12 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo added inline comments. Comment at: lib/Driver/ToolChains/MinGW.cpp:383 + Args.getLastArgValue(options::OPT_fuse_ld_EQ, CLANG_DEFAULT_LINKER) + .equals_lower("lld"); } rnk wrote: > I thought we supported putting paths in this option, but I

Re: r344375 - [Driver] check for exit code from SIGPIPE

2018-10-12 Thread Nick Desaulniers via cfe-commits
Thanks for the quick revert to keep the build green; sorry for breaking it. Maybe we can discuss a fix in: https://reviews.llvm.org/D53001 On Fri, Oct 12, 2018 at 11:11 AM Reid Kleckner wrote: > > This patch makes a lot of posix assumptions, and that header file doesn't > exist on Windows. I reve

[PATCH] D53195: [MinGW] Allow using LTO when lld is used as linker

2018-10-12 Thread Reid Kleckner via Phabricator via cfe-commits
rnk accepted this revision. rnk added a comment. This revision is now accepted and ready to land. lgtm Comment at: lib/Driver/ToolChains/MinGW.cpp:383 + Args.getLastArgValue(options::OPT_fuse_ld_EQ, CLANG_DEFAULT_LINKER) + .equals_lower("lld"); }

[PATCH] D53001: [Driver] check for exit code from SIGPIPE

2018-10-12 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers added a comment. @rnk has reverted this due to breaking the windows build (sysexits.h) is not available there. Repository: rL LLVM https://reviews.llvm.org/D53001 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lis

[PATCH] D53153: [OpenCL] Mark namespace scope variables and kernel functions with default visibility

2018-10-12 Thread Scott Linder via Phabricator via cfe-commits
scott.linder added a comment. The rationale is that `-fvisibility` only affects the default, and already does not apply in many cases. For example, see the rest of the conditions above the fvisibility check in `getLVForNamespaceScopeDecl`: when `Var->getStorageClass() == SC_Static` the linkage

[PATCH] D52784: [ARM][AArch64] Pass through endianness flags to the GNU assembler and linker

2018-10-12 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers added inline comments. Comment at: lib/Driver/ToolChains/Gnu.cpp:357-364 +const char* EndianFlag = "-EL"; +if (isArmBigEndian(Triple, Args)) { + EndianFlag = "-EB"; + arm::appendBE8LinkFlag(Args, CmdArgs, Triple); +} +else if (Arch == llv

[PATCH] D52784: [ARM][AArch64] Pass through endianness flags to the GNU assembler and linker

2018-10-12 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers added a comment. Thanks for the addition of the flags to the linker. Interesting note about `-m*-endian` only being applicable for armv7. Just some minor nits left. With the current version of the patch, I can now assemble, link, and boot in a virtualized environment a big-endi

[PATCH] D53206: Allow padding checker to traverse simple class hierarchies

2018-10-12 Thread Ben Craig via Phabricator via cfe-commits
bcraig added a comment. You should probably add whoever the current code owner of that static analyzer to this review. I have very little involvement with Clang these days, so a "LGTM" from me doesn't carry much weight. Comment at: lib/StaticAnalyzer/Checkers/PaddingChecker.

[PATCH] D52839: Inform AST's UnaryOperator of FENV_ACCESS

2018-10-12 Thread Kevin P. Neal via Phabricator via cfe-commits
kpn updated this revision to Diff 169464. kpn added a comment. Upload the correct diff this time. Sorry about the confusion! https://reviews.llvm.org/D52839 Files: include/clang/AST/Expr.h lib/AST/ASTImporter.cpp lib/Analysis/BodyFarm.cpp lib/CodeGen/CGExprScalar.cpp lib/CodeGen/CGObj

Re: r344375 - [Driver] check for exit code from SIGPIPE

2018-10-12 Thread Reid Kleckner via cfe-commits
This patch makes a lot of posix assumptions, and that header file doesn't exist on Windows. I reverted this to fix the build, but you might want to reconsider how this is designed. On Fri, Oct 12, 2018 at 10:24 AM Nick Desaulniers via cfe-commits < cfe-commits@lists.llvm.org> wrote: > Author: nic

r344389 - Revert r344375 "[Driver] check for exit code from SIGPIPE"

2018-10-12 Thread Reid Kleckner via cfe-commits
Author: rnk Date: Fri Oct 12 11:08:11 2018 New Revision: 344389 URL: http://llvm.org/viewvc/llvm-project?rev=344389&view=rev Log: Revert r344375 "[Driver] check for exit code from SIGPIPE" This doesn't build on Windows. Modified: cfe/trunk/lib/Driver/Driver.cpp Modified: cfe/trunk/lib/Drive

[PATCH] D52839: Inform AST's UnaryOperator of FENV_ACCESS

2018-10-12 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added a comment. I think you have uploaded the wrong patch here. https://reviews.llvm.org/D52839 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D53025: [clang-tidy] implement new check for const return types.

2018-10-12 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel marked 5 inline comments as done. ymandel added inline comments. Comment at: clang-tidy/readability/ConstValueReturnCheck.cpp:60 +diag(Def->getInnerLocStart(), + "return type is 'const'-qualifed (possibly behind a type alias), " + "which hinders compil

[PATCH] D53153: [OpenCL] Mark namespace scope variables and kernel functions with default visibility

2018-10-12 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added a comment. This approach is trying to make OpenCL kernel and variable exceptions to -fvisibility option. However it does not provide users with choices. What if a user really wants to change the visibility of kernels and variables by -fvisibility? I think is more like a hack compar

[PATCH] D52839: Inform AST's UnaryOperator of FENV_ACCESS

2018-10-12 Thread Kevin P. Neal via Phabricator via cfe-commits
kpn updated this revision to Diff 169463. kpn added a comment. Address review comments. https://reviews.llvm.org/D52839 Files: include/llvm/IR/IRBuilder.h Index: include/llvm/IR/IRBuilder.h === --- include/llvm/IR/IRBuilder.h ++

[PATCH] D53025: [clang-tidy] implement new check for const return types.

2018-10-12 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel added inline comments. Comment at: clang-tidy/readability/ConstValueReturnCheck.cpp:25 + +// Finds the location of the relevant "const" token in `Def`. +llvm::Optional findConstToRemove( JonasToth wrote: > ymandel wrote: > > JonasToth wrote: > > > s/"cons

r344388 - [Doc] fix second error in UsersManual

2018-10-12 Thread Jonas Toth via cfe-commits
Author: jonastoth Date: Fri Oct 12 10:57:18 2018 New Revision: 344388 URL: http://llvm.org/viewvc/llvm-project?rev=344388&view=rev Log: [Doc] fix second error in UsersManual Modified: cfe/trunk/docs/UsersManual.rst Modified: cfe/trunk/docs/UsersManual.rst URL: http://llvm.org/viewvc/llvm-pr

[PATCH] D53025: [clang-tidy] implement new check for const return types.

2018-10-12 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel updated this revision to Diff 169461. ymandel marked 3 inline comments as done. ymandel added a comment. Adjusted reporting of warnings. Also, addressed other comments. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D53025 Files: clang-tidy/readability/CMakeLists.txt

[clang-tools-extra] r344384 - [clangd] NFC fix semicolon warning

2018-10-12 Thread Jonas Toth via cfe-commits
Author: jonastoth Date: Fri Oct 12 10:47:43 2018 New Revision: 344384 URL: http://llvm.org/viewvc/llvm-project?rev=344384&view=rev Log: [clangd] NFC fix semicolon warning Modified: clang-tools-extra/trunk/clangd/index/IndexAction.cpp Modified: clang-tools-extra/trunk/clangd/index/IndexAction

r344382 - [Doc] fix BB, add code-block type

2018-10-12 Thread Jonas Toth via cfe-commits
Author: jonastoth Date: Fri Oct 12 10:44:01 2018 New Revision: 344382 URL: http://llvm.org/viewvc/llvm-project?rev=344382&view=rev Log: [Doc] fix BB, add code-block type Modified: cfe/trunk/docs/UsersManual.rst Modified: cfe/trunk/docs/UsersManual.rst URL: http://llvm.org/viewvc/llvm-projec

[clang-tools-extra] r344379 - [doc] fix markup in clang-tidy bugprone-not-null-terminated-result

2018-10-12 Thread Jonas Toth via cfe-commits
Author: jonastoth Date: Fri Oct 12 10:36:04 2018 New Revision: 344379 URL: http://llvm.org/viewvc/llvm-project?rev=344379&view=rev Log: [doc] fix markup in clang-tidy bugprone-not-null-terminated-result Modified: clang-tools-extra/trunk/docs/clang-tidy/checks/bugprone-not-null-terminated-res

[PATCH] D53038: [Hexagon] Use GetLinkerPath method instead of hard-coded linker name.

2018-10-12 Thread Sid Manning via Phabricator via cfe-commits
sidneym added a comment. Seems like the test cases do not consider the possibility of CLANG_DEFAULT_LINKER being set. If CLANG_DEFAULT_LINKER was set to "hexagon-link" these tests would probably pass. I'm checking this out now. Repository: rC Clang https://reviews.llvm.org/D53038 _

[PATCH] D53001: [Driver] check for exit code from SIGPIPE

2018-10-12 Thread Nick Desaulniers via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL344375: [Driver] check for exit code from SIGPIPE (authored by nickdesaulniers, committed by ). Herald added a subscriber: llvm-commits. Repository: rL LLVM https://reviews.llvm.org/D53001 Files: cf

r344375 - [Driver] check for exit code from SIGPIPE

2018-10-12 Thread Nick Desaulniers via cfe-commits
Author: nickdesaulniers Date: Fri Oct 12 10:22:46 2018 New Revision: 344375 URL: http://llvm.org/viewvc/llvm-project?rev=344375&view=rev Log: [Driver] check for exit code from SIGPIPE Summary: D53000 adds a special exit code for SIGPIPE (writing to a closed reader), and rather than print a fatal

[clang-tools-extra] r344374 - [clang-tidy] New checker for not null-terminated result caused by strlen(), size() or equal length

2018-10-12 Thread Jonas Toth via cfe-commits
Author: jonastoth Date: Fri Oct 12 10:22:36 2018 New Revision: 344374 URL: http://llvm.org/viewvc/llvm-project?rev=344374&view=rev Log: [clang-tidy] New checker for not null-terminated result caused by strlen(), size() or equal length New checker called bugprone-not-null-terminated-result. This

  1   2   3   >