[PATCH] D49508: [Sema] Mark implicitly-inserted ICE's as being part of explicit cast (PR38166)

2018-07-21 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added inline comments. Comment at: lib/Sema/SemaCast.cpp:94-101 +void updatePartOfExplicitCastFlags(CastExpr *CE) { + // Walk down from the CE to the OrigSrcExpr, and mark all immediate + // ImplicitCastExpr's as being part of ExplicitCastExpr. The origin

[PATCH] D49508: [Sema] Mark implicitly-inserted ICE's as being part of explicit cast (PR38166)

2018-07-21 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added inline comments. Comment at: include/clang/AST/Stmt.h:206 +bool PartOfExplicitCast : 1; +unsigned BasePathSize : 32 - 6 - 1 - NumExprBits; }; rsmith wrote: > lebedev.ri wrote: > > rjmccall wrote: > > > lebedev.ri wrote: > > > > rjmccal

[PATCH] D49508: [Sema] Mark implicitly-inserted ICE's as being part of explicit cast (PR38166)

2018-07-21 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri updated this revision to Diff 156670. lebedev.ri marked an inline comment as done. lebedev.ri added a comment. Partially address some of @rsmith's review notes, see reply notes for issues. Repository: rC Clang https://reviews.llvm.org/D49508 Files: include/clang/AST/Expr.h inc

[PATCH] D49634: [libclang] Add support for getting property setter and getter names

2018-07-21 Thread Michael Wu via Phabricator via cfe-commits
michaelwu created this revision. This allows libclang to access the actual names of property setters and getters without needing to go through the indexer API. Usually default names are used, but the property can specify a different name. Repository: rC Clang https://reviews.llvm.org/D49634

[PATCH] D49635: [libclang 8/8] Add support for the flag_enum attribute

2018-07-21 Thread Michael Wu via Phabricator via cfe-commits
michaelwu created this revision. This adds support to libclang for reading the flag_enum attribute. This also bumps CINDEX_VERSION_MINOR for this patch series. Repository: rC Clang https://reviews.llvm.org/D49635 Files: include/clang-c/Index.h test/Index/attributes.c tools/libclang/CI

[PATCH] D41566: [Modules TS] Diagnose exported internal linkage declarations

2018-07-21 Thread Hamza Sood via Phabricator via cfe-commits
hamzasood updated this revision to Diff 156681. hamzasood added a comment. - Fixed the premature loop termination issue pointed out by @rsmith (and added a test case for it). - Fixed a few small issues regarding diagnosing exported enum/struct/union declarations without a name (especially anonym

[PATCH] D47344: LWG 2843 "Unclear behavior of std::pmr::memory_resource::do_allocate()"

2018-07-21 Thread Arthur O'Dwyer via Phabricator via cfe-commits
Quuxplusone updated this revision to Diff 156684. Quuxplusone added a comment. Fix the "zero-byte allocation might be misaligned" issue by just never trying to allocate zero bytes — try to allocate 1 byte instead. Repository: rCXX libc++ https://reviews.llvm.org/D47344 Files: include/expe

[PATCH] D47344: LWG 2843 "Unclear behavior of std::pmr::memory_resource::do_allocate()"

2018-07-21 Thread Arthur O'Dwyer via Phabricator via cfe-commits
Quuxplusone marked 5 inline comments as done. Quuxplusone added inline comments. Comment at: src/experimental/memory_resource.cpp:48 +#ifdef _LIBCPP_HAS_NO_ALIGNED_ALLOCATION +if (__size != 0 && !is_aligned_to(result, __align)) { +_VSTD::__libcpp_deallocate(re

[PATCH] D49589: [UBSan] Strengthen pointer checks in 'new' expressions

2018-07-21 Thread John McCall via Phabricator via cfe-commits
rjmccall added inline comments. Comment at: lib/CodeGen/CodeGenFunction.h:380 + /// True if sanitizer checks for current pointer value are generated. + bool PointerChecksAreEmitted = false; + I don't think this is a good way of doing this. Using global state m

[PATCH] D49638: [libcxxabi] Implement a GCC compatible SEH unwinding personality, __gxx_personality_seh0

2018-07-21 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo created this revision. mstorsjo added reviewers: compnerd, smeenai, rnk, zturner, majnemer, EricWF. Herald added subscribers: ldionne, chrib. This allows handling SEH based exceptions, with unwind functions provided by libgcc. Repository: rCXXA libc++abi https://reviews.llvm.org/D49

Clang-Tidy Problem when Exporting Fixes

2018-07-21 Thread Ahmad Nouralizadeh via cfe-commits
I ran clang-tidy in the root directory of the source code of an application (MPlayer-1.3.0). Precisely, I use run-clang-tidy.py python script, as follows: run-clang-tidy.py -header-filter='.*' -checks='-*,readability-braces-around-statements' -fix I ran clang-tidy in the root directory of the so

Re: r337470 - [Sema] Add a new warning, -Wmemset-transposed-args

2018-07-21 Thread Nico Weber via cfe-commits
This has a false positive on ffmpeg: ../../third_party/ffmpeg/libavcodec/options.c:273:64: error: 'size' argument to memset is '0'; did you mean to transpose the last two arguments? [-Werror,-Wmemset-transposed-args] alloc_and_copy_or_fail(intra_matrix, 64 * sizeof(int16_t), 0); With: #define al

Re: r337470 - [Sema] Add a new warning, -Wmemset-transposed-args

2018-07-21 Thread Arthur O'Dwyer via cfe-commits
In this case Clang is complaining about memset(complicated-expr, 0, 0); which means that transposing the last two arguments would not "fix" anything. Clang ought to not complain in this case. It doesn't have anything to do with coming from a macro; it's just that *both* arguments are zero. (I

[PATCH] D41627: [Modules TS] Fix namespace visibility

2018-07-21 Thread Hamza Sood via Phabricator via cfe-commits
hamzasood updated this revision to Diff 156689. hamzasood added a comment. - Don't assume that -fmodules-ts implies that we're in a TS module. - Don't ignore private namespaces when calculating the ownership kind. https://reviews.llvm.org/D41627 Files: include/clang/AST/DeclBase.h lib/AST/D

[PATCH] D49634: [libclang 7/8] Add support for getting property setter and getter names

2018-07-21 Thread Michael Wu via Phabricator via cfe-commits
michaelwu updated this revision to Diff 156691. michaelwu added a comment. Fix test https://reviews.llvm.org/D49634 Files: include/clang-c/Index.h test/Index/property-getter-setter.m tools/c-index-test/c-index-test.c tools/libclang/CIndex.cpp tools/libclang/libclang.exports Index: to

[PATCH] D36527: Implemented P0428R2 - Familiar template syntax for generic lambdas

2018-07-21 Thread Hamza Sood via Phabricator via cfe-commits
hamzasood updated this revision to Diff 156693. hamzasood added a comment. - Resolved merge conflicts https://reviews.llvm.org/D36527 Files: include/clang/AST/DeclCXX.h include/clang/AST/DeclTemplate.h include/clang/AST/ExprCXX.h include/clang/AST/RecursiveASTVisitor.h include/clang/B

[PATCH] D49063: [libclang 1/8] Add support for ObjCObjectType

2018-07-21 Thread Michael Wu via Phabricator via cfe-commits
michaelwu updated this revision to Diff 156692. michaelwu added a comment. `clang_Type_getNumObjCTypeArgs` and `clang_Type_getNumObjCProtocolRefs` now return unsigned. I've bumped `CINDEX_VERSION_MINOR` in https://reviews.llvm.org/D49635 , which is the last in this patch series. https://revie

[PATCH] D49597: [ms] Fix mangling of vector types in QMM_Result contexts.

2018-07-21 Thread Nico Weber via Phabricator via cfe-commits
thakis added a comment. rnk, since zturner is out until Thu, can you take a look? https://reviews.llvm.org/D49597 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[libcxx] r337649 - Implement a better copy_file.

2018-07-21 Thread Eric Fiselier via cfe-commits
Author: ericwf Date: Sat Jul 21 19:00:53 2018 New Revision: 337649 URL: http://llvm.org/viewvc/llvm-project?rev=337649&view=rev Log: Implement a better copy_file. This patch improves both the performance, and the safety of the copy_file implementation. The performance improvements are achieved b

Fwd: [llvm-dev] [LLVM.ORG] Scheduled Restart of llvm.org services Saturday 2018-07-21 @ 20:00PDT

2018-07-21 Thread Mike Edwards via cfe-commits
-- Forwarded message -- From: Mike Edwards Date: Sat, Jul 21, 2018 at 8:32 PM Subject: Re: [llvm-dev] [LLVM.ORG] Scheduled Restart of llvm.org services Saturday 2018-07-21 @ 20:00PDT To: llvm-dev Hello, The system update and restart of the llvm.org servers has been completed suc

[PATCH] D49643: [HIP] Add -target-cpu option for clang -cc1

2018-07-21 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl created this revision. yaxunl added reviewers: rjmccall, tra, b-sumner, scchan. https://reviews.llvm.org/D49643 Files: lib/Driver/ToolChains/HIP.cpp test/Driver/hip-toolchain.hip test/Driver/lit.local.cfg Index: test/Driver/lit.local.cfg

r337653 - PR38257: don't perform ADL when instantiating a unary & operator that turns out

2018-07-21 Thread Richard Smith via cfe-commits
Author: rsmith Date: Sat Jul 21 22:21:47 2018 New Revision: 337653 URL: http://llvm.org/viewvc/llvm-project?rev=337653&view=rev Log: PR38257: don't perform ADL when instantiating a unary & operator that turns out to be forming a pointer-to-member. Added: cfe/trunk/test/SemaTemplate/argument-d