[PATCH] D61756: Add a __FILE_NAME__ macro.

2019-05-15 Thread Kristina Brooks via Phabricator via cfe-commits
kristina added a comment. @rsmith Ping. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D61756/new/ https://reviews.llvm.org/D61756 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/

[PATCH] D61967: [clang-tidy] Add a close-on-exec check on pipe() in Android module.

2019-05-15 Thread Jian Cai via Phabricator via cfe-commits
jcai19 created this revision. jcai19 added reviewers: alexfh, chh. Herald added subscribers: cfe-commits, xazax.hun, mgorny. Herald added a project: clang. pipe() is better to be replaced by pipe2() with O_CLOEXEC flag to avoid file descriptor leakage. Repository: rG LLVM Github Monorepo htt

Re: r360637 - PR41817: Fix regression in r359260 that caused the MS compatibility

2019-05-15 Thread Reid Kleckner via cfe-commits
*From: *Hans Wennborg *Date: *Wed, May 15, 2019 at 1:22 AM > On Tue, May 14, 2019 at 6:35 PM Richard Smith > wrote: > > Yep, I'm not at all surprised. Perhaps we should stop claiming to > support this extension, given that it fundamentally violates assumptions > made by clang (that linkage doesn

[PATCH] D61967: [clang-tidy] Add a close-on-exec check on pipe() in Android module.

2019-05-15 Thread George Burgess IV via Phabricator via cfe-commits
george.burgess.iv added a comment. Thanks for this! I don't have great context on tidy, so I can't stamp this, but I do have a few drive-by nits for you. Comment at: clang-tools-extra/clang-tidy/android/CloexecPipeCheck.cpp:22 + functionDecl(returns(isIn

[PATCH] D61967: [clang-tidy] Add a close-on-exec check on pipe() in Android module.

2019-05-15 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tools-extra/docs/clang-tidy/checks/android-cloexec-pipe.rst:6 + +The usage of ``pipe()`` is not recommended, it's better to use ``pipe2()``. +Without this flag, an opened sensitive file descriptor would remain open across --

[PATCH] D61967: [clang-tidy] Add a close-on-exec check on pipe() in Android module.

2019-05-15 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tools-extra/docs/clang-tidy/checks/android-cloexec-pipe.rst:4 +android-cloexec-pipe +== + Please make same length as name above. Repository: rG LLVM Github Monorepo CHANGES SINCE LAS

[PATCH] D58321: Support for relative vtables

2019-05-15 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan updated this revision to Diff 199696. leonardchan marked 5 inline comments as done. leonardchan added a reviewer: rjmccall. leonardchan removed a subscriber: rjmccall. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D58321/new/ https://revie

[PATCH] D58321: Support for relative vtables

2019-05-15 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan added inline comments. Comment at: clang/include/clang/AST/DeclCXX.h:531 +/// \brief Whether the class uses the relative C++ vtable ABI. +unsigned IsRelativeCXXABI : 1; + pcc wrote: > rjmccall wrote: > > Should we proactively generalize this a

r360827 - Make tentative parsing to detect template-argument-lists less aggressive

2019-05-15 Thread Richard Smith via cfe-commits
Author: rsmith Date: Wed May 15 16:36:14 2019 New Revision: 360827 URL: http://llvm.org/viewvc/llvm-project?rev=360827&view=rev Log: Make tentative parsing to detect template-argument-lists less aggressive (and less wrong). It's not correct to assume that X is always a template-id; there are a fe

[PATCH] D61722: [AST] Add RecoveryExpr; produce it on overload resolution failure and missing member.

2019-05-15 Thread Erik Pilkington via Phabricator via cfe-commits
erik.pilkington added a reviewer: erik.pilkington. erik.pilkington added inline comments. Herald added a subscriber: dexonsmith. Comment at: include/clang/AST/BuiltinTypes.def:265 +// a template. +BUILTIN_TYPE(Recovery, RecoveryTy) + Why are you creating a new ty

[PATCH] D61756: Add a __FILE_NAME__ macro.

2019-05-15 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added a subscriber: alexr. rsmith added a comment. Generally, I think this is a good, useful feature, but there's one point from http://clang.llvm.org/get_involved.html 's checklist for accepting language extensions on which its case is weak, as reflected by this feedback from @alexr on

[PATCH] D61970: [CodeGen][ObjC] Call objc_autoreleaseReturnValue and objc_retainAutoreleasedReturnValue instead of objc_autorelease and objc_retain in MRR

2019-05-15 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak created this revision. ahatanak added reviewers: pete, rjmccall, erik.pilkington. ahatanak added a project: clang. Herald added subscribers: dexonsmith, jkorous. This patch makes IRGen emit ObjC runtime functions (`objc_autoreleaseReturnValue` and `objc_retainAutoreleasedReturnValue`) th

[PATCH] D61756: Add a __FILE_NAME__ macro.

2019-05-15 Thread Kristina Brooks via Phabricator via cfe-commits
kristina added a comment. Landing this as discussed on IRC, will try to push it forward with WG14. I think having something like this as part of the standard would benefit a lot, since currently the "unofficial" way of doing this for either GCC or Clang involves several nonstandard builtins and

Re: r360637 - PR41817: Fix regression in r359260 that caused the MS compatibility

2019-05-15 Thread Richard Smith via cfe-commits
On Wed, 15 May 2019 at 15:54, Reid Kleckner via cfe-commits < cfe-commits@lists.llvm.org> wrote: > *From: *Hans Wennborg > *Date: *Wed, May 15, 2019 at 1:22 AM > >> On Tue, May 14, 2019 at 6:35 PM Richard Smith >> wrote: >> > Yep, I'm not at all surprised. Perhaps we should stop claiming to >> s

r360833 - [Clang][PP] Add the __FILE_NAME__ builtin macro.

2019-05-15 Thread Kristina Brooks via cfe-commits
Author: kristina Date: Wed May 15 17:52:41 2019 New Revision: 360833 URL: http://llvm.org/viewvc/llvm-project?rev=360833&view=rev Log: [Clang][PP] Add the __FILE_NAME__ builtin macro. This patch adds the `__FILE_NAME__` macro that expands to the last component of the path, similar to `__FILE__` e

[PATCH] D61756: Add a __FILE_NAME__ macro.

2019-05-15 Thread Kristina Brooks via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC360833: [Clang][PP] Add the __FILE_NAME__ builtin macro. (authored by kristina, committed by ). Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D61756/new/ https://reviews.ll

[PATCH] D61722: [AST] Add RecoveryExpr; produce it on overload resolution failure and missing member.

2019-05-15 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added a comment. I expect we'll want a `ContainsErrors` bit on `Stmt`, propagated similarly to the existing `InstantiationDependent` / `ContainsUnexpandedParameterPack` / ... bits. For example, the constant evaluator will want to quickly bail out of evaluating expressions and statements

[PATCH] D58920: [Modules][PR39287] Consolidate multiple std's

2019-05-15 Thread Brian Gesiak via Phabricator via cfe-commits
modocache updated this revision to Diff 199708. modocache added a comment. Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Thanks for the help, @rsmith! Your suggestions were spot-on. (It took me a little while to figure out why, even using the `LazyDeclPtr` directly, I was

[PATCH] D58920: [Modules][PR39287] Consolidate multiple std's

2019-05-15 Thread Brian Gesiak via Phabricator via cfe-commits
modocache updated this revision to Diff 199709. modocache added a comment. Oops, sent the patch from the wrong repository. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D58920/new/ https://reviews.llvm.org/D58920 Files: lib/Serialization/ASTReaderDecl.cpp tes

[PATCH] D61974: [ObjC] Fix encoding of ObjC pointer types that are pointers to typedefs

2019-05-15 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak created this revision. ahatanak added reviewers: rjmccall, theraven. ahatanak added a project: clang. Herald added subscribers: dexonsmith, jkorous. clang currently emits different strings for `s0` and `s1` in the following code because pointers to typedefs are encoded as "^{PointeeClass

[PATCH] D58418: [clang][DirectoryWatcher] Upstream DirectoryWatcher

2019-05-15 Thread Jan Korous via Phabricator via cfe-commits
jkorous updated this revision to Diff 199712. jkorous added a comment. A major clean-up. changelog = **general** - specification, documentation, tests - returning only filenames instead of paths (or empty string when the event is related to the watched dir itself) - removed unsound eve

r360837 - Fix regression in r360311 caused by reversed bool arguments.

2019-05-15 Thread Richard Smith via cfe-commits
Author: rsmith Date: Wed May 15 19:06:16 2019 New Revision: 360837 URL: http://llvm.org/viewvc/llvm-project?rev=360837&view=rev Log: Fix regression in r360311 caused by reversed bool arguments. Added: cfe/trunk/test/CXX/over/over.match/over.match.funcs/over.match.ref/p1.cpp Modified: cfe/

RE: r360833 - [Clang][PP] Add the __FILE_NAME__ builtin macro.

2019-05-15 Thread via cfe-commits
Hi Kristina, Your change does not seem to be working on Windows. Can you take a look? http://lab.llvm.org:8011/builders/clang-x64-windows-msvc/builds/6860 FAIL: Clang :: Preprocessor/file_name_macro.c (7959 of 14753) TEST 'Clang :: Preprocessor/file_name_macro.c' FAILED ***

Re: r360833 - [Clang][PP] Add the __FILE_NAME__ builtin macro.

2019-05-15 Thread Kristina Brooks via cfe-commits
Yes, sorry about that, I did notice, just re-testing it, should have a fix for Windows bots in a few minutes. On Thu, May 16, 2019 at 3:26 AM wrote: > Hi Kristina, > > Your change does not seem to be working on Windows. Can you take a look? > > http://lab.llvm.org:8011/builders/clang-x64-windows

r360839 - Fix assumption about Win32 paths in r360833

2019-05-15 Thread Kristina Brooks via cfe-commits
Author: kristina Date: Wed May 15 19:46:12 2019 New Revision: 360839 URL: http://llvm.org/viewvc/llvm-project?rev=360839&view=rev Log: Fix assumption about Win32 paths in r360833 Attempt to fix Windows buildbots due to differences in path handling (caused by r360833). Modified: cfe/trunk/li

r360842 - Revert r360833 until I can work out the issue with Win32 bots

2019-05-15 Thread Kristina Brooks via cfe-commits
Author: kristina Date: Wed May 15 20:30:08 2019 New Revision: 360842 URL: http://llvm.org/viewvc/llvm-project?rev=360842&view=rev Log: Revert r360833 until I can work out the issue with Win32 bots This reverts "r360833: [Clang][PP] Add the __FILE_NAME__ builtin macro." The tests are failing on W

[PATCH] D61989: [clang-tidy] enable modernize-concat-nested-namespaces on header files

2019-05-15 Thread Xiao Shi via Phabricator via cfe-commits
shixiao created this revision. Herald added subscribers: cfe-commits, xazax.hun. Herald added a project: clang. For header files that pass the -header-filter, the modernize-concat-nested-namespaces check does not generate the expected warning and fix for un-concatenated namespaces. This diff fixes

[PATCH] D61756: Add a __FILE_NAME__ macro.

2019-05-15 Thread Kristina Brooks via Phabricator via cfe-commits
kristina reopened this revision. kristina added a comment. This revision is now accepted and ready to land. Reverted in rL360842 as Windows bots were failing. I suspect the `MSVCCompat` case may need to be handled differently depending on the host OS similar

[PATCH] D61970: [CodeGen][ObjC] Call objc_autoreleaseReturnValue and objc_retainAutoreleasedReturnValue instead of objc_autorelease and objc_retain in MRR

2019-05-15 Thread David Kilzer via Phabricator via cfe-commits
ddkilzer added a comment. Had a couple questions about using `objc_retainAutoreleasedReturnValue` without a `return` statement. (I'm just reading this from a layman's point of view; it may not actually matter in practice.) Comment at: test/CodeGenObjC/convert-messages-to-run

[PATCH] D61950: [PowerPC64] adds ABI parsing when specified on target triple

2019-05-15 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. Will FreeBSD 13 or future releases support ELFv1? If not, it may be cleaner to not invent `-elfv2` `-elfv1` triples, but rather dispatch on the major version, e.g. `powerpc64-unknown-freebsd13.0` could mean ELFv2. Repository: rG LLVM Github Monorepo CHANGES SINCE LA

[PATCH] D61849: Do not list enabled checks when -quiet is given to run-clang-tidy.

2019-05-15 Thread Sven Panne via Phabricator via cfe-commits
svenpanne added a comment. Thanks for the review. How will the patch be merged? According to https://llvm.org/docs/Phabricator.html#committing-a-change, someone else has to do it for me, because AFAICT, I have no commit rights. As I said: I'm still in the process of learning the workflow here..

[PATCH] D61909: Add Clang shared library with C++ exports

2019-05-15 Thread Wink Saville via Phabricator via cfe-commits
winksaville added a comment. > Distributions only get libclang_shared if they run the `install` target which > installs all of LLVM & Clang. The point of `LLVM_DISTRIBUTION_COMPONENTS` is > to allow people constructing distributions to choose which pieces they want > to install without introduc

[libunwind] r360862 - [PPC] Fix 32-bit build of libunwind

2019-05-15 Thread Martin Storsjo via cfe-commits
Author: mstorsjo Date: Wed May 15 23:49:20 2019 New Revision: 360862 URL: http://llvm.org/viewvc/llvm-project?rev=360862&view=rev Log: [PPC] Fix 32-bit build of libunwind Clang integrated assembler was unable to build libunwind PPC32 assembly code, present in functions used to save/restore regist

[libunwind] r360861 - [PPC64][libunwind] Fix r2 not properly restored

2019-05-15 Thread Martin Storsjo via cfe-commits
Author: mstorsjo Date: Wed May 15 23:49:13 2019 New Revision: 360861 URL: http://llvm.org/viewvc/llvm-project?rev=360861&view=rev Log: [PPC64][libunwind] Fix r2 not properly restored This change makes each unwind step inspect the instruction at the return address and, if needed, read r2 from its

[PATCH] D61970: [CodeGen][ObjC] Call objc_autoreleaseReturnValue and objc_retainAutoreleasedReturnValue instead of objc_autorelease and objc_retain in MRR

2019-05-15 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak updated this revision to Diff 199760. ahatanak marked an inline comment as done. ahatanak added a comment. Run the main ARC optimization passes when `ObjCNoBuiltinRetainRelease` is not set. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D61970/new/ https:

[PATCH] D61970: [CodeGen][ObjC] Call objc_autoreleaseReturnValue and objc_retainAutoreleasedReturnValue instead of objc_autorelease and objc_retain in MRR

2019-05-15 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak added inline comments. Comment at: test/CodeGenObjC/convert-messages-to-runtime-calls.m:32 // CALLS: {{call.*@objc_allocWithZone}} - // CALLS: {{call.*@objc_retain}} + // CALLS-ARC-INTRINSICS: {{call.*@llvm.objc.retainAutoreleasedReturnValue}} + // CALLS-NO-ARC-INT

<    1   2