[PATCH] D50104: [OpenCL] Always emit alloca in entry block for enqueue_kernel builtin

2018-07-31 Thread Matt Arsenault via Phabricator via cfe-commits
arsenm added a comment. Should this also test for lifetime markers? Repository: rC Clang https://reviews.llvm.org/D50104 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

r338489 - [AST] CastExpr: BasePathSize is not large enough.

2018-07-31 Thread Roman Lebedev via cfe-commits
Author: lebedevri Date: Tue Jul 31 23:06:16 2018 New Revision: 338489 URL: http://llvm.org/viewvc/llvm-project?rev=338489&view=rev Log: [AST] CastExpr: BasePathSize is not large enough. Summary: rC337815 / D49508 had to cannibalize one bit of `CastExprBitfields::BasePathSize` in order to squeeze

[PATCH] D50050: [AST] CastExpr: BasePathSize is not large enough.

2018-07-31 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC338489: [AST] CastExpr: BasePathSize is not large enough. (authored by lebedevri, committed by ). Repository: rC Clang https://reviews.llvm.org/D50050 Files: include/clang/AST/Expr.h include/clang

[PATCH] D50130: [libc++] Fix build failures after merging

2018-07-31 Thread Zhihao Yuan via Phabricator via cfe-commits
This revision was not accepted when it landed; it landed in state "Needs Review". This revision was automatically updated to reflect the committed changes. Closed by commit rCXX338486: [libc++] Fix build failures after merging (authored by lichray, committed by ). Changed prior to com

[libcxx] r338486 - [libc++] Fix build failures after merging

2018-07-31 Thread Zhihao Yuan via cfe-commits
Author: lichray Date: Tue Jul 31 22:21:26 2018 New Revision: 338486 URL: http://llvm.org/viewvc/llvm-project?rev=338486&view=rev Log: [libc++] Fix build failures after merging Summary: - fix a stupid unit test typo - add symbols to Linux abilist Reviewers: EricWF Subscribers: christof, ldionn

[PATCH] D50130: [libc++] Fix build failures after merging

2018-07-31 Thread Zhihao Yuan via Phabricator via cfe-commits
lichray created this revision. Herald added a reviewer: EricWF. Herald added subscribers: cfe-commits, ldionne, christof. - fix a stupid unit test typo - add symbols to Linux abilist Repository: rCXX libc++ https://reviews.llvm.org/D50130 Files: lib/abi/x86_64-unknown-linux-gnu.v1.abilist

[PATCH] D49771: CodeGen: use non-zero memset when possible for automatic variables

2018-07-31 Thread JF Bastien via Phabricator via cfe-commits
jfb added a comment. In https://reviews.llvm.org/D49771#1183641, @mehdi_amini wrote: > > I'm worried, however, about generating a bunch more code than needed from > > clang in the hopes that the compiler will clean it up later. > > Isn't a strong design component of clang/LLVM? Clang does not tr

[PATCH] D50123: [OpenEmbedded] Explicitly specify -stdlib and -rtlib in tests

2018-07-31 Thread Petr Hosek via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL338482: [OpenEmbedded] Explicitly specify -rtlib in tests (authored by phosek, committed by ). Herald added a subscriber: llvm-commits. Changed prior to commit: https://reviews.llvm.org/D50123?vs=158444

r338482 - [OpenEmbedded] Explicitly specify -rtlib in tests

2018-07-31 Thread Petr Hosek via cfe-commits
Author: phosek Date: Tue Jul 31 20:30:06 2018 New Revision: 338482 URL: http://llvm.org/viewvc/llvm-project?rev=338482&view=rev Log: [OpenEmbedded] Explicitly specify -rtlib in tests Tests added in r338294 implicitly assume that libgcc is the runtime library, but that's not the case when the user

[PATCH] D38320: [clang] Fix serializers for `TypeTemplateParmDecl` + related types

2018-07-31 Thread Steve O'Brien via Phabricator via cfe-commits
elsteveogrande added inline comments. Comment at: lib/Serialization/ASTReaderDecl.cpp:3448-3456 if (!inheritDefaultTemplateArgument(Context, FTTP, ToParam)) break; } else if (auto *FNTTP = dyn_cast(FromParam)) { if (!inheritDefaultTemplateArgument(Cont

[PATCH] D41458: [libc++][C++17] Elementary string conversions for integral types

2018-07-31 Thread Zhihao Yuan via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL338479: [libc++][C++17] Elementary string conversions for integral types (authored by lichray, committed by ). Herald added a subscriber: llvm-commits. Changed prior to commit: https://reviews.llvm.org/

[libcxx] r338479 - [libc++][C++17] Elementary string conversions for integral types

2018-07-31 Thread Zhihao Yuan via cfe-commits
Author: lichray Date: Tue Jul 31 19:38:30 2018 New Revision: 338479 URL: http://llvm.org/viewvc/llvm-project?rev=338479&view=rev Log: [libc++][C++17] Elementary string conversions for integral types Summary: Major QoI considerations: - The facility is backported to C++14, same as libstdc++. - Ef

[PATCH] D50123: [OpenEmbedded] Explicitly specify -stdlib and -rtlib in tests

2018-07-31 Thread Mandeep Singh Grang via Phabricator via cfe-commits
mgrang accepted this revision. mgrang added a comment. This revision is now accepted and ready to land. LGTM. Repository: rC Clang https://reviews.llvm.org/D50123 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-b

r338478 - Work around GCC miscompile exposed by r338464.

2018-07-31 Thread Richard Smith via cfe-commits
Author: rsmith Date: Tue Jul 31 19:27:18 2018 New Revision: 338478 URL: http://llvm.org/viewvc/llvm-project?rev=338478&view=rev Log: Work around GCC miscompile exposed by r338464. See gcc.gnu.org/PR86769 for details of the bug. Modified: cfe/trunk/lib/Sema/SemaDecl.cpp Modified: cfe/trunk/l

[PATCH] D49627: [CFG] [analyzer] Constructors of member CXXOperatorCallExpr's argument 0 are not argument constructors.

2018-07-31 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added a comment. Hmm, AST has just changed in https://reviews.llvm.org/rC338135. While the current patch is still relevant, it might be that we'll need to treat this construction context as if it's a simple temporary now. https://reviews.llvm.org/D49627 _

[PATCH] D50008: [libc++] Remove _LIBCPP_BUILDING_XXX macros, which are redundant since _LIBCPP_BUILDING_LIBRARY

2018-07-31 Thread Louis Dionne via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL338475: [libc++] Remove _LIBCPP_BUILDING_XXX macros, which are redundant sinceā€¦ (authored by ldionne, committed by ). Herald added a subscriber: llvm-commits. Changed prior to commit: https://reviews.ll

[libcxx] r338475 - [libc++] Remove _LIBCPP_BUILDING_XXX macros, which are redundant since _LIBCPP_BUILDING_LIBRARY

2018-07-31 Thread Louis Dionne via cfe-commits
Author: ldionne Date: Tue Jul 31 19:08:59 2018 New Revision: 338475 URL: http://llvm.org/viewvc/llvm-project?rev=338475&view=rev Log: [libc++] Remove _LIBCPP_BUILDING_XXX macros, which are redundant since _LIBCPP_BUILDING_LIBRARY Summary: As suggested by Marshall in https://reviews.llvm.org/D499

[libcxxabi] r338475 - [libc++] Remove _LIBCPP_BUILDING_XXX macros, which are redundant since _LIBCPP_BUILDING_LIBRARY

2018-07-31 Thread Louis Dionne via cfe-commits
Author: ldionne Date: Tue Jul 31 19:08:59 2018 New Revision: 338475 URL: http://llvm.org/viewvc/llvm-project?rev=338475&view=rev Log: [libc++] Remove _LIBCPP_BUILDING_XXX macros, which are redundant since _LIBCPP_BUILDING_LIBRARY Summary: As suggested by Marshall in https://reviews.llvm.org/D499

[PATCH] D49114: [clang-tidy] Add a check for "magic numbers"

2018-07-31 Thread Florin Iucha via Phabricator via cfe-commits
0x8000- updated this revision to Diff 158450. 0x8000- added a comment. Add reference to 5.1.1 Use symbolic names instead of literal values in code in the documentation. Repository: rCTE C

[PATCH] D49997: [libcxx] Fix _LIBCPP_NO_EXCEPTIONS redefined warning

2018-07-31 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists accepted this revision. mclow.lists added a comment. This revision is now accepted and ready to land. I'm fine with this; it matches the pattern used on line #354 of this file. (which is in the 'clang' block). We don't do anything like this for the IBM or MS compilers - yet. Reposi

[PATCH] D49715: [analyzer] CallEvent: Add partially working methods for obtaining the callee stack frame.

2018-07-31 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL338474: [analyzer] CallEvent: Add helper methods for obtaining the callee stack frame. (authored by dergachev, committed by ). Herald added a subscriber: llvm-commits. Changed prior to commit: https://r

r338473 - Speculative fix for buildbot failures after r338464.

2018-07-31 Thread Richard Smith via cfe-commits
Author: rsmith Date: Tue Jul 31 18:57:49 2018 New Revision: 338473 URL: http://llvm.org/viewvc/llvm-project?rev=338473&view=rev Log: Speculative fix for buildbot failures after r338464. Modified: cfe/trunk/lib/Sema/SemaDecl.cpp Modified: cfe/trunk/lib/Sema/SemaDecl.cpp URL: http://llvm.org/

r338474 - [analyzer] CallEvent: Add helper methods for obtaining the callee stack frame.

2018-07-31 Thread Artem Dergachev via cfe-commits
Author: dergachev Date: Tue Jul 31 18:58:15 2018 New Revision: 338474 URL: http://llvm.org/viewvc/llvm-project?rev=338474&view=rev Log: [analyzer] CallEvent: Add helper methods for obtaining the callee stack frame. Newly added methods allow reasoning about the stack frame of the call (as opposed

[PATCH] D50101: [asan] Update a vector's storage annotation during destruction.

2018-07-31 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists accepted this revision. mclow.lists added a comment. This revision is now accepted and ready to land. I'm OK with this. Repository: rCXX libc++ https://reviews.llvm.org/D50101 ___ cfe-commits mailing list cfe-commits@lists.llvm.org ht

[PATCH] D50123: [OpenEmbedded] Explicitly specify -stdlib and -rtlib in tests

2018-07-31 Thread Petr Hosek via Phabricator via cfe-commits
phosek added a comment. This broke all our bots so I plan on submitting this if I don't hear back soon. Repository: rC Clang https://reviews.llvm.org/D50123 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mai

[PATCH] D50123: [OpenEmbedded] Explicitly specify -stdlib and -rtlib in tests

2018-07-31 Thread Petr Hosek via Phabricator via cfe-commits
phosek created this revision. phosek added reviewers: rsmith, mgrang, Hahnfeld. Herald added a subscriber: cfe-commits. Tests added r338294 implicitly assume that the libstdc++ is the standard C++ library and libgcc is the runtime library, but that's not the case when the user configures Clang to

[PATCH] D49754: Add -m(no-)spe, and e500 CPU definitions and support to clang

2018-07-31 Thread vit9696 via Phabricator via cfe-commits
vit9696 added a comment. Hello, Thank you for working this. I tried the change and have a couple of suggestions: 1. -mspe option in GCC works like -mspe=yes or -mspe=no. While it does make sense to have it the way you did (-mno-spe and -mspe) it would be nice to have at least have an alias for

r338471 - AMDGPU: Add clamp bit to dot builtins

2018-07-31 Thread Konstantin Zhuravlyov via cfe-commits
Author: kzhuravl Date: Tue Jul 31 18:32:21 2018 New Revision: 338471 URL: http://llvm.org/viewvc/llvm-project?rev=338471&view=rev Log: AMDGPU: Add clamp bit to dot builtins Differential Revision: https://reviews.llvm.org/D50011 Added: cfe/trunk/test/CodeGenOpenCL/builtins-amdgcn-dl-insts-err

[PATCH] D50122: Complex Variable defined in InitCapture Crash fix

2018-07-31 Thread Erik Pilkington via Phabricator via cfe-commits
erik.pilkington added a comment. Hi Balaji, Can you try to manually reduce the attached testcase? Its really difficult to understand exactly what is actually happening here, and why your fix is correct, without having a minimal reproducer. Ideally there would just be a few decls that succinctly

[PATCH] D49396: [WebAssembly] Support for atomic.wait / atomic.wake builtins

2018-07-31 Thread Heejin Ahn via Phabricator via cfe-commits
aheejin added inline comments. Comment at: include/clang/Basic/BuiltinsWebAssembly.def:38 +// Atomic wait and wake. +BUILTIN(__builtin_wasm_atomic_wait_i32, "Uii*iLLi", "n") +BUILTIN(__builtin_wasm_atomic_wait_i64, "UiLLi*LLiLLi", "n") dschuff wrote: > So this me

[PATCH] D49396: [WebAssembly] Support for atomic.wait / atomic.wake builtins

2018-07-31 Thread Heejin Ahn via Phabricator via cfe-commits
aheejin updated this revision to Diff 158434. aheejin marked an inline comment as done. aheejin added a comment. - Changed types Repository: rC Clang https://reviews.llvm.org/D49396 Files: include/clang/Basic/BuiltinsWebAssembly.def lib/CodeGen/CGBuiltin.cpp test/CodeGen/builtins-wasm.

[PATCH] D50122: Complex Variable defined in InitCapture Crash fix

2018-07-31 Thread Balaji Iyer via Phabricator via cfe-commits
bviyer created this revision. bviyer added reviewers: erik.pilkington, ahatanak, arphaman, dexonsmith. Herald added a subscriber: cfe-commits. When a variable is defined in the init capture and it is of type struct that is dependent on additional structure, its definition is not found. An excepti

r338467 - Avoid exposing name for range-based for '__range' variables in lifetime warnings.

2018-07-31 Thread Richard Smith via cfe-commits
Author: rsmith Date: Tue Jul 31 18:03:33 2018 New Revision: 338467 URL: http://llvm.org/viewvc/llvm-project?rev=338467&view=rev Log: Avoid exposing name for range-based for '__range' variables in lifetime warnings. Modified: cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td cfe/trunk/

[PATCH] D50008: [libc++] Remove _LIBCPP_BUILDING_XXX macros, which are redundant since _LIBCPP_BUILDING_LIBRARY

2018-07-31 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists accepted this revision. mclow.lists added a comment. This revision is now accepted and ready to land. This looks fine to me. Repository: rCXX libc++ https://reviews.llvm.org/D50008 ___ cfe-commits mailing list cfe-commits@lists.llvm.o

[PATCH] D49922: [P0936R0] add [[clang::lifetimebound]] attribute

2018-07-31 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. rsmith marked 2 inline comments as done. Closed by commit rC338464: [P0936R0] add [[clang::lifetimebound]] attribute (authored by rsmith, committed by ). Changed prior to commit: https://reviews.llvm.org/D49922?vs=158149&

[PATCH] D49922: [P0936R0] add [[clang::lifetimebound]] attribute

2018-07-31 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith marked 3 inline comments as done. rsmith added inline comments. Comment at: lib/Sema/SemaInit.cpp:6959 + case IndirectLocalPathEntry::LifetimeBoundCall: +// FIXME: Consider adding a note for this. +break; aaron.ballman wrote: > Is this

r338464 - [P0936R0] add [[clang::lifetimebound]] attribute

2018-07-31 Thread Richard Smith via cfe-commits
Author: rsmith Date: Tue Jul 31 17:33:25 2018 New Revision: 338464 URL: http://llvm.org/viewvc/llvm-project?rev=338464&view=rev Log: [P0936R0] add [[clang::lifetimebound]] attribute This patch adds support for a new attribute, [[clang::lifetimebound]], that indicates that the lifetime of a functi

[PATCH] D48341: [clang-doc] Refactoring mapper to map by scope

2018-07-31 Thread Julie Hockett via Phabricator via cfe-commits
juliehockett added inline comments. Comment at: clang-tools-extra/clang-doc/Representation.h:246 + + std::vector ChildNamespaces; + std::vector ChildRecords; ioeric wrote: > Would a record ever have namespace children? Maybe we should assert that this > doesn'

[PATCH] D50119: Compiler support for P1144R0 "__is_trivially_relocatable(T)"

2018-07-31 Thread Arthur O'Dwyer via Phabricator via cfe-commits
Quuxplusone created this revision. Quuxplusone added a reviewer: rsmith. Quuxplusone added a project: clang. Herald added a subscriber: cfe-commits. This is the compiler half of C++ proposal 1144 "Object relocation in terms of move plus destroy," as seen on https://godbolt.org/g/zUUAVW and https

[PATCH] D49114: [clang-tidy] Add a check for "magic numbers"

2018-07-31 Thread Florin Iucha via Phabricator via cfe-commits
0x8000- updated this revision to Diff 158425. 0x8000- added a comment. Add tests to show that we can detect, report and ignore floating point numbers represented using hexadecimal notation Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D49114 Files: clang-tidy/cppcore

[PATCH] D49511: [Sema/Attribute] Check for noderef attribute

2018-07-31 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan updated this revision to Diff 158423. leonardchan added a comment. - Moved the counter and set into `ExpressionEvaluationContextRecord` Repository: rC Clang https://reviews.llvm.org/D49511 Files: include/clang/AST/Type.h include/clang/Basic/Attr.td include/clang/Basic/AttrD

[PATCH] D49771: CodeGen: use non-zero memset when possible for automatic variables

2018-07-31 Thread Mehdi AMINI via Phabricator via cfe-commits
mehdi_amini added a comment. > I'm worried, however, about generating a bunch more code than needed from > clang in the hopes that the compiler will clean it up later. Isn't a strong design component of clang/LLVM? Clang does not try to generate "smart" code and leave it up to LLVM to clean it

[PATCH] D50118: [VFS] Unify iteration code for VFSFromYamlDirIterImpl, NFC intended.

2018-07-31 Thread Volodymyr Sapsai via Phabricator via cfe-commits
vsapsai created this revision. vsapsai added reviewers: bruno, benlangmuir. Herald added a subscriber: dexonsmith. First and subsequent iteration steps are similar, capture this similarity. https://reviews.llvm.org/D50118 Files: clang/lib/Basic/VirtualFileSystem.cpp Index: clang/lib/Basic/V

[libcxx] r338457 - Final bit of P0063 - make sure that aligned_alloc is available when the underlying C library supports it

2018-07-31 Thread Marshall Clow via cfe-commits
Author: marshall Date: Tue Jul 31 16:39:12 2018 New Revision: 338457 URL: http://llvm.org/viewvc/llvm-project?rev=338457&view=rev Log: Final bit of P0063 - make sure that aligned_alloc is available when the underlying C library supports it Modified: libcxx/trunk/test/std/depr/depr.c.headers/

[PATCH] D49953: [compiler-rt] Add a routine to specify the mode used when creating profile dirs.

2018-07-31 Thread Matt Davis via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. mattd marked an inline comment as done. Closed by commit rCRT338456: [compiler-rt] Add a routine to specify the mode used when creating profile dirs. (authored by mattd, committed by ). Herald added subscribers: Sanitizers,

[PATCH] D49396: [WebAssembly] Support for atomic.wait / atomic.wake builtins

2018-07-31 Thread Derek Schuff via Phabricator via cfe-commits
dschuff added inline comments. Comment at: include/clang/Basic/BuiltinsWebAssembly.def:38 +// Atomic wait and wake. +BUILTIN(__builtin_wasm_atomic_wait_i32, "Uii*iLLi", "n") +BUILTIN(__builtin_wasm_atomic_wait_i64, "UiLLi*LLiLLi", "n") So this means that the sign

r338455 - [constexpr] Support for constant evaluation of __builtin_memcpy and

2018-07-31 Thread Richard Smith via cfe-commits
Author: rsmith Date: Tue Jul 31 16:35:09 2018 New Revision: 338455 URL: http://llvm.org/viewvc/llvm-project?rev=338455&view=rev Log: [constexpr] Support for constant evaluation of __builtin_memcpy and __builtin_memmove (in non-type-punning cases). This is intended to permit libc++ to make std::co

[libcxx] r338454 - Test for the presence of a bunch of new macros for c++17. These macros come from C11. Part of P0063

2018-07-31 Thread Marshall Clow via cfe-commits
Author: marshall Date: Tue Jul 31 16:29:06 2018 New Revision: 338454 URL: http://llvm.org/viewvc/llvm-project?rev=338454&view=rev Log: Test for the presence of a bunch of new macros for c++17. These macros come from C11. Part of P0063 Modified: libcxx/trunk/include/cfloat libcxx/trunk/in

[PATCH] D38320: [clang] Fix serializers for `TypeTemplateParmDecl` + related types

2018-07-31 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added inline comments. Comment at: lib/Serialization/ASTReaderDecl.cpp:3448-3456 if (!inheritDefaultTemplateArgument(Context, FTTP, ToParam)) break; } else if (auto *FNTTP = dyn_cast(FromParam)) { if (!inheritDefaultTemplateArgument(Context, FNT

[PATCH] D41458: [libc++][C++17] Elementary string conversions for integral types

2018-07-31 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists accepted this revision. mclow.lists added a comment. This revision is now accepted and ready to land. LGTM. Thanks! Repository: rCXX libc++ https://reviews.llvm.org/D41458 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http:/

Re: r338321 - Fix use of uninitialized variable in r338299

2018-07-31 Thread Eric Christopher via cfe-commits
On Tue, Jul 31, 2018 at 3:59 PM wrote: > What might be missing is the impl of CreateMemberType: > > llvm::DIType *CGDebugInfo::CreateMemberType(llvm::DIFile *Unit, QualType > FType, > StringRef Name, uint64_t > *Offset) { >llvm::DIType *FieldTy = C

[PATCH] D49511: [Sema/Attribute] Check for noderef attribute

2018-07-31 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan added a comment. > Your current counter-based approach doesn't work very well in the case where > we switch to another context while processing an expression (for example, > during template instantiation): you'll defer all the diagnostics for the > inner construct until the outer co

[PATCH] D46845: [libcxx][c++17] P0083R5: Splicing Maps and Sets

2018-07-31 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists accepted this revision. mclow.lists added a comment. In https://reviews.llvm.org/D46845#1183462, @erik.pilkington wrote: > In https://reviews.llvm.org/D46845#1183435, @mclow.lists wrote: > > > One more thing - > > When you add a new header file, you need to update > > `include/modu

[PATCH] D49771: CodeGen: use non-zero memset when possible for automatic variables

2018-07-31 Thread JF Bastien via Phabricator via cfe-commits
jfb added a comment. In https://reviews.llvm.org/D49771#1183562, @mehdi_amini wrote: > In https://reviews.llvm.org/D49771#1183380, @jfb wrote: > > > In https://reviews.llvm.org/D49771#1181008, @mehdi_amini wrote: > > > > > I'm curious: isn't the kind of optimization we should expect LLVM to > >

Re: r338321 - Fix use of uninitialized variable in r338299

2018-07-31 Thread via cfe-commits
What might be missing is the impl of CreateMemberType: llvm::DIType *CGDebugInfo::CreateMemberType(llvm::DIFile *Unit, QualType FType, StringRef Name, uint64_t *Offset) { llvm::DIType *FieldTy = CGDebugInfo::getOrCreateType(FType, Unit); uint64_t

[PATCH] D49771: CodeGen: use non-zero memset when possible for automatic variables

2018-07-31 Thread Mehdi AMINI via Phabricator via cfe-commits
mehdi_amini added a comment. In https://reviews.llvm.org/D49771#1183380, @jfb wrote: > In https://reviews.llvm.org/D49771#1181008, @mehdi_amini wrote: > > > I'm curious: isn't the kind of optimization we should expect LLVM to > > provide? > > > Maybe? It seems obvious to do here since we know we

[PATCH] D49511: [Sema/Attribute] Check for noderef attribute

2018-07-31 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan added a comment. > You shouldn't be adding your own `ExpressionEvaluationContextRecord`s. What I > was suggesting is that you store a list of pending `noderef` expressions on > the record, and diagnose them when the record is popped (if they've not been > removed since). This is

[PATCH] D50102: [clang-tidy] Use ExprMutationAnalyzer in performance-unnecessary-value-param

2018-07-31 Thread Shuai Wang via Phabricator via cfe-commits
shuaiwang updated this revision to Diff 158408. shuaiwang added a comment. Add test case Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D50102 Files: clang-tidy/performance/UnnecessaryValueParamCheck.cpp test/clang-tidy/performance-unnecessary-value-param.cpp Index: test/cl

[PATCH] D49511: [Sema/Attribute] Check for noderef attribute

2018-07-31 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan updated this revision to Diff 158407. leonardchan marked 6 inline comments as done. leonardchan added a comment. - Added tests for checking that `noderef` can only be used for C style pointers and arrays (not usable for references or ObjC pointers) - Added warnings for dereferencing a

[PATCH] D41458: [libc++][C++17] Elementary string conversions for integral types

2018-07-31 Thread Zhihao Yuan via Phabricator via cfe-commits
lichray updated this revision to Diff 158404. lichray added a comment. Dropping a lambda Repository: rCXX libc++ https://reviews.llvm.org/D41458 Files: include/CMakeLists.txt include/charconv include/module.modulemap src/charconv.cpp test/libcxx/double_include.sh.cpp test/std/uti

[PATCH] D50112: [Android] Increase default new alignment for Android

2018-07-31 Thread Pirama Arumuga Nainar via Phabricator via cfe-commits
pirama created this revision. pirama added a reviewer: rsmith. Android's memory allocators also guarantee 8-byte alignment for 32-bit architectures and 16-byte alignment for 64-bit. Repository: rC Clang https://reviews.llvm.org/D50112 Files: lib/Basic/TargetInfo.cpp test/Preprocessor/ini

[PATCH] D50110: Handle shared release attributes correctly

2018-07-31 Thread Aaron Puchert via Phabricator via cfe-commits
aaronpuchert created this revision. aaronpuchert added reviewers: aaron.ballman, delesley. Herald added a subscriber: cfe-commits. Repository: rC Clang https://reviews.llvm.org/D50110 Files: lib/Analysis/ThreadSafety.cpp test/SemaCXX/warn-thread-safety-analysis.cpp Index: test/SemaCXX/wa

Re: r338321 - Fix use of uninitialized variable in r338299

2018-07-31 Thread Eric Christopher via cfe-commits
I'm probably missing something, from looking here: FieldOffset = 0; if (CGM.getLangOpts().OpenCL) { FType = CGM.getContext().IntTy; EltTys.push_back(CreateMemberType(Unit, FType, "__size", &FieldOffset)); EltTys.push_back(CreateMemberType(Unit, FType, "__align", &FieldOffset)); }

[PATCH] D46845: [libcxx][c++17] P0083R5: Splicing Maps and Sets

2018-07-31 Thread Erik Pilkington via Phabricator via cfe-commits
erik.pilkington added a comment. In https://reviews.llvm.org/D46845#1183435, @mclow.lists wrote: > One more thing - > When you add a new header file, you need to update > `include/module.modulemap`, `test/libcxx/double_include.sh.cpp`, and > `include/CMakeLists.txt`. > Take a look at https:/

[PATCH] D49952: Check for NULL Destination-Type when creating ArrayConstant

2018-07-31 Thread Balaji Iyer via Phabricator via cfe-commits
bviyer updated this revision to Diff 158392. bviyer added a comment. Forgot to pass the -emit-llvm to the test case. https://reviews.llvm.org/D49952 Files: lib/CodeGen/CGExprConstant.cpp test/CodeGenCXX/empty-struct-init-list.cpp Index: test/CodeGenCXX/empty-struct-init-list.cpp =

r338444 - Revert r337635 "[Driver] Sanitizer support based on runtime library presence"

2018-07-31 Thread Reid Kleckner via cfe-commits
Author: rnk Date: Tue Jul 31 14:57:35 2018 New Revision: 338444 URL: http://llvm.org/viewvc/llvm-project?rev=338444&view=rev Log: Revert r337635 "[Driver] Sanitizer support based on runtime library presence" This change causes issues with distributed build systems, which may only have compiler bi

[PATCH] D50050: [AST] CastExpr: BasePathSize is not large enough.

2018-07-31 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added a comment. In https://reviews.llvm.org/D50050#1183341, @rjmccall wrote: > LGTM. Thank you for the review. I'll land in ~+9 hours or so, since i did not hear from @erichkeane back yet.. Repository: rC Clang https://reviews.llvm.org/D50050

[PATCH] D49952: Check for NULL Destination-Type when creating ArrayConstant

2018-07-31 Thread Balaji Iyer via Phabricator via cfe-commits
bviyer updated this revision to Diff 158391. bviyer added a comment. Fixed code as suggested by John McCall. Repository: rC Clang https://reviews.llvm.org/D49952 Files: lib/CodeGen/CGExprConstant.cpp test/CodeGenCXX/empty-struct-init-list.cpp Index: test/CodeGenCXX/empty-struct-init-li

[PATCH] D50104: [OpenCL] Always emit alloca in entry block for enqueue_kernel builtin

2018-07-31 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added inline comments. Comment at: lib/CodeGen/CGBuiltin.cpp:3342 auto *AT = llvm::ArrayType::get(SizeTy, NumArgs - First); + // Always insert the alloca in the entry block so it remains static in + // the SelectionDAG. + BasicBlock *Begin = nullptr;

[PATCH] D46845: [libcxx][c++17] P0083R5: Splicing Maps and Sets

2018-07-31 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists added a comment. One more thing - When you add a new header file, you need to update `include/module.modulemap`, `test/libcxx/double_include.sh.cpp`, and `include/CMakeLists.txt`. Take a look at https://reviews.llvm.org/D49338 for an example. https://reviews.llvm.org/D46845

[PATCH] D49210: [CFG] [analyzer] NFC: Enumerate construction context layer kinds and re-use their code for ExprEngine keys.

2018-07-31 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ closed this revision. NoQ added a comment. Committed as https://reviews.llvm.org/rC338439 but Phabricator didn't pick it up because i put a `.` after the phabricator link. https://reviews.llvm.org/D49210 ___ cfe-commits mailing list cfe-commits

[PATCH] D48681: [CFG] [analyzer] Add construction contexts for function arguments.

2018-07-31 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ closed this revision. NoQ added a comment. Committed as https://reviews.llvm.org/rC338436 but Phabricator didn't pick it up because i put a `.` after the phabricator link. https://reviews.llvm.org/D48681 ___ cfe-commits mailing list cfe-commits

[PATCH] D50106: [libc++] Fix tuple assignment from type derived from a tuple-like

2018-07-31 Thread Louis Dionne via Phabricator via cfe-commits
ldionne created this revision. ldionne added reviewers: EricWF, mclow.lists. Herald added subscribers: cfe-commits, dexonsmith, christof. The implementation of operator= for tuple currently diverges from the way the Standard specifies them, which leads to subtle cases where the behavior is not as

[PATCH] D50055: Update the coding standard about NFC changes and whitespace

2018-07-31 Thread Chandler Carruth via Phabricator via cfe-commits
chandlerc added inline comments. Comment at: docs/DeveloperPolicy.rst:395-408 +Commits with No Functional Change +- + +It may be permissible to commit changes without prior review when the changes +have no semantic impact on the code if the changes

[PATCH] D49627: [CFG] [analyzer] Constructors of member CXXOperatorCallExpr's argument 0 are not argument constructors.

2018-07-31 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added a comment. In https://reviews.llvm.org/D49627#1176326, @baloghadamsoftware wrote: > How much different is a correct `this`-argument construction context from > real argument construction contexts? It's identified in a similar manner; this patch pretty much already shows how to ident

[PATCH] D50104: [OpenCL] Always emit alloca in entry block for enqueue_kernel builtin

2018-07-31 Thread Scott Linder via Phabricator via cfe-commits
scott.linder created this revision. scott.linder added reviewers: yaxunl, Anastasia, arsenm. Herald added subscribers: cfe-commits, wdng. Ensures the statically sized alloca is not converted to DYNAMIC_STACKALLOC later because it is not in the entry block. I believe it is valid to insert the all

[PATCH] D49771: CodeGen: use non-zero memset when possible for automatic variables

2018-07-31 Thread JF Bastien via Phabricator via cfe-commits
jfb added a comment. In https://reviews.llvm.org/D49771#1181008, @mehdi_amini wrote: > I'm curious: isn't the kind of optimization we should expect LLVM to provide? Maybe? It seems obvious to do here since we know we'll probably want to be doing it, and I have another patch I'm working on whic

[PATCH] D49213: [analyzer] pr38072: Suppress an assertion failure for eliding the same destructor twice due to the default argument problem.

2018-07-31 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC338441: [analyzer] Fix eliding the same destructor twice due to buggy default arguments. (authored by dergachev, committed by ). Repository: rC Clang https://reviews.llvm.org/D49213 Files: lib/Stati

r338441 - [analyzer] Fix eliding the same destructor twice due to buggy default arguments.

2018-07-31 Thread Artem Dergachev via cfe-commits
Author: dergachev Date: Tue Jul 31 14:17:40 2018 New Revision: 338441 URL: http://llvm.org/viewvc/llvm-project?rev=338441&view=rev Log: [analyzer] Fix eliding the same destructor twice due to buggy default arguments. Because of incomplete support for CXXDefaultArgExpr, we cannot yet commit to ass

[PATCH] D50102: Use ExprMutationAnalyzer in performance-unnecessary-value-param

2018-07-31 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added a comment. It is great when the test cases are included :) Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D50102 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/

r338439 - [CFG] [analyzer] NFC: Enumerate construction context layer kinds.

2018-07-31 Thread Artem Dergachev via cfe-commits
Author: dergachev Date: Tue Jul 31 14:12:42 2018 New Revision: 338439 URL: http://llvm.org/viewvc/llvm-project?rev=338439&view=rev Log: [CFG] [analyzer] NFC: Enumerate construction context layer kinds. This is a refactoring patch; no functional change intended. The common part of ConstructionCon

[PATCH] D50102: Use ExprMutationAnalyzer in performance-unnecessary-value-param

2018-07-31 Thread Shuai Wang via Phabricator via cfe-commits
shuaiwang created this revision. Herald added a reviewer: george.karpenkov. Herald added subscribers: cfe-commits, a.sidorin. This yields better recall as ExprMutationAnalyzer is more accurate. One common pattern this check is now able to catch is: void foo(std::vector v) { for (const auto

[PATCH] D15225: [Driver] Sanitizer support based on runtime library presence

2018-07-31 Thread George Karpenkov via Phabricator via cfe-commits
george.karpenkov added a comment. @rnk OK it's fine with me to revert it now and then we see what can be done. Repository: rL LLVM https://reviews.llvm.org/D15225 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-b

[PATCH] D50050: [AST] CastExpr: BasePathSize is not large enough.

2018-07-31 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri updated this revision to Diff 158379. lebedev.ri added a comment. Drop pointless cast of zero. Repository: rC Clang https://reviews.llvm.org/D50050 Files: include/clang/AST/Expr.h include/clang/AST/ExprCXX.h include/clang/AST/ExprObjC.h include/clang/AST/Stmt.h lib/AST/E

[PATCH] D47394: [OpenMP][Clang][NVPTX] Replace bundling with partial linking for the OpenMP NVPTX device offloading toolchain

2018-07-31 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
gtbercea added inline comments. Comment at: include/clang/Driver/Compilation.h:312 + /// \param skipBundler - bool value set once by the driver. + void setSkipOffloadBundler(bool skipBundler); + sfantao wrote: > gtbercea wrote: > > sfantao wrote: > > > gtbercea

[PATCH] D15225: [Driver] Sanitizer support based on runtime library presence

2018-07-31 Thread Reid Kleckner via Phabricator via cfe-commits
rnk added a comment. In https://reviews.llvm.org/D15225#1183318, @george.karpenkov wrote: > @rnk changing subjects: will you be at the LLVM social on Thursday? Could we > discuss it there? Yes, we can and should, but I'd like update chromium's copy of clang before then. Repository: rL LLV

[PATCH] D50050: [AST] CastExpr: BasePathSize is not large enough.

2018-07-31 Thread John McCall via Phabricator via cfe-commits
rjmccall accepted this revision. rjmccall added a comment. This revision is now accepted and ready to land. LGTM. Comment at: include/clang/AST/Expr.h:2791 +public: + using BasePathSizeTy = unsigned short; + static_assert(std::numeric_limits::max() >= 16384,

r338438 - [serialization] PR34728: Don't assume that only a suffix of template

2018-07-31 Thread Richard Smith via cfe-commits
Author: rsmith Date: Tue Jul 31 14:01:53 2018 New Revision: 338438 URL: http://llvm.org/viewvc/llvm-project?rev=338438&view=rev Log: [serialization] PR34728: Don't assume that only a suffix of template parameters can have default arguments. At least for function templates and class template parti

[PATCH] D49922: [P0936R0] add [[clang::lifetimebound]] attribute

2018-07-31 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, though I raised a few questions. If you want to handle them as part of this patch, I'm happy to do another round of review. If you want to handle them in a follow-up patch,

[PATCH] D50089: [DWARF v4] Suppressing the __debug_ranges section when there are no ranges

2018-07-31 Thread Wolfgang Pieb via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL338437: [DWARF] Do not create a .debug_ranges section when no ranges are needed. (authored by wolfgangp, committed by ). Changed prior to commit: https://reviews.llvm.org/D50089?vs=158328&id=158378#toc

[PATCH] D49953: [compiler-rt] Add a routine to specify the mode used when creating profile dirs.

2018-07-31 Thread Paul Robinson via Phabricator via cfe-commits
probinson accepted this revision. probinson added a comment. This revision is now accepted and ready to land. Using `%t` with suffixes instead of `%T` is the preferred idiom, glad you worked that out. The more elaborate test depends on a set of Posix-y calls, but that's fine. If there are more

[PATCH] D15225: [Driver] Sanitizer support based on runtime library presence

2018-07-31 Thread George Karpenkov via Phabricator via cfe-commits
george.karpenkov added a comment. @rnk changing subjects: will you be at the LLVM social on Thursday? Could we discuss it there? Repository: rL LLVM https://reviews.llvm.org/D15225 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://l

r338436 - [CFG] [analyzer] Implement function argument construction contexts.

2018-07-31 Thread Artem Dergachev via cfe-commits
Author: dergachev Date: Tue Jul 31 13:45:53 2018 New Revision: 338436 URL: http://llvm.org/viewvc/llvm-project?rev=338436&view=rev Log: [CFG] [analyzer] Implement function argument construction contexts. In r330377 and r338425 we have already identified what constitutes function argument construc

r338432 - [OpenCL] Forbid size dependent types used as kernel arguments

2018-07-31 Thread via cfe-commits
Author: AlexeySotkin Date: Tue Jul 31 13:26:43 2018 New Revision: 338432 URL: http://llvm.org/viewvc/llvm-project?rev=338432&view=rev Log: [OpenCL] Forbid size dependent types used as kernel arguments Summary: Size_t, intptr_t, uintptr_t and ptrdiff_t cannot be used as kernel arguments, according

[PATCH] D49725: [OpenCL] Forbid size dependent types used as kernel arguments

2018-07-31 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. FYI: @asavonic, the email address you have associated with your commit id is `AlexeySotkin@/etc/mailname` which is getting stuck in the moderation queue as not being signed up to the mailing list. You may want to correct your svn information as I am not certain wh

[PATCH] D50055: Update the coding standard about NFC changes and whitespace

2018-07-31 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added subscribers: llvm-commits, cfe-commits. aaron.ballman added a comment. In https://reviews.llvm.org/D50055#1183277, @probinson wrote: > I think you forgot to subscribe llvm-commits to this review? Oh shoot, good catch! I've added llvm-commits and cfe-commits both. Thank you

[PATCH] D15225: [Driver] Sanitizer support based on runtime library presence

2018-07-31 Thread George Karpenkov via Phabricator via cfe-commits
george.karpenkov added a comment. @rnk OK I see, we've accidentally posted comments nearly simultaneously. Repository: rL LLVM https://reviews.llvm.org/D15225 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/m

[PATCH] D15225: [Driver] Sanitizer support based on runtime library presence

2018-07-31 Thread George Karpenkov via Phabricator via cfe-commits
george.karpenkov added a comment. > it's just that the runtime library didn't happen to exist on the system > performing compilation But then conceptually, the compiler toolchain on the system performing compilation is not fully supporting asan, right? It works for producing asanified object fi

[PATCH] D15225: [Driver] Sanitizer support based on runtime library presence

2018-07-31 Thread Reid Kleckner via Phabricator via cfe-commits
rnk added a comment. In https://reviews.llvm.org/D15225#1183132, @george.karpenkov wrote: > @rnk could you clarify how did it break the distributed asanified build? If > the slave compiler supports asan it should have this runtime, right? Most open source distributed build systems wrap only co

[PATCH] D49758: [clangd] allow clients to pass in compilationDatabaseChanges in the 'workspace/didChangeConfiguration' request

2018-07-31 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman added inline comments. Comment at: test/clangd/did-change-configuration-params.test:43 +# +# ERR: Updating file /clangd-test/foo.c with command [/clangd-test2] clang -c foo.c -Wall -Werror +# Don't reparse the second file: ilya-biryukov wrote: > Matchin

  1   2   3   >