[PATCH] D45679: [clang-tidy] Add a helper function isModified, that checks whether an expression is modified within a statement.

2018-04-17 Thread Shuai Wang via Phabricator via cfe-commits
shuaiwang updated this revision to Diff 142882. shuaiwang added a comment. Better range for loop handling. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D45679 Files: clang-tidy/utils/ASTUtils.cpp clang-tidy/utils/ASTUtils.h unittests/clang-tidy/CMakeLists.txt

[PATCH] D45442: Parse .h files as objective-c++ if we don't have a compile command.

2018-04-17 Thread Sam McCall via Phabricator via cfe-commits
sammccall added a comment. @ilya-biryukov Ping :-) Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D45442 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D45685: [Sema] Add -wtest global flag that silences -Wself-assign for overloaded operators.

2018-04-17 Thread Nico Weber via Phabricator via cfe-commits
thakis added a comment. +1 to just adding a dedicated Wno flag for the new warning instead of coming up with this new spelling. Repository: rC Clang https://reviews.llvm.org/D45685 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

Re: [PATCH] D45685: [Sema] Add -wtest global flag that silences -Wself-assign for overloaded operators.

2018-04-17 Thread Nico Weber via cfe-commits
+1 to just adding a dedicated Wno flag for the new warning instead of coming up with this new spelling. On Mon, Apr 16, 2018, 3:41 PM Roman Lebedev via Phabricator via cfe-commits wrote: > lebedev.ri added a comment. > > Uuuh, the fact that phab posts the

[PATCH] D45679: [clang-tidy] Add a helper function isModified, that checks whether an expression is modified within a statement.

2018-04-17 Thread Shuai Wang via Phabricator via cfe-commits
shuaiwang updated this revision to Diff 142878. shuaiwang added a comment. Handle range-based for loop Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D45679 Files: clang-tidy/utils/ASTUtils.cpp clang-tidy/utils/ASTUtils.h unittests/clang-tidy/CMakeLists.txt

[PATCH] D39053: [Bitfield] Add more cases to making the bitfield a separate location

2018-04-17 Thread Mandeep Singh Grang via Phabricator via cfe-commits
mgrang added a comment. Added @apazos and myself a reviewers since this is something we would be interested in getting to work. https://reviews.llvm.org/D39053 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D45679: [clang-tidy] Add a helper function isModified, that checks whether an expression is modified within a statement.

2018-04-17 Thread Shuai Wang via Phabricator via cfe-commits
shuaiwang updated this revision to Diff 142870. shuaiwang edited the summary of this revision. shuaiwang added a comment. Handle casts, ternary operator and lambdas. Also optionally returns a chain of Stmt giving more details about how the conclusion is reached. Repository: rCTE Clang Tools

[PATCH] D45750: add extra acronyms for objc property names

2018-04-17 Thread Yan Zhang via Phabricator via cfe-commits
Wizard created this revision. Herald added subscribers: cfe-commits, klimek. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D45750 Files: clang-tidy/objc/PropertyDeclarationCheck.cpp test/clang-tidy/objc-property-declaration.m Index:

[PATCH] D45489: [HIP] Add input type for HIP

2018-04-17 Thread Artem Belevich via Phabricator via cfe-commits
tra added a comment. I'm getting confused about the order of the patches. The patch stack phabricator displays in this patch is different compared to the stack in https://reviews.llvm.org/D44984. Which one should I trust? https://reviews.llvm.org/D45489

[PATCH] D45212: [HIP] Let CUDA toolchain support HIP language mode and amdgpu

2018-04-17 Thread Artem Belevich via Phabricator via cfe-commits
tra requested changes to this revision. tra added a subscriber: jlebar. tra added a comment. This revision now requires changes to proceed. Sorry about the delay. I've been out for few days. Comment at: include/clang/Driver/Options.td:552-553 +def : Joined<["--"],

[PATCH] D45662: OpenBSD add C++ runtime in a driver's standpoint

2018-04-17 Thread Dean Michael Berris via Phabricator via cfe-commits
dberris accepted this revision. dberris added a comment. This revision is now accepted and ready to land. LGTM Thanks for working through this @devnexen! I can land this a little later on my day (Sydney, Australia). https://reviews.llvm.org/D45662

[PATCH] D45671: [python bindings] Fix Cursor.result_type for ObjC method declarations - Bug 36677

2018-04-17 Thread Kyle Teske via Phabricator via cfe-commits
kjteske added a comment. First time llvm contributor here, so no commit access. @jbcoe, can you commit this for me? Repository: rC Clang https://reviews.llvm.org/D45671 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D44670: [CXX] Templates specialization visibility can be wrong

2018-04-17 Thread Doug Gregor via Phabricator via cfe-commits
doug.gregor added inline comments. Comment at: lib/AST/Decl.cpp:1078 +for (const auto *RD : + spec->getSpecializedTemplate()->getTemplatedDecl()->redecls()) { + auto Vis = getVisibilityOf(RD, kind); Do we want to look at *all* redeclarations, or

[PATCH] D45544: [AAch64] Add the __ARM_FEATURE_DOTPROD macro definition

2018-04-17 Thread Junmo Park via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL330229: [AAch64] Add the __ARM_FEATURE_DOTPROD macro definition (authored by flyingforyou, committed by ). Herald added subscribers: llvm-commits, chrib. Changed prior to commit:

[PATCH] D44984: [HIP] Add hip input kind and codegen for kernel launching

2018-04-17 Thread Artem Belevich via Phabricator via cfe-commits
tra added inline comments. Comment at: lib/CodeGen/CGCUDANV.cpp:51-52 llvm::Constant *getLaunchFn() const; + std::string addPrefixToName(CodeGenModule , StringRef FuncName) const; + std::string addUnderscoredPrefixToName(CodeGenModule , +

[PATCH] D45741: Python bindings: Fix handling of file bodies with multi-byte characters

2018-04-17 Thread Maximilian Heinzler via Phabricator via cfe-commits
mheinzler created this revision. mheinzler added a reviewer: clang. Herald added a subscriber: cfe-commits. With python3 there is a difference between the length of the string and the length of the utf-8 encoded bytes array. To not cut off characters at the end when the string contains

[PATCH] D45738: Add Microsoft mangling for _Float16, similar to technique used for _Complex

2018-04-17 Thread Erich Keane via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL330225: Add Microsoft mangling for _Float16 (authored by erichkeane, committed by ). Changed prior to commit: https://reviews.llvm.org/D45738?vs=142827=142846#toc Repository: rL LLVM

r330225 - Add Microsoft mangling for _Float16

2018-04-17 Thread Erich Keane via cfe-commits
Author: erichkeane Date: Tue Apr 17 15:00:54 2018 New Revision: 330225 URL: http://llvm.org/viewvc/llvm-project?rev=330225=rev Log: Add Microsoft mangling for _Float16 Enables _Float16 on Windows by creating a mangling mechanism in MicrosoftMangle. It accomplishes this by mangling as a

[PATCH] D45716: [XRay] Add clang builtin for xray typed events.

2018-04-17 Thread Keith via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL330220: [XRay] Add clang builtin for xray typed events. (authored by kpw, committed by ). Repository: rC Clang https://reviews.llvm.org/D45716 Files: cfe/trunk/include/clang/Basic/Builtins.def

[PATCH] D45716: [XRay] Add clang builtin for xray typed events.

2018-04-17 Thread Keith via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC330220: [XRay] Add clang builtin for xray typed events. (authored by kpw, committed by ). Changed prior to commit: https://reviews.llvm.org/D45716?vs=142790=142836#toc Repository: rC Clang

[PATCH] D45738: Add Microsoft mangling for _Float16, similar to technique used for _Complex

2018-04-17 Thread David Majnemer via Phabricator via cfe-commits
majnemer accepted this revision. majnemer added a comment. This revision is now accepted and ready to land. LGTM Repository: rL LLVM https://reviews.llvm.org/D45738 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D45738: Add Microsoft mangling for _Float16, similar to technique used for _Complex

2018-04-17 Thread Erich Keane via Phabricator via cfe-commits
erichkeane added a comment. FWIW, this demangles on both demangler.com and undname as "void __cdecl Float16::f(struct __clang::_Float16)", which seems like the right thing, since the "Complex" above demangles to: "void __cdecl Complex::f(struct __clang::_Complex)" I also note (since upon

[PATCH] D45738: Add Microsoft mangling for _Float16, similar to technique used for _Complex

2018-04-17 Thread Melanie Blower via Phabricator via cfe-commits
mibintc created this revision. mibintc added reviewers: erichkeane, cfe-commits, majnemer. Herald added a subscriber: llvm-commits. Microsoft doesn't support _Float16, so this patch invents a mangling using the technique that was used for _Complex, putting _Float16 into __clang namespace. What

[PATCH] D45291: [Driver] Infer Android sysroot location.

2018-04-17 Thread Dan Albert via Phabricator via cfe-commits
danalbert added a comment. Ping? Repository: rC Clang https://reviews.llvm.org/D45291 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D45292: [Driver] Obey computed sysroot when finding libc++ headers.

2018-04-17 Thread Dan Albert via Phabricator via cfe-commits
danalbert added a comment. Ping? Repository: rC Clang https://reviews.llvm.org/D45292 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D45504: [MinGW] Look for a cross sysroot relative to the clang binary

2018-04-17 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo added a comment. In https://reviews.llvm.org/D45504#1070198, @rnk wrote: > Sorry, I skipped over the message and looked at the code, which seems pretty > straightforward. > > > Tests still are TBD, but posting this early to see if there's comments. > > (How do I easily do a test that

[PATCH] D45504: [MinGW] Look for a cross sysroot relative to the clang binary

2018-04-17 Thread Reid Kleckner via Phabricator via cfe-commits
rnk added a comment. Sorry, I skipped over the message and looked at the code, which seems pretty straightforward. > Tests still are TBD, but posting this early to see if there's comments. (How > do I easily do a test that checks something relative to the clang binary, > since I don't control

[PATCH] D45504: [MinGW] Look for a cross sysroot relative to the clang binary

2018-04-17 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 https://reviews.llvm.org/D45504 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D45290: [Driver] Use the per-API level Android library directories.

2018-04-17 Thread Dan Albert via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL330213: [Driver] Use the per-API level Android library directories. (authored by danalbert, committed by ). Herald added a subscriber: llvm-commits. Repository: rL LLVM https://reviews.llvm.org/D45290

[PATCH] D44882: [clangd] Implementation of workspace/symbol request

2018-04-17 Thread Sam McCall via Phabricator via cfe-commits
sammccall added a comment. Sorry, missed this. Just a few leftovers from removing the line/col conversion code. Then ship it! Comment at: clangd/ClangdServer.h:166 + // FIXME: Remove this parameter when the index has line/col. + const

r330212 - Require shell for test

2018-04-17 Thread Teresa Johnson via cfe-commits
Author: tejohnson Date: Tue Apr 17 13:36:51 2018 New Revision: 330212 URL: http://llvm.org/viewvc/llvm-project?rev=330212=rev Log: Require shell for test Attempt to fix windows bot which doesn't like the "(cd .." invocation added in r330194:

[PATCH] D45504: [MinGW] Look for a cross sysroot relative to the clang binary

2018-04-17 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo added a comment. Ping https://reviews.llvm.org/D45504 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D45615: [builtins] __builtin_dump_struct : added more types format

2018-04-17 Thread Paul Semel via Phabricator via cfe-commits
paulsemel added a comment. In https://reviews.llvm.org/D45615#1069755, @aaron.ballman wrote: > LGTM! I will go ahead and commit on your behalf. Btw, if you're thinking of > making additional patches, now might be a good time to ask for commit > privileges >

Re: r330210 - Remove unused variable

2018-04-17 Thread Peter Collingbourne via cfe-commits
FWIW, I don't think you actually need the if. Peter On Tue, Apr 17, 2018 at 1:21 PM, Teresa Johnson via cfe-commits < cfe-commits@lists.llvm.org> wrote: > Author: tejohnson > Date: Tue Apr 17 13:21:53 2018 > New Revision: 330210 > > URL: http://llvm.org/viewvc/llvm-project?rev=330210=rev > Log:

[PATCH] D45217: [ThinLTO] Pass -save-temps to LTO backend for distributed ThinLTO builds

2018-04-17 Thread Teresa Johnson via Phabricator via cfe-commits
tejohnson added inline comments. Comment at: cfe/trunk/lib/Driver/ToolChains/Clang.cpp:3270 + if (const Arg *A = Args.getLastArg(options::OPT_save_temps_EQ)) +Args.AddLastArg(CmdArgs, options::OPT_save_temps_EQ); tejohnson wrote: > bjope wrote: > > A is

r330210 - Remove unused variable

2018-04-17 Thread Teresa Johnson via cfe-commits
Author: tejohnson Date: Tue Apr 17 13:21:53 2018 New Revision: 330210 URL: http://llvm.org/viewvc/llvm-project?rev=330210=rev Log: Remove unused variable Fixes unused variable error introduced in r330194. Modified: cfe/trunk/lib/Driver/ToolChains/Clang.cpp Modified:

[PATCH] D45290: [Driver] Use the per-API level Android library directories.

2018-04-17 Thread Dan Albert via Phabricator via cfe-commits
danalbert marked an inline comment as done. danalbert added inline comments. Comment at: lib/Driver/ToolChains/Linux.cpp:25 #include "llvm/Support/Path.h" +#include "llvm/Support/ScopedPrinter.h" #include eugenis wrote: > I don't see why this include is

[PATCH] D45217: [ThinLTO] Pass -save-temps to LTO backend for distributed ThinLTO builds

2018-04-17 Thread Teresa Johnson via Phabricator via cfe-commits
tejohnson added inline comments. Comment at: cfe/trunk/lib/Driver/ToolChains/Clang.cpp:3270 + if (const Arg *A = Args.getLastArg(options::OPT_save_temps_EQ)) +Args.AddLastArg(CmdArgs, options::OPT_save_temps_EQ); bjope wrote: > A is not used, so this does

[PATCH] D45217: [ThinLTO] Pass -save-temps to LTO backend for distributed ThinLTO builds

2018-04-17 Thread Bjorn Pettersson via Phabricator via cfe-commits
bjope added inline comments. Comment at: cfe/trunk/lib/Driver/ToolChains/Clang.cpp:3270 + if (const Arg *A = Args.getLastArg(options::OPT_save_temps_EQ)) +Args.AddLastArg(CmdArgs, options::OPT_save_temps_EQ); A is not used, so this does not compile when

[PATCH] D44984: [HIP] Add hip input kind and codegen for kernel launching

2018-04-17 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl updated this revision to Diff 142818. yaxunl marked an inline comment as done. yaxunl retitled this revision from "[HIP] Add hip file type and codegen for kernel launching" to "[HIP] Add hip input kind and codegen for kernel launching". yaxunl edited the summary of this revision. yaxunl

[PATCH] D44984: [HIP] Add hip file type and codegen for kernel launching

2018-04-17 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl marked 2 inline comments as done. yaxunl added inline comments. Comment at: lib/Frontend/CompilerInvocation.cpp:2109 + Opts.HIP = true; + } + rjmccall wrote: > yaxunl wrote: > > rjmccall wrote: > > > Why is this done here? We infer the language

[PATCH] D45697: [clang-tidy] Fix clang-tidy doesn't read .clangtidy configuration file.

2018-04-17 Thread Haojian Wu via Phabricator via cfe-commits
hokein updated this revision to Diff 142817. hokein marked an inline comment as done. hokein added a comment. Make grep pattern more obvious. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D45697 Files: clang-tidy/ClangTidyOptions.cpp clang-tidy/ClangTidyOptions.h

[libclc] r330205 - pow: Use denormal path only

2018-04-17 Thread Jan Vesely via cfe-commits
Author: jvesely Date: Tue Apr 17 12:35:28 2018 New Revision: 330205 URL: http://llvm.org/viewvc/llvm-project?rev=330205=rev Log: pow: Use denormal path only It's OK to either flush to 0 or return denormal result if the device does not support denormals. See sec 7.2 and 7.5.3 of OCL specs Fixes

[libclc] r330206 - pown: Use denormal path only

2018-04-17 Thread Jan Vesely via cfe-commits
Author: jvesely Date: Tue Apr 17 12:35:30 2018 New Revision: 330206 URL: http://llvm.org/viewvc/llvm-project?rev=330206=rev Log: pown: Use denormal path only It's OK to either flush to 0 or return denormal result if the device does not support denormals. See sec 7.2 and 7.5.3 of OCL specs Fixes

[libclc] r330207 - powr: Use denormal path only

2018-04-17 Thread Jan Vesely via cfe-commits
Author: jvesely Date: Tue Apr 17 12:35:32 2018 New Revision: 330207 URL: http://llvm.org/viewvc/llvm-project?rev=330207=rev Log: powr: Use denormal path only It's OK to either flush to 0 or return denormal result if the device does not support denormals. See sec 7.2 and 7.5.3 of OCL specs Fixes

[PATCH] D45310: Warn about memcpy'ing non-trivial C structs

2018-04-17 Thread Akira Hatanaka via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC330202: [Sema] Warn about memcpying non-trivial C structs. (authored by ahatanak, committed by ). Changed prior to commit: https://reviews.llvm.org/D45310?vs=142705=142815#toc Repository: rC Clang

r330202 - [Sema] Warn about memcpy'ing non-trivial C structs.

2018-04-17 Thread Akira Hatanaka via cfe-commits
Author: ahatanak Date: Tue Apr 17 12:13:41 2018 New Revision: 330202 URL: http://llvm.org/viewvc/llvm-project?rev=330202=rev Log: [Sema] Warn about memcpy'ing non-trivial C structs. Issue a warning when non-trivial C structs are copied or initialized by calls to memset, bzero, memcpy, or

r330201 - Move the visitor classes that are used to traverse non-trivial C structs

2018-04-17 Thread Akira Hatanaka via cfe-commits
Author: ahatanak Date: Tue Apr 17 12:05:17 2018 New Revision: 330201 URL: http://llvm.org/viewvc/llvm-project?rev=330201=rev Log: Move the visitor classes that are used to traverse non-trivial C structs to a header file. This is in preparation for using the visitor classes to warn about

[PATCH] D45662: OpenBSD add C++ runtime in a driver's standpoint

2018-04-17 Thread David CARLIER via Phabricator via cfe-commits
devnexen added inline comments. Comment at: lib/Driver/ToolChains/OpenBSD.cpp:189 if (getToolChain().ShouldLinkCXXStdlib(Args)) -getToolChain().AddCXXStdlibLibArgs(Args, CmdArgs); +ToolChain.AddCXXStdlibLibArgs(Args, CmdArgs); if

[PATCH] D45662: OpenBSD add C++ runtime in a driver's standpoint

2018-04-17 Thread David CARLIER via Phabricator via cfe-commits
devnexen added inline comments. Comment at: lib/Driver/ToolChains/OpenBSD.cpp:189 if (getToolChain().ShouldLinkCXXStdlib(Args)) -getToolChain().AddCXXStdlibLibArgs(Args, CmdArgs); +ToolChain.AddCXXStdlibLibArgs(Args, CmdArgs); if

[PATCH] D45662: OpenBSD add C++ runtime in a driver's standpoint

2018-04-17 Thread David CARLIER via Phabricator via cfe-commits
devnexen updated this revision to Diff 142811. devnexen retitled this revision from "Fuzzer, add libcxx for OpenBSD" to "OpenBSD add C++ runtime in a driver's standpoint". devnexen edited the summary of this revision. https://reviews.llvm.org/D45662 Files: lib/Driver/ToolChains/OpenBSD.cpp

[PATCH] D45702: [clang-tidy] Add a new check, readability-redundant-data-call, that finds and removes redundant calls to .data().

2018-04-17 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. Have you run this over any large code bases to see whether the check triggers in practice? Comment at: docs/clang-tidy/checks/list.rst:95 fuchsia-default-arguments + fuchsia-header-anon-namespaces (redirects to google-build-namespaces)

[PATCH] D45578: Add a command line option `fregister_global_dtors_with_atexit` to register destructor functions annotated with __attribute__((destructor)) using __cxa_atexit or atexit.

2018-04-17 Thread Akira Hatanaka via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL330199: Add a command line option fregister_global_dtors_with_atexit to (authored by ahatanak, committed by ). Herald added a subscriber: llvm-commits. Changed prior to commit:

r330199 - Add a command line option 'fregister_global_dtors_with_atexit' to

2018-04-17 Thread Akira Hatanaka via cfe-commits
Author: ahatanak Date: Tue Apr 17 11:41:52 2018 New Revision: 330199 URL: http://llvm.org/viewvc/llvm-project?rev=330199=rev Log: Add a command line option 'fregister_global_dtors_with_atexit' to register destructor functions annotated with __attribute__((destructor)) using __cxa_atexit or

[PATCH] D45670: [NEON] Define vfma_n_f32() and vfmaq_n_f32() intrinsics in AArch32 mode

2018-04-17 Thread Sjoerd Meijer via Phabricator via cfe-commits
SjoerdMeijer accepted this revision. SjoerdMeijer added a comment. This revision is now accepted and ready to land. The corresponding LLVM tests seem be there already, so this looks all good to me. https://reviews.llvm.org/D45670 ___ cfe-commits

[PATCH] D45601: Warn on bool* to bool conversion

2018-04-17 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: lib/Sema/SemaChecking.cpp:2623 +QualType QT = Pointer->getType()->getPointeeType(); +if (!QT.isNull() && QT->isBooleanType()) + // Warn on bool* to bool conversion.

[PATCH] D45601: Warn on bool* to bool conversion

2018-04-17 Thread Arthur O'Dwyer via Phabricator via cfe-commits
Quuxplusone added inline comments. Comment at: lib/Sema/SemaChecking.cpp:2623 +QualType QT = Pointer->getType()->getPointeeType(); +if (!QT.isNull() && QT->isBooleanType()) + // Warn on bool* to bool conversion.

[PATCH] D45601: Warn on bool* to bool conversion

2018-04-17 Thread Eli Friedman via Phabricator via cfe-commits
efriedma added a comment. The thing about the bool*-only version is that bool pointers are rare in C++, so I'm not sure we're gaining much. But if we can't do something more general, there's still some benefit. I see your point about false positives for the more general version. I was sort

[libclc] r330198 - amdgcn/fmin: Fix typos that reduced precision

2018-04-17 Thread Jan Vesely via cfe-commits
Author: jvesely Date: Tue Apr 17 11:11:29 2018 New Revision: 330198 URL: http://llvm.org/viewvc/llvm-project?rev=330198=rev Log: amdgcn/fmin: Fix typos that reduced precision Not sure how these sneaked in. Fixes fminD and few other tests(fractD, cosD) on carrizo Signed-off-by: Jan Vesely

[libclc] r330197 - exp10: Port from amd builtins

2018-04-17 Thread Jan Vesely via cfe-commits
Author: jvesely Date: Tue Apr 17 11:08:08 2018 New Revision: 330197 URL: http://llvm.org/viewvc/llvm-project?rev=330197=rev Log: exp10: Port from amd builtins Passes CTS on carrizo and turks. Signed-off-by: Jan Vesely Reviewed and Tested (on RX 580) by: Aaron Watry

[PATCH] D45382: [CodeGen] Avoid destructing a struct type that has already been destructed by a delegated constructor

2018-04-17 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak updated this revision to Diff 142792. ahatanak added a comment. Deactivate the cleanups for callee-destructed parameters that are being forwarded to a delegated constructor. I also added a new member (CurrentCleanupStackDepth) to CodeGenFunction that tracks the stack depth of the most

[PATCH] D45601: Warn on bool* to bool conversion

2018-04-17 Thread Arthur O'Dwyer via Phabricator via cfe-commits
Quuxplusone added inline comments. Comment at: lib/Sema/SemaChecking.cpp:2623 +QualType QT = Pointer->getType()->getPointeeType(); +if (!QT.isNull() && QT->isBooleanType()) + // Warn on bool* to bool conversion.

[PATCH] D45679: [clang-tidy] Add a helper function isModified, that checks whether an expression is modified within a statement.

2018-04-17 Thread Shuai Wang via Phabricator via cfe-commits
shuaiwang added a comment. In https://reviews.llvm.org/D45679#1069754, @Eugene.Zelenko wrote: > In https://reviews.llvm.org/D45679#1069638, @JonasToth wrote: > > > *hust* /llvm/tools/clang/lib/Analysis/PseudoConstantAnalysis.cpp > > > > I will check this one first, before we get crazy and

[PATCH] D45601: Warn on bool* to bool conversion

2018-04-17 Thread Eli Friedman via Phabricator via cfe-commits
efriedma added inline comments. Comment at: lib/Sema/SemaChecking.cpp:2623 +QualType QT = Pointer->getType()->getPointeeType(); +if (!QT.isNull() && QT->isBooleanType()) + // Warn on bool* to bool conversion. Have

[PATCH] D33844: [clang-tidy] terminating continue check

2018-04-17 Thread Daniel Kolozsvari via Phabricator via cfe-commits
koldaniel updated this revision to Diff 142793. https://reviews.llvm.org/D33844 Files: clang-tidy/bugprone/BugproneTidyModule.cpp clang-tidy/bugprone/CMakeLists.txt clang-tidy/bugprone/TerminatingContinueCheck.cpp clang-tidy/bugprone/TerminatingContinueCheck.h docs/ReleaseNotes.rst

[PATCH] D45722: [X86] Lowering SAD (sum of absolute differences) intrinsics to native IR (clang side)

2018-04-17 Thread Craig Topper via Phabricator via cfe-commits
craig.topper added inline comments. Comment at: lib/CodeGen/CGBuiltin.cpp:8427 + SmallVector ShuffleMask; + ShuffleMask.clear(); + for (unsigned i = 0; i < N; ++i) This clear isn't needed. Comment at:

[PATCH] D45720: [X86] Lowering PACK*S (pack with saturation) intrinsics to native IR (clang side)

2018-04-17 Thread Craig Topper via Phabricator via cfe-commits
craig.topper added inline comments. Comment at: lib/CodeGen/CGBuiltin.cpp:8420 + if (IsUnsigned) { +MinVal = (IsDW) ? llvm::APInt::getMinValue(16).getZExtValue() +: llvm::APInt::getMinValue(8).getZExtValue(); Why can't these just be

[PATCH] D45716: [XRay] Add clang builtin for xray typed events.

2018-04-17 Thread Keith via Phabricator via cfe-commits
kpw updated this revision to Diff 142790. kpw added a comment. Undoing formatting change. Repository: rC Clang https://reviews.llvm.org/D45716 Files: include/clang/Basic/Builtins.def include/clang/Basic/LangOptions.def include/clang/Basic/XRayInstr.h include/clang/Driver/Options.td

[PATCH] D45668: [NEON] Define vget_high_f16() and vget_low_f16() intrinsics in AArch64 mode only

2018-04-17 Thread Ivan Kosarev via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL330195: [NEON] Define vget_high_f16() and vget_low_f16() intrinsics in AArch64 mode only (authored by kosarev, committed by ). Herald added a subscriber: llvm-commits. Changed prior to commit:

r330195 - [NEON] Define vget_high_f16() and vget_low_f16() intrinsics in AArch64 mode only

2018-04-17 Thread Ivan A. Kosarev via cfe-commits
Author: kosarev Date: Tue Apr 17 09:43:07 2018 New Revision: 330195 URL: http://llvm.org/viewvc/llvm-project?rev=330195=rev Log: [NEON] Define vget_high_f16() and vget_low_f16() intrinsics in AArch64 mode only Differential Revision: https://reviews.llvm.org/D45668 Modified:

[PATCH] D45217: [ThinLTO] Pass -save-temps to LTO backend for distributed ThinLTO builds

2018-04-17 Thread Teresa Johnson via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL330194: [ThinLTO] Pass -save-temps to LTO backend for distributed ThinLTO builds (authored by tejohnson, committed by ). Herald added a subscriber: llvm-commits. Repository: rL LLVM

r330194 - [ThinLTO] Pass -save-temps to LTO backend for distributed ThinLTO builds

2018-04-17 Thread Teresa Johnson via cfe-commits
Author: tejohnson Date: Tue Apr 17 09:39:25 2018 New Revision: 330194 URL: http://llvm.org/viewvc/llvm-project?rev=330194=rev Log: [ThinLTO] Pass -save-temps to LTO backend for distributed ThinLTO builds Summary: The clang driver option -save-temps was not passed to the LTO config, so when

[PATCH] D45726: Format closing braces when reformatting the line containing theopening brace.This required a couple of yaks to be shaved:1. MatchingOpeningBlockLineIndex was misused to also store the

2018-04-17 Thread Manuel Klimek via Phabricator via cfe-commits
klimek created this revision. klimek added a reviewer: krasimir. ...doesn't work correctly for "} else {". 2. We needed to change the API of AffectedRangeManager to not use iterators; we always passed in begin / end for the whole container before, so there was no mismatch in generality. 3.

[PATCH] D44882: [clangd] Implementation of workspace/symbol request

2018-04-17 Thread Marc-Andre Laperle via Phabricator via cfe-commits
malaperle added a comment. Any objections to the latest version? Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D44882 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D35068: [analyzer] Detect usages of unsafe I/O functions

2018-04-17 Thread Daniel Kolozsvari via Phabricator via cfe-commits
koldaniel added a comment. In https://reviews.llvm.org/D35068#1049530, @george.karpenkov wrote: > @koldaniel Have you evaluated this checker? On which codebases? Were the > warnings real security issues, or were they mostly spurious? The code seems > fine, but I'm not sure whether it should be

[PATCH] D45441: [HIP] Add predefined macros __HIPCC__ and __HIP_DEVICE_COMPILE__

2018-04-17 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl marked an inline comment as done. yaxunl added inline comments. Comment at: lib/Frontend/InitPreprocessor.cpp:473 + Builder.defineMacro("__HIP_DEVICE_COMPILE__"); + } } rjmccall wrote: > I assume these names are defined by the HIP spec. Yes these

[PATCH] D45670: [NEON} Define vfma_n_f32() and vfmaq_n_f32() intrinsics in AArch32 mode

2018-04-17 Thread Ivan Kosarev via Phabricator via cfe-commits
kosarev updated this revision to Diff 142784. kosarev added a comment. Removed checks for unused bitcasts. Thanks for catching! https://reviews.llvm.org/D45670 Files: include/clang/Basic/arm_neon.td test/CodeGen/arm-neon-fma.c Index: test/CodeGen/arm-neon-fma.c

[PATCH] D45601: Warn on bool* to bool conversion

2018-04-17 Thread Aditya Kumar via Phabricator via cfe-commits
hiraditya updated this revision to Diff 142776. hiraditya added a comment. Warn on bool* to bool conversion during a call only. https://reviews.llvm.org/D45601 Files: include/clang/Basic/DiagnosticSemaKinds.td lib/Sema/SemaChecking.cpp test/SemaCXX/warn-bool-ptr-to-bool.cpp Index:

[PATCH] D41648: [clang-tidy] implement cppcoreguidelines macro rules

2018-04-17 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In https://reviews.llvm.org/D41648#1047799, @JonasToth wrote: > I checked several codebases and implemented a little helper script to see > which kind of macros exist. Then I added some filter regex as configuration > and tried again, here are the results: > >

[PATCH] D45668: [NEON] Define vget_high_f16() and vget_low_f16() intrinsics in AArch64 mode only

2018-04-17 Thread Sjoerd Meijer via Phabricator via cfe-commits
SjoerdMeijer accepted this revision. SjoerdMeijer added a comment. This revision is now accepted and ready to land. Yep, agreed, also on the new shiny https://developer.arm.com/technologies/neon/intrinsics it is listed as A64 only. https://reviews.llvm.org/D45668

[PATCH] D45722: [X86] Lowering SAD (sum of absolute differences) intrinsics to native IR (clang side)

2018-04-17 Thread Mikhail Dvoretckii via Phabricator via cfe-commits
mike.dvoretsky created this revision. mike.dvoretsky added reviewers: craig.topper, spatel. Herald added a subscriber: cfe-commits. This patch lowers the SAD intrinsics to native LLVM IR. Comes with an LLVM patch. Repository: rC Clang https://reviews.llvm.org/D45722 Files:

[PATCH] D45720: [X86] Lowering PACK*S (pack with saturation) intrinsics to native IR (clang side)

2018-04-17 Thread Mikhail Dvoretckii via Phabricator via cfe-commits
mike.dvoretsky created this revision. mike.dvoretsky added reviewers: craig.topper, spatel. Herald added a subscriber: cfe-commits. This patch lowers the X86 vector packing with saturation intrinsics to native LLVM IR. Comes with an LLVM patch. Repository: rC Clang

[PATCH] D45615: [builtins] __builtin_dump_struct : added more types format

2018-04-17 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman closed this revision. aaron.ballman added a comment. Committed in r330188, thank you for the patch! Repository: rC Clang https://reviews.llvm.org/D45615 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

r330188 - Add modifiers for unsigned char and signed char field printing for __builtin_dump_struct.

2018-04-17 Thread Aaron Ballman via cfe-commits
Author: aaronballman Date: Tue Apr 17 07:00:06 2018 New Revision: 330188 URL: http://llvm.org/viewvc/llvm-project?rev=330188=rev Log: Add modifiers for unsigned char and signed char field printing for __builtin_dump_struct. Patch by Paul Semel. Modified: cfe/trunk/lib/CodeGen/CGBuiltin.cpp

[PATCH] D45615: [builtins] __builtin_dump_struct : added more types format

2018-04-17 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! I will go ahead and commit on your behalf. Btw, if you're thinking of making additional patches, now might be a good time to ask for commit privileges

[PATCH] D45679: [clang-tidy] Add a helper function isModified, that checks whether an expression is modified within a statement.

2018-04-17 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added a comment. In https://reviews.llvm.org/D45679#1069638, @JonasToth wrote: > *hust* /llvm/tools/clang/lib/Analysis/PseudoConstantAnalysis.cpp > > I will check this one first, before we get crazy and implemented something > twice. But this is IR-level analysis. Clang has own

[PATCH] D45668: [NEON] Define vget_high_f16() and vget_low_f16() intrinsics in AArch64 mode only

2018-04-17 Thread Ivan Kosarev via Phabricator via cfe-commits
kosarev added a comment. The NEON Intrinsics Reference (http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.ihi0073a/index.html) reads like they are AArch64-only. https://reviews.llvm.org/D45668 ___ cfe-commits mailing list

[PATCH] D45669: [NEON] Fix the architecture condition for the crypto intrinsics

2018-04-17 Thread Ivan Kosarev via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL330187: [NEON] Fix the architecture condition for the crypto intrinsics (authored by kosarev, committed by ). Herald added a subscriber: llvm-commits. Changed prior to commit:

[PATCH] D45697: [clang-tidy] Fix clang-tidy doesn't read .clangtidy configuration file.

2018-04-17 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh accepted this revision. alexfh added inline comments. This revision is now accepted and ready to land. Comment at: test/clang-tidy/read_file_config.cpp:5 +// RUN: echo '[{"command": "cc -c -o test.o test.cpp", "directory": "%T/read-file-config", "file":

[PATCH] D45669: [NEON] Fix the architecture condition for the crypto intrinsics

2018-04-17 Thread Ivan Kosarev via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC330187: [NEON] Fix the architecture condition for the crypto intrinsics (authored by kosarev, committed by ). Repository: rL LLVM https://reviews.llvm.org/D45669 Files:

r330187 - [NEON] Fix the architecture condition for the crypto intrinsics

2018-04-17 Thread Ivan A. Kosarev via cfe-commits
Author: kosarev Date: Tue Apr 17 06:37:30 2018 New Revision: 330187 URL: http://llvm.org/viewvc/llvm-project?rev=330187=rev Log: [NEON] Fix the architecture condition for the crypto intrinsics Differential Revision: https://reviews.llvm.org/D45669 Modified:

[PATCH] D45601: Warn on bool* to bool conversion

2018-04-17 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added inline comments. Comment at: include/clang/Basic/DiagnosticSemaKinds.td:7806 + "comparing %0 as a boolean">, + InGroup; def warn_format_argument_needs_cast : Warning< thakis wrote: > lebedev.ri wrote: > > Also, this really really should be

[PATCH] D45601: Warn on bool* to bool conversion

2018-04-17 Thread Nico Weber via Phabricator via cfe-commits
thakis added inline comments. Comment at: include/clang/Basic/DiagnosticSemaKinds.td:7806 + "comparing %0 as a boolean">, + InGroup; def warn_format_argument_needs_cast : Warning< lebedev.ri wrote: > Also, this really really should be under it's own flag,

[PATCH] D45665: [builtin-dump-struct] printf formats generation testing

2018-04-17 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman closed this revision. aaron.ballman added a comment. I've committed in r330185, thank you for the patch! Repository: rC Clang https://reviews.llvm.org/D45665 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

r330185 - Add checks for format specifiers used by __builtin_dump_struct and added a new specifier for null-terminated constant strings.

2018-04-17 Thread Aaron Ballman via cfe-commits
Author: aaronballman Date: Tue Apr 17 04:57:47 2018 New Revision: 330185 URL: http://llvm.org/viewvc/llvm-project?rev=330185=rev Log: Add checks for format specifiers used by __builtin_dump_struct and added a new specifier for null-terminated constant strings. Patch by Paul Semel. Modified:

[PATCH] D45532: [StaticAnalyzer] Checker to find uninitialized fields after a constructor call

2018-04-17 Thread Umann Kristóf via Phabricator via cfe-commits
Szelethus updated this revision to Diff 142760. Szelethus added a comment. In https://reviews.llvm.org/D45532#1068700, @Szelethus wrote: > Also, I managed to cause a crash with the class `linked_ptr_internal` from > google's boringssl when I analyzed the grpc project. I'll look deeper into >

[PATCH] D45697: [clang-tidy] Fix clang-tidy doesn't read .clangtidy configuration file.

2018-04-17 Thread Haojian Wu via Phabricator via cfe-commits
hokein added inline comments. Comment at: test/clang-tidy/read_file_config.cpp:5 +// RUN: echo '[{"command": "cc -c -o test.o test.cpp", "directory": "%T/read-file-config", "file": "%T/read-file-config/test.cpp"}]' > %T/read-file-config/compile_commands.json +// RUN:

[PATCH] D45697: [clang-tidy] Fix clang-tidy doesn't read .clangtidy configuration file.

2018-04-17 Thread Haojian Wu via Phabricator via cfe-commits
hokein updated this revision to Diff 142759. hokein marked an inline comment as done. hokein added a comment. Add one more test to ensure the test code triggering "clang-analyzer-*" checks. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D45697 Files:

[PATCH] D45619: [Time-report] (1) Use special new Clang flag 'FrontendTimesIsEnabled' instead of 'llvm::TimePassesIsEnabled' inside -ftime-report feature

2018-04-17 Thread Andrew V. Tischenko via Phabricator via cfe-commits
avt77 updated this revision to Diff 142755. avt77 added a comment. I moved FrontendTiming.cpp from lib/Basic/ to lib/Frontend/. https://reviews.llvm.org/D45619 Files: include/clang/Frontend/Utils.h lib/CodeGen/BackendUtil.cpp lib/CodeGen/CodeGenAction.cpp lib/Frontend/CMakeLists.txt

[PATCH] D45532: [StaticAnalyzer] Checker to find uninitialized fields after a constructor call

2018-04-17 Thread Henry Wong via Phabricator via cfe-commits
MTC added a comment. In https://reviews.llvm.org/D45532#1069683, @whisperity wrote: > There is something that came up in my mind: > > Consider a construct like this: > > class A > { > A() > { > memset(X, 0, 10 * sizeof(int)); > } > > int X[10]; > }; > > > I think

  1   2   >