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

2017-07-06 Thread Daniel Kolozsvari via Phabricator via cfe-commits
koldaniel created this revision. There are certain unsafe or deprecated (since C11) buffer handling functions which should be avoided in safety critical code. They could cause buffer overflows. Two new checks had been implemented which warn for every occurrence of such functions (unsafe or

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

2017-07-06 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added a comment. This does not do anything more than traversing the AST, shouldn't this be a clang-tidy check? Also, i suspect CERT-MSC24-C might be relevant

[PATCH] D35061: [ObjC] Avoid the -Wunguarded-availability warnings for protocol requirements in protocol/class/category declarations

2017-07-06 Thread Erik Pilkington via Phabricator via cfe-commits
erik.pilkington added inline comments. Comment at: lib/Sema/SemaExpr.cpp:142 if (Result == AR_NotYetIntroduced) { +if (AvoidAvailabilityChecks) + return; arphaman wrote: > erik.pilkington wrote: > > Why are we doing this just for partials? Doesn't

[PATCH] D33109: Enhance synchscope representation (clang)

2017-07-06 Thread Konstantin Zhuravlyov via Phabricator via cfe-commits
kzhuravl added a comment. In https://reviews.llvm.org/D33109#73, @mehdi_amini wrote: > Make sure your commit message correctly reference the LLVM change. Will do, thanks. https://reviews.llvm.org/D33109 ___ cfe-commits mailing list

clang-format: Fix deref treated as binary op in throw

2017-07-06 Thread Erik Uhlmann via cfe-commits
When dereferencing a pointer in a throw statement, clang-format assigns TT_BinaryOperator to the star token, so it gets formatted as: throw * x; With this change the above becomes throw *x; Bug tracker: https://bugs.llvm.org/show_bug.cgi?id=33665 Attached is a patch containing the fix.

[PATCH] D35061: [ObjC] Avoid the -Wunguarded-availability warnings for protocol requirements in protocol/class/category declarations

2017-07-06 Thread Erik Pilkington via Phabricator via cfe-commits
erik.pilkington accepted this revision. erik.pilkington added a comment. This revision is now accepted and ready to land. LGTM, thanks! Comment at: lib/Sema/SemaExpr.cpp:132 + bool ObjCPropertyAccess, + bool

[PATCH] D35041: [analyzer] Fix modeling of bool based types

2017-07-06 Thread Alexander Shaposhnikov via Phabricator via cfe-commits
alexshap added a comment. thanks, 1. evalCastFromNonLoc is actually called there (and that's how i ran into this issue) because of (a bit unexpected to me) ImplicitCastExpr 'LValueToRValue' inside switch: F3629685: Screen Shot 2017-07-06 at 11.01.39 AM.png

[PATCH] D33109: Enhance synchscope representation (clang)

2017-07-06 Thread Konstantin Zhuravlyov via Phabricator via cfe-commits
kzhuravl updated this revision to Diff 105499. kzhuravl marked an inline comment as done. kzhuravl added a comment. Address review feedback. https://reviews.llvm.org/D33109 Files: lib/CodeGen/CGBuiltin.cpp test/CodeGen/ms-barriers-intrinsics.c Index: test/CodeGen/ms-barriers-intrinsics.c

[PATCH] D35069: [Frontend] Verify that the bitstream is not empty before reading the serialised diagnostics

2017-07-06 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman created this revision. Clang should avoid calling `report_fatal_error` when the file with the serialised diagnostics is empty. This patch changes Clang's serialised diagnostic reader, now it reports an appropriate error instead of crashing. Repository: rL LLVM

[PATCH] D35041: [analyzer] Fix modeling of bool based types

2017-07-06 Thread Alexander Shaposhnikov via Phabricator via cfe-commits
alexshap added a comment. >> In https://reviews.llvm.org/D35041#801073, @alexshap wrote: >> evalCastFromNonLoc is actually called there (and that's how i ran into this >> issue) because of (a bit unexpected to me) ImplicitCastExpr 'LValueToRValue' >> inside switch > > Yeah, but the NonLoc

[PATCH] D35082: [WIP][OpenCL] Add LangAS::opencl_private to represent private address space in AST

2017-07-06 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl created this revision. Currently Clang uses default address space (0) to represent private address space for OpenCL in AST. There are two issues with this: 1. The error message is confusing since it will output a private pointer as a pointer without address space. 2. There is no

[PATCH] D35061: [ObjC] Avoid the -Wunguarded-availability warnings for protocol requirements in protocol/class/category declarations

2017-07-06 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman added inline comments. Comment at: lib/Sema/SemaExpr.cpp:142 if (Result == AR_NotYetIntroduced) { +if (AvoidAvailabilityChecks) + return; erik.pilkington wrote: > Why are we doing this just for partials? Doesn't this also apply to >

[PATCH] D35078: [clang-tidy] Fix modernize-use-override incorrect replacement

2017-07-06 Thread Victor Gao via Phabricator via cfe-commits
vgao created this revision. Herald added subscribers: xazax.hun, JDevlieghere. For the following code: `modernize-use-override` generates a replacement with incorrect location. struct IntPair { int first, second; }; struct A { virtual void il(IntPair); }; struct B :

[PATCH] D34860: [Objective-C] Fix non-determinism in clang

2017-07-06 Thread Mandeep Singh Grang via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL307296: [Objective-C] Fix non-determinism in clang (authored by mgrang). Changed prior to commit: https://reviews.llvm.org/D34860?vs=104811=105498#toc Repository: rL LLVM

[PATCH] D35081: [ThinLTO] Allow multiple summary entries.

2017-07-06 Thread Florian Hahn via Phabricator via cfe-commits
fhahn created this revision. Herald added a subscriber: inglorion. When combining modules with entries that allow multiple definitions, the combined index can contain multiple summaries for a single GUID. Unless I miss something here, we should be able to continue by just picking the first

Re: r307175 - [Sema] Don't allow -Wunguarded-availability to be silenced with redecls

2017-07-06 Thread Nico Weber via cfe-commits
We currently rely on this for chromium; that's how the warning used to work when I added it. What's the transition plan? Can we have a flag to incrementally transition to whatever the new way is? (Is it documented anywhere?) Also, I think the replacement somehow needs the new runtime stuff from

[PATCH] D35081: [ThinLTO] Allow multiple summary entries.

2017-07-06 Thread Teresa Johnson via Phabricator via cfe-commits
tejohnson added a comment. How are you invoking this? Typically this path is invoked for distributed builds, when the individual index files for each backend were written during the thin link (e.g. via gold plugin's -thinlto-index-only option). In that case, we only expect a single summary to

[PATCH] D34158: to support gcc 4.8 (and newer) compatibility on Linux, preinclude

2017-07-06 Thread Melanie Blower via Phabricator via cfe-commits
mibintc updated this revision to Diff 105526. mibintc added a comment. I rewrote the patch the way that Richard suggested, adding a cc1 option "finclude-if-exists" and injecting #if __has_include etc. [OK to use finclude? include-if-exists preferred?] I responded to James' remarks and removed

[PATCH] D35069: [Frontend] Verify that the bitstream is not empty before reading the serialised diagnostics

2017-07-06 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
dexonsmith accepted this revision. dexonsmith added a comment. This revision is now accepted and ready to land. LGTM. Repository: rL LLVM https://reviews.llvm.org/D35069 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

r307315 - Allow CompilerInvocations to generate .d files.

2017-07-06 Thread Sterling Augustine via cfe-commits
Author: saugustine Date: Thu Jul 6 14:02:52 2017 New Revision: 307315 URL: http://llvm.org/viewvc/llvm-project?rev=307315=rev Log: Allow CompilerInvocations to generate .d files. Summary: Most clang tools should ignore the -M family of options because one wouldn't want them to generate a new

Re: r307175 - [Sema] Don't allow -Wunguarded-availability to be silenced with redecls

2017-07-06 Thread Erik Pilkington via cfe-commits
On 7/6/17 2:12 PM, Nico Weber wrote: We currently rely on this for chromium; that's how the warning used to work when I added it. What's the transition plan? Can we have a flag to incrementally transition to whatever the new way is? (Is it documented anywhere?) We currently have

[PATCH] D34158: to support gcc 4.8 (and newer) compatibility on Linux, preinclude

2017-07-06 Thread James Y Knight via Phabricator via cfe-commits
jyknight added inline comments. Comment at: lib/Driver/ToolChains/Linux.cpp:755 +!Version.isOlderThan(4, 8, 0)) { + // For gcc >= 4.8.x, clang will preinclude + // -ffreestanding suppresses this behavior. jyknight wrote: > I don't see why it

Re: r307175 - [Sema] Don't allow -Wunguarded-availability to be silenced with redecls

2017-07-06 Thread Nico Weber via cfe-commits
Thanks for the fast reply! On Jul 6, 2017 11:42 PM, "Erik Pilkington" wrote: On 7/6/17 2:12 PM, Nico Weber wrote: We currently rely on this for chromium; that's how the warning used to work when I added it. What's the transition plan? Can we have a flag to

[PATCH] D34985: Do not read the file to determine its name.

2017-07-06 Thread Bruno Cardoso Lopes via Phabricator via cfe-commits
bruno added a comment. @v.g.vassilev will this also benefit from `ContentCache::getBuffer` improvements from https://reviews.llvm.org/D33275? I guess if `getBuffer` transparently handles pointing to right buffer we won't need this change? Repository: rL LLVM https://reviews.llvm.org/D34985

[PATCH] D34331: func.wrap.func.con: Unset function before destroying anything

2017-07-06 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
dexonsmith added a comment. Ping! https://reviews.llvm.org/D34331 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D34578: cmath: Support clang's -fdelayed-template-parsing

2017-07-06 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
dexonsmith added a comment. Ping! Hal, you committed r283051. Do you have a problem with this? https://reviews.llvm.org/D34578 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

r307316 - Reject attempts to build a module without -fmodules, rather than silently doing weird things.

2017-07-06 Thread Richard Smith via cfe-commits
Author: rsmith Date: Thu Jul 6 14:05:56 2017 New Revision: 307316 URL: http://llvm.org/viewvc/llvm-project?rev=307316=rev Log: Reject attempts to build a module without -fmodules, rather than silently doing weird things. Added: cfe/trunk/test/Modules/missing-flag.cpp Modified:

r307320 - Change remaining references to lit.util.capture to use subprocess.check_output.

2017-07-06 Thread David L. Jones via cfe-commits
Author: dlj Date: Thu Jul 6 14:46:47 2017 New Revision: 307320 URL: http://llvm.org/viewvc/llvm-project?rev=307320=rev Log: Change remaining references to lit.util.capture to use subprocess.check_output. Summary: The capture() function was removed in r306625. This should fix PGO breakages

[PATCH] D33275: Keep into account if files were virtual.

2017-07-06 Thread Bruno Cardoso Lopes via Phabricator via cfe-commits
bruno accepted this revision. bruno added a comment. This revision is now accepted and ready to land. We're hitting a very similar problem to this one, which I think this patch will likely fix. I can't come up with a reproducible testcase either. If you can write one better yet, but I'm ok with

Re: r307296 - [Objective-C] Fix non-determinism in clang

2017-07-06 Thread Bruno Cardoso Lopes via cfe-commits
Awesome, thanks! On Thu, Jul 6, 2017 at 11:49 AM, Mandeep Singh Grang via cfe-commits wrote: > Author: mgrang > Date: Thu Jul 6 11:49:57 2017 > New Revision: 307296 > > URL: http://llvm.org/viewvc/llvm-project?rev=307296=rev > Log: > [Objective-C] Fix

[PATCH] D35041: [analyzer] Fix modeling of bool based types

2017-07-06 Thread Alexander Shaposhnikov via Phabricator via cfe-commits
alexshap updated this revision to Diff 105524. alexshap added a comment. Add a test where evalCastFromLoc is called and the line unsigned BitWidth = Context.getIntWidth(castTy); is hit. I am planning to update this patch once again with a proper test where the path inside evalCastFromNonLoc is

[PATCH] D29905: [OpenMP] Pass argument to device kernel by reference when map is used.

2017-07-06 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
gtbercea added a comment. In https://reviews.llvm.org/D29905#800416, @Hahnfeld wrote: > In https://reviews.llvm.org/D34888#799576, @gtbercea wrote: > > > Does this also include the fixes in the following revision? > > > > https://reviews.llvm.org/D29905 > > > Sorry, I wasn't aware of this

[PATCH] D35078: [clang-tidy] Fix modernize-use-override incorrect replacement

2017-07-06 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. Looks good with a nit. Thank you for the fix! Comment at: clang-tidy/modernize/UseOverrideCheck.cpp:43 while (!RawLexer.LexFromRawLexer(Tok)) { -if

[PATCH] D33275: Keep into account if files were virtual.

2017-07-06 Thread Vassil Vassilev via Phabricator via cfe-commits
v.g.vassilev added a comment. @rsmith suggested to move this one interface layer down, that is `ContentCache::getBuffer`. Moving it there might fix more issues. I will try to improve it and land the new version if that's not urgent for you. https://reviews.llvm.org/D33275

[PATCH] D33275: Keep into account if files were virtual.

2017-07-06 Thread Bruno Cardoso Lopes via Phabricator via cfe-commits
bruno added a comment. That sounds even better. Thanks @v.g.vassilev https://reviews.llvm.org/D33275 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D33277: [Clang][x86][Inline Asm] - Enum support for MS syntax

2017-07-06 Thread Matan via Phabricator via cfe-commits
mharoush added a comment. ping Repository: rL LLVM https://reviews.llvm.org/D33277 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D33278: [LLVM][x86][Inline Asm] - Enum support for MS syntax

2017-07-06 Thread Matan via Phabricator via cfe-commits
mharoush added a comment. ping Repository: rL LLVM https://reviews.llvm.org/D33278 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D29905: [OpenMP] Pass argument to device kernel by reference when map is used.

2017-07-06 Thread Jonas Hahnfeld via Phabricator via cfe-commits
Hahnfeld added a comment. In https://reviews.llvm.org/D34888#799576, @gtbercea wrote: > Does this also include the fixes in the following revision? > > https://reviews.llvm.org/D29905 Sorry, I wasn't aware of this revision and thought that it had long been committed. I just verified that the

[PATCH] D29658: [OpenMP] Customize CUDA-based tool chain selection

2017-07-06 Thread Jonas Hahnfeld via Phabricator via cfe-commits
Hahnfeld added inline comments. Comment at: lib/Driver/Driver.cpp:564 + auto = + ToolChains[TT.str() + "/" + HostTC->getTriple().normalize()]; + if (!CudaTC) gtbercea wrote: > Hahnfeld wrote: > > The code above uses

[PATCH] D35041: [analyzer] Fix modeling of bool based types

2017-07-06 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added a comment. Thanks, these are very helpful. Sending changes in smaller chunks is great even if you already have one large chunk perfectly working :) The test covers only the `BasicValueFactory`-related part of your patch; the Loc-related changes are still to be tested. I suspect the

[PATCH] D34114: [clang] A better format for unnecessary packed warning.

2017-07-06 Thread Stephen Hines via Phabricator via cfe-commits
srhines added a comment. Richard's points are really valid here. I missed the aspect that packed always implies alignment 1, which does have an effect on the code in most of the cases listed here. I agree that the value of this warning is low, since the possibility of false-positive is quite

[PATCH] D35000: [OpenCL] Added extended tests on metadata generation for half data type and arrays.

2017-07-06 Thread Egor Churaev via Phabricator via cfe-commits
echuraev updated this revision to Diff 105375. echuraev marked an inline comment as done. https://reviews.llvm.org/D35000 Files: test/CodeGenOpenCL/kernel-arg-info.cl Index: test/CodeGenOpenCL/kernel-arg-info.cl === ---

[PATCH] D34114: [clang] A better format for unnecessary packed warning.

2017-07-06 Thread Chih-Hung Hsieh via Phabricator via cfe-commits
chh added a comment. These warnings are triggered by -Wpadded -Wpacked or clang-tidy's clang-diagnostic-packed check. I agree that they should be ignored or suppressed in many cases. What I am not sure is the amount of real positive cases. I found it too tedious to suppress one warning per

[PATCH] D35046: [coroutines] Include "this" type when looking up coroutine_traits

2017-07-06 Thread Toby Allsopp via Phabricator via cfe-commits
toby-allsopp created this revision. In N4663, section [dcl.fct.def.coroutine] states that, in a coroutine that is a non-static member function, the type of the implicit object parameter is included immediately before the types of the function parameters. https://reviews.llvm.org/D35046 Files:

[PATCH] D28953: [analyzer] Eliminate analyzer limitations on symbolic constraint generation

2017-07-06 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added a comment. Because this patch affects the default behavior, i think it's necessary to understand the performance impact on a large codebase. I may lend a hand eventually, but if you're in a hurry you could probably at least run an overnight analysis over llvm and sqlite with range

r307238 - [OpenCL] Test on image access modifiers and image type can only be a type of a function argument.

2017-07-06 Thread Egor Churaev via cfe-commits
Author: echuraev Date: Thu Jul 6 00:06:11 2017 New Revision: 307238 URL: http://llvm.org/viewvc/llvm-project?rev=307238=rev Log: [OpenCL] Test on image access modifiers and image type can only be a type of a function argument. Reviewers: Anastasia Reviewed By: Anastasia Subscribers: yaxunl,

[PATCH] D34512: [libTooling] Add preliminary Cross Translation Unit support for libTooling

2017-07-06 Thread Gábor Horváth via Phabricator via cfe-commits
xazax.hun added a comment. It looks like Richard approved libTooling as a dependency for clang on the mailing list (http://lists.llvm.org/pipermail/cfe-dev/2017-July/054536.html). If it is ok to have this code in libTooling (for now), I think we could start/continue the review of this patch.

[PATCH] D35008: [AArch64] Produce the right kind of va_arg for windows

2017-07-06 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo marked an inline comment as done. mstorsjo added inline comments. Comment at: lib/CodeGen/TargetInfo.cpp:4769 DarwinPCS }; efriedma wrote: > Can we extend ABIKind rather than adding a separate boolean? Sure. I was afraid there was a lot of

[PATCH] D34947: [clangd] Add support for per-file extra flags

2017-07-06 Thread Krasimir Georgiev via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL307241: [clangd] Add support for per-file extra flags (authored by krasimir). Repository: rL LLVM https://reviews.llvm.org/D34947 Files: clang-tools-extra/trunk/clangd/ClangdLSPServer.cpp

[clang-tools-extra] r307241 - [clangd] Add support for per-file extra flags

2017-07-06 Thread Krasimir Georgiev via cfe-commits
Author: krasimir Date: Thu Jul 6 01:44:54 2017 New Revision: 307241 URL: http://llvm.org/viewvc/llvm-project?rev=307241=rev Log: [clangd] Add support for per-file extra flags Summary: This patch adds the ability to specify user-defined extra flags per opened file through the LSP layer. This is

[PATCH] D34512: [libTooling] Add preliminary Cross Translation Unit support for libTooling

2017-07-06 Thread Manuel Klimek via Phabricator via cfe-commits
klimek added a comment. In https://reviews.llvm.org/D34512#800490, @xazax.hun wrote: > It looks like Richard approved libTooling as a dependency for clang on the > mailing list (http://lists.llvm.org/pipermail/cfe-dev/2017-July/054536.html). > If it is ok to have this code in libTooling (for

[PATCH] D34512: [libTooling] Add preliminary Cross Translation Unit support for libTooling

2017-07-06 Thread Gábor Horváth via Phabricator via cfe-commits
xazax.hun added a comment. In https://reviews.llvm.org/D34512#800499, @klimek wrote: > In https://reviews.llvm.org/D34512#800490, @xazax.hun wrote: > > > It looks like Richard approved libTooling as a dependency for clang on the > > mailing list > >

[PATCH] D35008: [AArch64] Produce the right kind of va_arg for windows

2017-07-06 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo updated this revision to Diff 105392. mstorsjo marked an inline comment as done. mstorsjo added a comment. Herald added a subscriber: javed.absar. Added a testcase, using a different Kind instead of adding a separate bool. https://reviews.llvm.org/D35008 Files:

[PATCH] D35015: [clang-format] Add space between a message field key and the opening bracket in proto messages

2017-07-06 Thread Daniel Jasper via Phabricator via cfe-commits
djasper accepted this revision. djasper added a comment. This revision is now accepted and ready to land. Looks good. https://reviews.llvm.org/D35015 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D34512: Add preliminary Cross Translation Unit support library

2017-07-06 Thread Gábor Horváth via Phabricator via cfe-commits
xazax.hun added a comment. In https://reviews.llvm.org/D34512#800618, @klimek wrote: > +Richard as top-level code owner for new libs. > > For bikeshedding the name: I'd have liked libIndex, but that's already taken. > CrossTU doesn't seem too bad to me, too, though. Some brainstorming for the

[PATCH] D35051: [clang-tidy] Add misc-undefined-memory-manipulation check.

2017-07-06 Thread Reka Kovacs via Phabricator via cfe-commits
rnkovacs created this revision. rnkovacs added a project: clang-tools-extra. Herald added subscribers: whisperity, JDevlieghere, mgorny. Finds calls of memory manipulation functions `memset()`, `memcpy()` and `memmove()` on not TriviallyCopyable objects resulting in undefined behavior. Related

[PATCH] D32700: [clang-tidy] Add misc-suspicious-memset-usage check.

2017-07-06 Thread Reka Kovacs via Phabricator via cfe-commits
rnkovacs updated this revision to Diff 105401. rnkovacs edited the summary of this revision. rnkovacs added a comment. - Merged in the `google-runtime-memset-zero-length` check. - Added a separate check for memory manipulation functions: `misc-undefined-memory-manipulation`

[PATCH] D34512: Add preliminary Cross Translation Unit support library

2017-07-06 Thread Gábor Horváth via Phabricator via cfe-commits
xazax.hun updated this revision to Diff 105412. xazax.hun marked an inline comment as done. xazax.hun added a comment. - Fix a copy and paste error and removed an unintended change. https://reviews.llvm.org/D34512 Files: include/clang/Basic/DiagnosticFrontendKinds.td

[PATCH] D34512: Add preliminary Cross Translation Unit support library

2017-07-06 Thread Manuel Klimek via Phabricator via cfe-commits
klimek added a reviewer: rsmith. klimek added a comment. +Richard as top-level code owner for new libs. For bikeshedding the name: I'd have liked libIndex, but that's already taken. CrossTU doesn't seem too bad to me, too, though. https://reviews.llvm.org/D34512

[PATCH] D34512: Add preliminary Cross Translation Unit support library

2017-07-06 Thread Whisperity via Phabricator via cfe-commits
whisperity added a comment. In https://reviews.llvm.org/D34512#800502, @xazax.hun wrote: > In https://reviews.llvm.org/D34512#800499, @klimek wrote: > > > In https://reviews.llvm.org/D34512#800490, @xazax.hun wrote: > > > > > It looks like Richard approved libTooling as a dependency for clang on

[PATCH] D34512: Add preliminary Cross Translation Unit support library

2017-07-06 Thread Manuel Klimek via Phabricator via cfe-commits
klimek added a comment. In https://reviews.llvm.org/D34512#800626, @whisperity wrote: > In https://reviews.llvm.org/D34512#800502, @xazax.hun wrote: > > > In https://reviews.llvm.org/D34512#800499, @klimek wrote: > > > > > In https://reviews.llvm.org/D34512#800490, @xazax.hun wrote: > > > > > >

[PATCH] D35015: [clang-format] Add space between a message field key and the opening bracket in proto messages

2017-07-06 Thread Krasimir Georgiev via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL307261: [clang-format] Add space between a message field key and the opening bracket in… (authored by krasimir). Repository: rL LLVM https://reviews.llvm.org/D35015 Files:

r307261 - [clang-format] Add space between a message field key and the opening bracket in proto messages

2017-07-06 Thread Krasimir Georgiev via cfe-commits
Author: krasimir Date: Thu Jul 6 06:58:29 2017 New Revision: 307261 URL: http://llvm.org/viewvc/llvm-project?rev=307261=rev Log: [clang-format] Add space between a message field key and the opening bracket in proto messages Summary: This patch updates the formatting of message fields of type

Re: r307104 - Enable LLVM asan support for NetBSD/amd64

2017-07-06 Thread Kamil Rytarowski via cfe-commits
On 06.07.2017 14:57, Joerg Sonnenberger wrote: > On Tue, Jul 04, 2017 at 07:55:56PM -, Kamil Rytarowski via cfe-commits > wrote: >> Modified: cfe/trunk/lib/Driver/ToolChains/CommonArgs.cpp >> URL: >>

r307264 - [clang-format] Add TextProto language name, NFC

2017-07-06 Thread Krasimir Georgiev via cfe-commits
Author: krasimir Date: Thu Jul 6 07:39:39 2017 New Revision: 307264 URL: http://llvm.org/viewvc/llvm-project?rev=307264=rev Log: [clang-format] Add TextProto language name, NFC Modified: cfe/trunk/include/clang/Format/Format.h Modified: cfe/trunk/include/clang/Format/Format.h URL:

[PATCH] D35056: GCC ABI incompatibility when passing object with trivial copy ctor, trivial dtor, and non-trivial move ctor

2017-07-06 Thread Vassil Vassilev via Phabricator via cfe-commits
v.g.vassilev created this revision. Patch by Bernd Schmidt! Fixes PR19668 and PR23034. Repository: rL LLVM https://reviews.llvm.org/D35056 Files: lib/CodeGen/CGCXXABI.cpp lib/CodeGen/ItaniumCXXABI.cpp test/CodeGenCXX/uncopyable-args.cpp Index: test/CodeGenCXX/uncopyable-args.cpp

[PATCH] D34512: Add preliminary Cross Translation Unit support library

2017-07-06 Thread Gábor Horváth via Phabricator via cfe-commits
xazax.hun updated this revision to Diff 105409. xazax.hun retitled this revision from "[libTooling] Add preliminary Cross Translation Unit support for libTooling" to "Add preliminary Cross Translation Unit support library". xazax.hun added a comment. - Move CrossTU functionality into its own

[PATCH] D33826: [clang-tidy] avoid pointer cast to more strict alignment check

2017-07-06 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added a comment. What will this check say about the following code? c++ void function(void) { char c = 'x'; int *ip = reinterpret_cast(); } The clang'g `-Wcast-align` does not warn: https://godbolt.org/g/hVwD5S Repository: rL LLVM https://reviews.llvm.org/D33826

Re: r307104 - Enable LLVM asan support for NetBSD/amd64

2017-07-06 Thread Joerg Sonnenberger via cfe-commits
On Tue, Jul 04, 2017 at 07:55:56PM -, Kamil Rytarowski via cfe-commits wrote: > Modified: cfe/trunk/lib/Driver/ToolChains/CommonArgs.cpp > URL: > http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/ToolChains/CommonArgs.cpp?rev=307104=307103=307104=diff >

[PATCH] D34512: Add preliminary Cross Translation Unit support library

2017-07-06 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman added inline comments. Comment at: unittests/CrossTU/CMakeLists.txt:10 + +target_link_libraries(ToolingTests + clangAST `CrossTUTests`? https://reviews.llvm.org/D34512 ___ cfe-commits mailing list

[PATCH] D34275: [analyzer] Re-implemente current virtual calls checker in a path-sensitive way

2017-07-06 Thread wangxin via Phabricator via cfe-commits
wangxindsb updated this revision to Diff 105440. wangxindsb added a comment. - Rename the BugType. - Correct the code style to be clang format. - Rename the arguments to start with uppercase letter. - Add the support to check for the constructor called by the New expr. You don't need to put

[PATCH] D34275: [analyzer] Re-implemente current virtual calls checker in a path-sensitive way

2017-07-06 Thread wangxin via Phabricator via cfe-commits
wangxindsb added inline comments. Comment at: lib/StaticAnalyzer/Checkers/VirtualCallChecker.cpp:332 +// Check the base of the callexpr is equal to the this of the ctor +bool VirtualCallChecker::isCalledbyCtor(const CallExpr *CE,ProgramStateRef State,const LocationContext

[PATCH] D35061: [ObjC] Avoid the -Wunguarded-availability warnings for protocol requirements in protocol/class/category declarations

2017-07-06 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman created this revision. The unguarded availability warnings in the protocol requirements of a protocol/class/category declaration can be avoided. This matches the behaviour of Swift's diagnostics. Repository: rL LLVM https://reviews.llvm.org/D35061 Files:

[libunwind] r307266 - Add a test harness

2017-07-06 Thread Jonathan Roelofs via cfe-commits
Author: jroelofs Date: Thu Jul 6 08:20:12 2017 New Revision: 307266 URL: http://llvm.org/viewvc/llvm-project?rev=307266=rev Log: Add a test harness Mostly cargo-culted from libcxxabi, since the unwinder was forked from there in the first place. There may still be cruft that's only applicable to

[PATCH] D35038: [libunwind] Add a test harness

2017-07-06 Thread Jonathan Roelofs via Phabricator via cfe-commits
jroelofs closed this revision. jroelofs added a comment. r307266 https://reviews.llvm.org/D35038 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D29658: [OpenMP] Customize CUDA-based tool chain selection

2017-07-06 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
gtbercea updated this revision to Diff 105446. gtbercea added a comment. Use str() https://reviews.llvm.org/D29658 Files: lib/Driver/Driver.cpp Index: lib/Driver/Driver.cpp === --- lib/Driver/Driver.cpp +++

r307271 - [OpenMP] Customize CUDA-based tool chain selection

2017-07-06 Thread Gheorghe-Teodor Bercea via cfe-commits
Author: gbercea Date: Thu Jul 6 09:08:15 2017 New Revision: 307271 URL: http://llvm.org/viewvc/llvm-project?rev=307271=rev Log: [OpenMP] Customize CUDA-based tool chain selection Summary: This patch provides a generic way of selecting CUDA based tool chains as host-device pairs. Reviewers:

[PATCH] D29647: [OpenMP] Extend CLANG target options with device offloading kind.

2017-07-06 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
gtbercea updated this revision to Diff 105453. gtbercea added a comment. . https://reviews.llvm.org/D29647 Files: include/clang/Driver/ToolChain.h lib/Driver/ToolChain.cpp lib/Driver/ToolChains/BareMetal.cpp lib/Driver/ToolChains/BareMetal.h lib/Driver/ToolChains/Clang.cpp

r307272 - [OpenMP] Extend CLANG target options with device offloading kind.

2017-07-06 Thread Gheorghe-Teodor Bercea via cfe-commits
Author: gbercea Date: Thu Jul 6 09:22:21 2017 New Revision: 307272 URL: http://llvm.org/viewvc/llvm-project?rev=307272=rev Log: [OpenMP] Extend CLANG target options with device offloading kind. Summary: Pass the type of the device offloading when building the tool chain for a particular target

[PATCH] D35061: [ObjC] Avoid the -Wunguarded-availability warnings for protocol requirements in protocol/class/category declarations

2017-07-06 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman added inline comments. Comment at: lib/Sema/SemaExpr.cpp:142 if (Result == AR_NotYetIntroduced) { +if (AvoidAvailabilityChecks) + return; erik.pilkington wrote: > arphaman wrote: > > erik.pilkington wrote: > > > Why are we doing this just

[PATCH]:[Clang] Add -fno-plt,-fplt to ignored flags

2017-07-06 Thread Jordan Glover via cfe-commits
In GCC there is a -fno-plt flag not implemented in Clang which results in compilation failure: clang-4.0: error: unknown argument: '-fno-plt' Proposed patch adds -fno-plt and -fplt to existing ignored flags list making it compatible with gcc for package building. You can see more info about

[PATCH] D35041: [analyzer] Fix modeling of bool based types

2017-07-06 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added a comment. In https://reviews.llvm.org/D35041#801073, @alexshap wrote: > evalCastFromNonLoc is actually called there (and that's how i ran into this > issue) because of (a bit unexpected to me) ImplicitCastExpr 'LValueToRValue' > inside switch Yeah, but the `NonLoc` that's being

[PATCH] D35103: Expand clang-interpreter with example of throwing in and from the JIT for Windows64.

2017-07-06 Thread Frederich Munch via Phabricator via cfe-commits
marsupial created this revision. Herald added a subscriber: mgorny. Getting this to work is not particularly obvious, and having it as an example should be helpful. Portions of this could be placed into LLVM, but as a whole it seems necessary to do this a higher level.

[PATCH] D35078: [clang-tidy] Fix modernize-use-override incorrect replacement

2017-07-06 Thread Victor Gao via Phabricator via cfe-commits
vgao added a comment. @alexfh Could you please land this for me? Thanks! https://reviews.llvm.org/D35078 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D33842: CodeGen: Fix address space of global variable

2017-07-06 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. Looks great, thanks! Just a few minor changes. Comment at: lib/CodeGen/CGBlocks.cpp:1144 + ? CGM.getNSConcreteGlobalBlock() + : CGM.getNullPointer(CGM.VoidPtrPtrTy, +

[PATCH] D34578: cmath: Support clang's -fdelayed-template-parsing

2017-07-06 Thread Hal Finkel via Phabricator via cfe-commits
hfinkel accepted this revision. hfinkel added a comment. This revision is now accepted and ready to land. In https://reviews.llvm.org/D34578#801357, @dexonsmith wrote: > Ping! Hal, you committed r283051. Do you have a problem with this? It looks like you're just renaming `__libcpp_isnan` and

r307341 - Update Cross-DSO CFI documentation.

2017-07-06 Thread Evgeniy Stepanov via cfe-commits
Author: eugenis Date: Thu Jul 6 17:48:12 2017 New Revision: 307341 URL: http://llvm.org/viewvc/llvm-project?rev=307341=rev Log: Update Cross-DSO CFI documentation. Reviewers: pcc Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D35094 Modified:

[PATCH] D35078: [clang-tidy] Fix modernize-use-override incorrect replacement

2017-07-06 Thread Victor Gao via Phabricator via cfe-commits
vgao updated this revision to Diff 105554. vgao added a comment. Change variable name `Parens` to `NestedParens` https://reviews.llvm.org/D35078 Files: clang-tidy/modernize/UseOverrideCheck.cpp test/clang-tidy/modernize-use-override.cpp Index: test/clang-tidy/modernize-use-override.cpp

r307329 - This call-site should have been updated as part of D34304.

2017-07-06 Thread Sterling Augustine via cfe-commits
Author: saugustine Date: Thu Jul 6 15:47:19 2017 New Revision: 307329 URL: http://llvm.org/viewvc/llvm-project?rev=307329=rev Log: This call-site should have been updated as part of D34304. Summary: Use an argument adjuster to preserve behavior inadvertantly changed by D34304. Reviewers:

[PATCH] D35056: GCC ABI incompatibility when passing object with trivial copy ctor, trivial dtor, and non-trivial move ctor

2017-07-06 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. If this is a common algorithm across all ABIs, can we just put Sema / the AST in charge of computing it? It's not a cheap thing to recompute retroactively, especially for an imported type, and it seems like it's easily derived from the things that go into

[PATCH] D35061: [ObjC] Avoid the -Wunguarded-availability warnings for protocol requirements in protocol/class/category declarations

2017-07-06 Thread Erik Pilkington via Phabricator via cfe-commits
erik.pilkington added inline comments. Comment at: lib/Sema/SemaExpr.cpp:142 if (Result == AR_NotYetIntroduced) { +if (AvoidAvailabilityChecks) + return; Why are we doing this just for partials? Doesn't this also apply to unavailable/deprecated?

[PATCH] D33659: Extend DynamicLibrary class to be usable without loading permanently.

2017-07-06 Thread Frederich Munch via Phabricator via cfe-commits
marsupial added a comment. ping https://reviews.llvm.org/D33659 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D33659: Extend DynamicLibrary class to be usable without loading permanently.

2017-07-06 Thread Frederich Munch via Phabricator via cfe-commits
marsupial updated this revision to Diff 105466. https://reviews.llvm.org/D33659 Files: lib/StaticAnalyzer/Frontend/CheckerRegistration.cpp Index: lib/StaticAnalyzer/Frontend/CheckerRegistration.cpp === ---

[PATCH] D35000: [OpenCL] Added extended tests on metadata generation for half data type and arrays.

2017-07-06 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added a comment. In https://reviews.llvm.org/D35000#799705, @Anastasia wrote: > Btw, is there any reason to add testing specifically for half? Is there > anything specific to half in the implementation of this? Trying to understand the reason for this change though...

r307296 - [Objective-C] Fix non-determinism in clang

2017-07-06 Thread Mandeep Singh Grang via cfe-commits
Author: mgrang Date: Thu Jul 6 11:49:57 2017 New Revision: 307296 URL: http://llvm.org/viewvc/llvm-project?rev=307296=rev Log: [Objective-C] Fix non-determinism in clang Summary: Iteration of the unordered Ivars causes objc-modern-metadata-visibility.mm (uncovered by reverse iterating

[PATCH] D34784: [OpenMP] Add flag for specifying the target device architecture for OpenMP device offloading

2017-07-06 Thread Hal Finkel via Phabricator via cfe-commits
hfinkel added inline comments. Comment at: lib/Driver/ToolChains/Cuda.cpp:474 +for (StringRef Opt : OptList) { + AddMArchOption(DAL, Opts, Opt); +} gtbercea wrote: > hfinkel wrote: > > Shouldn't you be adding all of the options, not just the -march=

[PATCH] D35041: [analyzer] Fix modeling of bool based types

2017-07-06 Thread Alexander Shaposhnikov via Phabricator via cfe-commits
alexshap updated this revision to Diff 105562. alexshap added a comment. Add a test where SimpleSValBuilder::evalCastFromNonLoc is called and we hit the line unsigned castSize = Context.getIntWidth(castTy); Repository: rL LLVM https://reviews.llvm.org/D35041 Files:

[libcxx] r307357 - cmath: Support clang's -fdelayed-template-parsing

2017-07-06 Thread Duncan P. N. Exon Smith via cfe-commits
Author: dexonsmith Date: Thu Jul 6 22:13:36 2017 New Revision: 307357 URL: http://llvm.org/viewvc/llvm-project?rev=307357=rev Log: cmath: Support clang's -fdelayed-template-parsing r283051 added some functions to cmath (in namespace std) that have the same name as functions in math.h (in the

[PATCH] D34578: cmath: Support clang's -fdelayed-template-parsing

2017-07-06 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
dexonsmith closed this revision. dexonsmith added a comment. In https://reviews.llvm.org/D34578#801519, @hfinkel wrote: > In https://reviews.llvm.org/D34578#801357, @dexonsmith wrote: > > > Ping! Hal, you committed r283051. Do you have a problem with this? > > > It looks like you're just