[PATCH] D26564: Use PIC relocation mode by default for PowerPC64 ELF

2016-12-13 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. LGTM https://reviews.llvm.org/D26564 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe

[PATCH] D27748: [clang-tidy] Suggest including if necessary in type-promotion-in-math-fn-check.

2016-12-13 Thread Justin Lebar via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. jlebar marked an inline comment as done. Closed by commit rL289637: [clang-tidy] Suggest including if necessary in type-promotion-in-math… (authored by jlebar). Changed prior to commit: https://reviews.llvm.org/D27748?vs

[clang-tools-extra] r289637 - [clang-tidy] Suggest including if necessary in type-promotion-in-math-fn-check.

2016-12-13 Thread Justin Lebar via cfe-commits
Author: jlebar Date: Wed Dec 14 00:52:23 2016 New Revision: 289637 URL: http://llvm.org/viewvc/llvm-project?rev=289637&view=rev Log: [clang-tidy] Suggest including if necessary in type-promotion-in-math-fn-check. Reviewers: alexfh Subscribers: JDevlieghere, cfe-commits Differential Revision:

[PATCH] D27748: [clang-tidy] Suggest including if necessary in type-promotion-in-math-fn-check.

2016-12-13 Thread Justin Lebar via Phabricator via cfe-commits
jlebar marked 2 inline comments as done. jlebar added a comment. Thank you for the review, @alexfh. I will commit with these changes. Comment at: clang-tools-extra/clang-tidy/performance/TypePromotionInMathFnCheck.cpp:198 +Result.Context->getSourceManager().getFil

[PATCH] D27377: clang-format: Support the Java 8 'default' method modifier

2016-12-13 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. Thank you! https://reviews.llvm.org/D27377 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/ma

[PATCH] D27748: [clang-tidy] Suggest including if necessary in type-promotion-in-math-fn-check.

2016-12-13 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh added a comment. LG with a couple of nits. https://reviews.llvm.org/D27748 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D27748: [clang-tidy] Suggest including if necessary in type-promotion-in-math-fn-check.

2016-12-13 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh accepted this revision. alexfh added inline comments. This revision is now accepted and ready to land. Comment at: clang-tools-extra/clang-tidy/performance/TypePromotionInMathFnCheck.cpp:187 - diag(Call->getExprLoc(), "call to '%0' promotes float to double") - <<

[PATCH] D27284: [ClangTidy] Add new performance-type-promotion-in-math-fn check.

2016-12-13 Thread Justin Lebar via Phabricator via cfe-commits
jlebar added a comment. Sent https://reviews.llvm.org/D27748 for #include suggestion. Repository: rL LLVM https://reviews.llvm.org/D27284 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-c

[PATCH] D27748: [clang-tidy] Suggest including if necessary in type-promotion-in-math-fn-check.

2016-12-13 Thread Justin Lebar via Phabricator via cfe-commits
jlebar created this revision. jlebar added a reviewer: alexfh. jlebar added a subscriber: cfe-commits. Herald added a subscriber: JDevlieghere. https://reviews.llvm.org/D27748 Files: clang-tools-extra/clang-tidy/performance/TypePromotionInMathFnCheck.cpp clang-tools-extra/clang-tidy/performan

[PATCH] D27683: Prepare PrettyStackTrace for LLDB adoption

2016-12-13 Thread Chris Bieneman via Phabricator via cfe-commits
beanz accepted this revision. beanz added a comment. LGTM other than a few style comments. Please clang-format before committing. Some of the formatting looks off (although that might just be my phone). Comment at: lib/Support/PrettyStackTrace.cpp:152 + va_start(ap, format);

[PATCH] D23096: [Sema] Pass CombineWithOuterScope = true to constructor of LocalInstantiationScope

2016-12-13 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff accepted this revision. sepavloff added a comment. This revision is now accepted and ready to land. Looks good. Thank you! https://reviews.llvm.org/D23096 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bi

r289276 - [modules] Add optional out-param to ASTReader::ReadAST for imported submodules.

2016-12-13 Thread Graydon Hoare via cfe-commits
Author: graydon Date: Fri Dec 9 15:45:49 2016 New Revision: 289276 URL: http://llvm.org/viewvc/llvm-project?rev=289276&view=rev Log: [modules] Add optional out-param to ASTReader::ReadAST for imported submodules. Summary: The Swift frontend is acquiring the ability to load non-module PCH files

r289535 - [OpenCL] Enable unroll hint for OpenCL 1.x.

2016-12-13 Thread Egor Churaev via cfe-commits
Author: echuraev Date: Tue Dec 13 08:02:35 2016 New Revision: 289535 URL: http://llvm.org/viewvc/llvm-project?rev=289535&view=rev Log: [OpenCL] Enable unroll hint for OpenCL 1.x. Summary: Although the feature was introduced only in OpenCL C v2.0 spec., it's useful for OpenCL 1.x too and doesn't

Re: [PATCH] D21695: [clang] Version support for UBSan handlers

2016-12-13 Thread Andrew Ford via cfe-commits
It does have c++11, but some functions are missing. I don't know the details of which ones are missing or why, have only seen std::to_string be a problem so far. On Mon, Dec 12, 2016 at 11:05 AM Filipe Cabecinhas < filcab+llvm.phabrica...@gmail.com> wrote: > Thanks Vedant! > Andrew: does Android

r289536 - [OpenCL] Improve address space diagnostics.

2016-12-13 Thread Egor Churaev via cfe-commits
Author: echuraev Date: Tue Dec 13 08:07:23 2016 New Revision: 289536 URL: http://llvm.org/viewvc/llvm-project?rev=289536&view=rev Log: [OpenCL] Improve address space diagnostics. Reviewers: Anastasia Subscribers: bader, yaxunl, cfe-commits Differential Revision: https://reviews.llvm.org/D27671

r289630 - [c++1z] P0217R3: Allow by-value structured binding of arrays.

2016-12-13 Thread Richard Smith via cfe-commits
Author: rsmith Date: Tue Dec 13 21:22:16 2016 New Revision: 289630 URL: http://llvm.org/viewvc/llvm-project?rev=289630&view=rev Log: [c++1z] P0217R3: Allow by-value structured binding of arrays. Modified: cfe/trunk/include/clang/Sema/Initialization.h cfe/trunk/lib/Sema/SemaDecl.cpp cf

[PATCH] D27284: [ClangTidy] Add new performance-type-promotion-in-math-fn check.

2016-12-13 Thread Justin Lebar via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL289627: [ClangTidy] Add new performance-type-promotion-in-math-fn check. (authored by jlebar). Changed prior to commit: https://reviews.llvm.org/D27284?vs=80011&id=81339#toc Repository: rL LLVM http

[clang-tools-extra] r289627 - [ClangTidy] Add new performance-type-promotion-in-math-fn check.

2016-12-13 Thread Justin Lebar via cfe-commits
Author: jlebar Date: Tue Dec 13 21:15:01 2016 New Revision: 289627 URL: http://llvm.org/viewvc/llvm-project?rev=289627&view=rev Log: [ClangTidy] Add new performance-type-promotion-in-math-fn check. Summary: This checks for calls to double-precision math.h with single-precision arguments. For exa

[PATCH] D27284: [ClangTidy] Add new performance-type-promotion-in-math-fn check.

2016-12-13 Thread Justin Lebar via Phabricator via cfe-commits
jlebar marked an inline comment as done. jlebar added a comment. In https://reviews.llvm.org/D27284#621052, @malcolm.parsons wrote: > In https://reviews.llvm.org/D27284#609937, @Eugene.Zelenko wrote: > > > Please mention this check in docs/ReleaseNotes.rst (in alphabetical order). > > > This has

r289625 - [PS4] Undo dialect tweak for Objective-C.

2016-12-13 Thread Paul Robinson via cfe-commits
Author: probinson Date: Tue Dec 13 20:06:11 2016 New Revision: 289625 URL: http://llvm.org/viewvc/llvm-project?rev=289625&view=rev Log: [PS4] Undo dialect tweak for Objective-C. In r267772, we had set the PS4's default dialect for both C and Objective-C to gnu99. Make that change only for C; we

[PATCH] D27744: Create SampleProfileLoader pass in llvm instead of clang

2016-12-13 Thread Dehao Chen via Phabricator via cfe-commits
danielcdh created this revision. danielcdh added reviewers: dnovillo, tejohnson, davidxl. danielcdh added a subscriber: cfe-commits. Herald added a subscriber: mehdi_amini. We used to create SampleProfileLoader pass in clang. This makes LTO/ThinLTO unable to add this pass in the linker plugin. Th

r289623 - When emitting a multidimensional array copy, only emit a single flattened

2016-12-13 Thread Richard Smith via cfe-commits
Author: rsmith Date: Tue Dec 13 19:32:13 2016 New Revision: 289623 URL: http://llvm.org/viewvc/llvm-project?rev=289623&view=rev Log: When emitting a multidimensional array copy, only emit a single flattened cleanup loop for exception handling. Modified: cfe/trunk/lib/CodeGen/CGExprAgg.cpp

r289621 - LTO: Add support for multi-module bitcode files.

2016-12-13 Thread Peter Collingbourne via cfe-commits
Author: pcc Date: Tue Dec 13 19:17:59 2016 New Revision: 289621 URL: http://llvm.org/viewvc/llvm-project?rev=289621&view=rev Log: LTO: Add support for multi-module bitcode files. Differential Revision: https://reviews.llvm.org/D27313 Modified: cfe/trunk/lib/CodeGen/BackendUtil.cpp cfe/tr

[PATCH] D27597: [DebugInfo] Restore test case for long double constants.

2016-12-13 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. In https://reviews.llvm.org/D27597#621618, @dgross wrote: > So would a Python equivalent of the Perl be acceptable? I think this is an > academic question -- better to explicitly test m

[PATCH] D27740: [analyzer] Include type name in Retain Count Checker diagnostics

2016-12-13 Thread Anna Zaks via Phabricator via cfe-commits
zaks.anna created this revision. zaks.anna added a reviewer: dcoughlin. zaks.anna added subscribers: cfe-commits, dcoughlin. The more detailed diagnostic will make identifying which object the diagnostics refer to easier. https://reviews.llvm.org/D27740 Files: lib/StaticAnalyzer/Checkers/Ret

r289618 - Remove custom handling of array copies in lambda by-value array capture and

2016-12-13 Thread Richard Smith via cfe-commits
Author: rsmith Date: Tue Dec 13 18:03:17 2016 New Revision: 289618 URL: http://llvm.org/viewvc/llvm-project?rev=289618&view=rev Log: Remove custom handling of array copies in lambda by-value array capture and copy constructors of classes with array members, instead using ArrayInitLoopExpr to repre

[PATCH] D27597: [DebugInfo] Restore test case for long double constants.

2016-12-13 Thread David Gross via Phabricator via cfe-commits
dgross updated this revision to Diff 81321. dgross added a comment. Incorporate code review comments. - Use %clang_cc1 not %clang - Rather than trying to determine long double size for target, compile and check multiple times, and only check behavior of long double for known targets https://re

r289615 - [CodeGen][ObjC] Emit objc_unsafeClaimAutoreleasedReturnValue for

2016-12-13 Thread Akira Hatanaka via cfe-commits
Author: ahatanak Date: Tue Dec 13 17:32:22 2016 New Revision: 289615 URL: http://llvm.org/viewvc/llvm-project?rev=289615&view=rev Log: [CodeGen][ObjC] Emit objc_unsafeClaimAutoreleasedReturnValue for fragile runtime too. Follow-up to r258962. rdar://problem/29269006 Modified: cfe/trunk/incl

r289614 - Add support for Samsung Exynos M3 (NFC)

2016-12-13 Thread Evandro Menezes via cfe-commits
Author: evandro Date: Tue Dec 13 17:31:57 2016 New Revision: 289614 URL: http://llvm.org/viewvc/llvm-project?rev=289614&view=rev Log: Add support for Samsung Exynos M3 (NFC) Modified: cfe/trunk/test/CodeGen/arm-target-features.c cfe/trunk/test/Driver/aarch64-cpus.c cfe/trunk/test/Driv

[PATCH] D27597: [DebugInfo] Restore test case for long double constants.

2016-12-13 Thread David Gross via Phabricator via cfe-commits
dgross added a comment. In https://reviews.llvm.org/D27597#621596, @probinson wrote: > As dblaikie said in email, probably better to make this X86-specific; if > long-double varies by OS you can put in a specific triple. I think with this approach I'd want two test cases that are identical exc

[PATCH] D27641: DebugInfo: Added support for Checksum debug info feature (Clang part)

2016-12-13 Thread Paul Robinson via Phabricator via cfe-commits
probinson added inline comments. Comment at: lib/CodeGen/CGDebugInfo.cpp:350 + std::string Checksum; + SM.getChecksumMD5(SM.getFileID(Loc), Checksum); + rnk wrote: > We should only do this if `CGM.getCodeGenOpts().EmitCodeView`, or we will > regress compile ti

[PATCH] D27597: [DebugInfo] Restore test case for long double constants.

2016-12-13 Thread Paul Robinson via Phabricator via cfe-commits
probinson added a comment. As dblaikie said in email, probably better to make this X86-specific; if long-double varies by OS you can put in a specific triple. FTR we don't rely on Perl being available everywhere, anything that does this kind of scripty stuff uses Python. Com

[PATCH] D27627: Allow target to specify default address space for codegen

2016-12-13 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl updated this revision to Diff 81309. yaxunl added a comment. Cast alloca to default address space. https://reviews.llvm.org/D27627 Files: include/clang/AST/ASTContext.h include/clang/Basic/TargetInfo.h lib/AST/ASTContext.cpp lib/Basic/Targets.cpp lib/CodeGen/CGCall.cpp lib/Co

[PATCH] D26750: [clang-tidy] Add modernize-use-default-member-init check

2016-12-13 Thread Malcolm Parsons via Phabricator via cfe-commits
malcolm.parsons added inline comments. Comment at: docs/clang-tidy/checks/modernize-use-default-member-init.rst:29 + +.. note:: + Only converts member initializers for built-in types, enums and pointers. alexfh wrote: > Is an empty line needed after this? modern

[PATCH] D26750: [clang-tidy] Add modernize-use-default-member-init check

2016-12-13 Thread Malcolm Parsons via Phabricator via cfe-commits
malcolm.parsons updated this revision to Diff 81310. malcolm.parsons added a comment. Rename function. Use isInstantiated(). Reduce variable scope. https://reviews.llvm.org/D26750 Files: clang-tidy/modernize/CMakeLists.txt clang-tidy/modernize/ModernizeTidyModule.cpp clang-tidy/modernize/

[PATCH] D27683: Prepare PrettyStackTrace for LLDB adoption

2016-12-13 Thread Sean Callanan via Phabricator via cfe-commits
spyffe added a comment. The LLDB side of this is https://reviews.llvm.org/D27735 Repository: rL LLVM https://reviews.llvm.org/D27683 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commit

[PATCH] D27683: Prepare PrettyStackTrace for LLDB adoption

2016-12-13 Thread Sean Callanan via Phabricator via cfe-commits
spyffe retitled this revision from "Fix the linkage for __crashtracer_info__" to "Prepare PrettyStackTrace for LLDB adoption". spyffe updated the summary for this revision. spyffe updated this revision to Diff 81304. Repository: rL LLVM https://reviews.llvm.org/D27683 Files: include/llvm/Su

[libunwind] r289601 - Creating release candidate final from release_391 branch

2016-12-13 Thread Tom Stellard via cfe-commits
Author: tstellar Date: Tue Dec 13 16:00:29 2016 New Revision: 289601 URL: http://llvm.org/viewvc/llvm-project?rev=289601&view=rev Log: Creating release candidate final from release_391 branch Added: libunwind/tags/RELEASE_391/final/ (props changed) - copied from r289600, libunwind/bra

[libcxxabi] r289595 - Creating release candidate final from release_391 branch

2016-12-13 Thread Tom Stellard via cfe-commits
Author: tstellar Date: Tue Dec 13 16:00:03 2016 New Revision: 289595 URL: http://llvm.org/viewvc/llvm-project?rev=289595&view=rev Log: Creating release candidate final from release_391 branch Added: libcxxabi/tags/RELEASE_391/final/ (props changed) - copied from r289594, libcxxabi/bra

[libcxx] r289594 - Creating release candidate final from release_391 branch

2016-12-13 Thread Tom Stellard via cfe-commits
Author: tstellar Date: Tue Dec 13 16:00:00 2016 New Revision: 289594 URL: http://llvm.org/viewvc/llvm-project?rev=289594&view=rev Log: Creating release candidate final from release_391 branch Added: libcxx/tags/RELEASE_391/final/ (props changed) - copied from r289593, libcxx/branches/

[PATCH] D27627: Allow target to specify default address space for codegen

2016-12-13 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added a comment. In https://reviews.llvm.org/D27627#621473, @rjmccall wrote: > In https://reviews.llvm.org/D27627#619928, @yaxunl wrote: > > > > Because, notably, if you do that, then an attempt to pass &x as an int* > > > will fail, which means this isn't really C++ anymore... and yet th

[PATCH] D27726: [analyzer] Refer to macro names in diagnostics for macros representing a literal

2016-12-13 Thread Devin Coughlin via Phabricator via cfe-commits
dcoughlin accepted this revision. dcoughlin added a comment. This revision is now accepted and ready to land. The diagnostics look great to me and the macro logic seems reasonable. Comment at: test/Analysis/diagnostics/macros.cpp:49 +} \ No newline at end of file -

[PATCH] D27166: [clang-tidy] Enhance modernize-use-auto to templated function casts

2016-12-13 Thread Malcolm Parsons via Phabricator via cfe-commits
malcolm.parsons updated this revision to Diff 81300. malcolm.parsons added a comment. Split up matcher. Add tests. Improve doc. https://reviews.llvm.org/D27166 Files: clang-tidy/modernize/UseAutoCheck.cpp docs/ReleaseNotes.rst docs/clang-tidy/checks/modernize-use-auto.rst test/clang-tid

[PATCH] D27166: [clang-tidy] Enhance modernize-use-auto to templated function casts

2016-12-13 Thread Malcolm Parsons via Phabricator via cfe-commits
malcolm.parsons added inline comments. Comment at: clang-tidy/modernize/UseAutoCheck.cpp:173-177 +/// Matches the type that was substituted for the template parameter. +AST_MATCHER_P(SubstTemplateTypeParmType, hasReplacementType, + ast_matchers::internal::Matcher, In

[PATCH] D26082: Support for Python 3 in libclang python bindings

2016-12-13 Thread Jonathan B Coe via Phabricator via cfe-commits
jbcoe added a comment. Hi Mathieu, What platform did you run the tests on? How did you run them? I don't get any failures when running tests on macOS 10.12.1. command: `env PYTHONPATH=`pwd` LD_LIBRARY_PATH=/Users/jon/DEV/LLVM/build-ninja/lib nosetests-3.4 .` python: Python 3.5.2 (default, Oct

RE: r289225 - Store decls in prototypes on the declarator instead of in the AST

2016-12-13 Thread Yung, Douglas via cfe-commits
Hi Reid, Following this change, we started seeing an assertion failure in one of our C tests. I have filed bug 31366 for the issue. Can you take a look? Douglas Yung > -Original Message- > From: cfe-commits [mailto:cfe-commits-boun...@lists.llvm.org] On Behalf > Of Reid Kleckner via cfe

[PATCH] D27627: Allow target to specify default address space for codegen

2016-12-13 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. In https://reviews.llvm.org/D27627#619928, @yaxunl wrote: > > Because, notably, if you do that, then an attempt to pass &x as an int* > > will fail, which means this isn't really C++ anymore... and yet that > > appears to be exactly what you want. > > How about when ge

[PATCH] D27606: [libcxx] Fix tuple construction/assignment from types derived from tuple/pair/array.

2016-12-13 Thread Michael Park via Phabricator via cfe-commits
mpark added inline comments. Comment at: include/tuple:568 +using _QualType = typename _Deduced::_QualType; + static_assert(__tuple_like::value, ""); +return __tuple_constructible<_QualType, tuple>::value indentation? =

[PATCH] D24431: CodeGen: Start using inrange annotations on vtable getelementptr.

2016-12-13 Thread Peter Collingbourne via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL289585: CodeGen: Start using inrange annotations on vtable getelementptr. (authored by pcc). Changed prior to commit: https://reviews.llvm.org/D24431?vs=75494&id=81289#toc Repository: rL LLVM https:

r289585 - CodeGen: Start using inrange annotations on vtable getelementptr.

2016-12-13 Thread Peter Collingbourne via cfe-commits
Author: pcc Date: Tue Dec 13 14:50:44 2016 New Revision: 289585 URL: http://llvm.org/viewvc/llvm-project?rev=289585&view=rev Log: CodeGen: Start using inrange annotations on vtable getelementptr. This annotation allows the optimizer to split vtable groups, as permitted by a change to the Itanium

[PATCH] D22296: CodeGen: New vtable group representation: struct of vtable arrays.

2016-12-13 Thread Peter Collingbourne via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. pcc marked an inline comment as done. Closed by commit rL289584: CodeGen: New vtable group representation: struct of vtable arrays. (authored by pcc). Changed prior to commit: https://reviews.llvm.org/D22296?vs=81264&id=8

[PATCH] D27726: [analyzer] Refer to macro names in diagnostics for macros representing a literal

2016-12-13 Thread Anna Zaks via Phabricator via cfe-commits
zaks.anna created this revision. zaks.anna added reviewers: dergachev.a, dcoughlin. zaks.anna added a subscriber: cfe-commits. When a macro expending to a literal is used in a comparison, use the macro name in the diagnostic rather than the literal. This improves readability of path notes. Adde

[PATCH] D27680: [CodeGen] Move lifetime.start of a variable when goto jumps back past its declaration

2016-12-13 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak updated this revision to Diff 81284. ahatanak added a comment. Address review comment. Use llvm::is_contained instead of std::find. https://reviews.llvm.org/D27680 Files: lib/CodeGen/CGDecl.cpp lib/CodeGen/CGExpr.cpp lib/CodeGen/CGStmt.cpp lib/CodeGen/CodeGenFunction.h test/C

[clang-tools-extra] r289581 - [powerpc] deactivate readability-identifier-naming.cpp test on powerpc64le

2016-12-13 Thread Bill Seurer via cfe-commits
Author: seurer Date: Tue Dec 13 14:26:35 2016 New Revision: 289581 URL: http://llvm.org/viewvc/llvm-project?rev=289581&view=rev Log: [powerpc] deactivate readability-identifier-naming.cpp test on powerpc64le The test case clang-tidy/readability-identifier-naming.cpp segfaults on powerpc64 little

[clang-tools-extra] r289580 - Fix size_t typdef in new cppcoreguidelines-no-malloc.cpp test

2016-12-13 Thread Reid Kleckner via cfe-commits
Author: rnk Date: Tue Dec 13 14:25:47 2016 New Revision: 289580 URL: http://llvm.org/viewvc/llvm-project?rev=289580&view=rev Log: Fix size_t typdef in new cppcoreguidelines-no-malloc.cpp test Modified: clang-tools-extra/trunk/test/clang-tidy/cppcoreguidelines-no-malloc.cpp Modified: clang-t

[PATCH] D26167: [Clang-tidy] check for malloc, realloc and free calls

2016-12-13 Thread Reid Kleckner via Phabricator via cfe-commits
rnk added a comment. nit: All of the new files had UTF-8 BOMs, which I don't think we usually add. Comment at: test/clang-tidy/cppcoreguidelines-no-malloc.cpp:3 + +using size_t = unsigned long; + This test did not pass on 32-bit Windows. I will change it to:

[PATCH] D27210: [clang-tidy] misc-string-compare. Adding a new check to clang-tidy

2016-12-13 Thread Malcolm Parsons via Phabricator via cfe-commits
malcolm.parsons added a comment. Do the fixits work when the object is a pointer to a string? `pstr1->compare(str2) == 0` Does the warning work when the argument is a pointer to a string? `str1.compare(*pstr2) == 0` Does the warning work when the argument is the result of a function call? Does the

[PATCH] D27377: clang-format: Support the Java 8 'default' method modifier

2016-12-13 Thread Luis Héctor Chávez via Phabricator via cfe-commits
lhchavez marked 3 inline comments as done. lhchavez added inline comments. Comment at: lib/Format/UnwrappedLineParser.cpp:870 +} +// 'default' can appear in a Java 8 declaration. Parse it as such. +break; djasper wrote: > Is there a test case that hit

[PATCH] D27377: clang-format: Support the Java 8 'default' method modifier

2016-12-13 Thread Luis Héctor Chávez via Phabricator via cfe-commits
lhchavez updated this revision to Diff 81280. lhchavez added a comment. Addressed feedback https://reviews.llvm.org/D27377 Files: lib/Format/UnwrappedLineParser.cpp unittests/Format/FormatTestJava.cpp Index: unittests/Format/FormatTestJava.cpp =

Re: r289544 - Improve handling of floating point literals in OpenCL to only use double precision if the target supports fp64.

2016-12-13 Thread Tom Stellard via cfe-commits
On Tue, Dec 13, 2016 at 04:22:50PM -, Neil Hickey via cfe-commits wrote: > Author: neil.hickey > Date: Tue Dec 13 10:22:50 2016 > New Revision: 289544 > > URL: http://llvm.org/viewvc/llvm-project?rev=289544&view=rev > Log: > Improve handling of floating point literals in OpenCL to only use dou

r289575 - Align EvalInfo in ExprConstant to avoid PointerUnion assertions

2016-12-13 Thread Reid Kleckner via cfe-commits
Author: rnk Date: Tue Dec 13 13:48:32 2016 New Revision: 289575 URL: http://llvm.org/viewvc/llvm-project?rev=289575&view=rev Log: Align EvalInfo in ExprConstant to avoid PointerUnion assertions 32-bit MSVC doesn't provide more than 4 byte stack alignment by default. This conflicts with PointerUni

[PATCH] D25263: [Driver] Allow setting the default linker during build

2016-12-13 Thread Petr Hosek via Phabricator via cfe-commits
phosek updated this revision to Diff 81276. phosek marked 3 inline comments as done. Repository: rL LLVM https://reviews.llvm.org/D25263 Files: CMakeLists.txt include/clang/Config/config.h.cmake include/clang/Driver/ToolChain.h lib/Driver/ToolChain.cpp lib/Driver/ToolChains.cpp lib

Re: r289413 - Add two new AST nodes to represent initialization of an array in terms of

2016-12-13 Thread Reid Kleckner via cfe-commits
Aha, you have activated the win32 stack alignment trap card. By adding a uint64_t to EvalInfo, you have increased its alignment to 8. Unfortunately, MSVC doesn't actually align stack objects to more than 4 unless you really ask it to with __declspec(align). Normally this stuff flies under the radar

[PATCH] D22296: CodeGen: New vtable group representation: struct of vtable arrays.

2016-12-13 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, thanks! https://reviews.llvm.org/D22296 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/l

r289571 - [Sema] Prefer SmallVector over `new`ed memory blocks. NFC.

2016-12-13 Thread George Burgess IV via cfe-commits
Author: gbiv Date: Tue Dec 13 13:22:56 2016 New Revision: 289571 URL: http://llvm.org/viewvc/llvm-project?rev=289571&view=rev Log: [Sema] Prefer SmallVector over `new`ed memory blocks. NFC. Modified: cfe/trunk/lib/Sema/SemaOverload.cpp Modified: cfe/trunk/lib/Sema/SemaOverload.cpp URL: http

[PATCH] D27377: clang-format: Support the Java 8 'default' method modifier

2016-12-13 Thread Daniel Jasper via Phabricator via cfe-commits
djasper added inline comments. Comment at: lib/Format/UnwrappedLineParser.cpp:297 case tok::kw_default: + if (Style.Language != FormatStyle::LK_Java || !Line->MustBeDeclaration) { +if (!SwitchLabelEncountered && Same as below.

[PATCH] D22296: CodeGen: New vtable group representation: struct of vtable arrays.

2016-12-13 Thread Peter Collingbourne via Phabricator via cfe-commits
pcc marked 3 inline comments as done. pcc added inline comments. Comment at: clang/include/clang/AST/VTableBuilder.h:255 +operator ArrayRef() const { return {data(), size()}; }; + }; + rjmccall wrote: > Maybe this ought to be in LLVM as OwnedArrayRef? And t

[PATCH] D22296: CodeGen: New vtable group representation: struct of vtable arrays.

2016-12-13 Thread Peter Collingbourne via Phabricator via cfe-commits
pcc updated this revision to Diff 81264. pcc added a comment. - Address review comments https://reviews.llvm.org/D22296 Files: clang/include/clang/AST/VTableBuilder.h clang/include/clang/Basic/LLVM.h clang/lib/AST/VTableBuilder.cpp clang/lib/CodeGen/CGCXX.cpp clang/lib/CodeGen/CGVTT.c

[PATCH] D27377: clang-format: Support the Java 8 'default' method modifier

2016-12-13 Thread Mark Lodato via Phabricator via cfe-commits
lodato resigned from this revision. lodato removed a reviewer: lodato. lodato added a comment. I know nothing about the C++ code. I only know the git-clang-format script. https://reviews.llvm.org/D27377 ___ cfe-commits mailing list cfe-commits@lists

[PATCH] D27210: [clang-tidy] misc-string-compare. Adding a new check to clang-tidy

2016-12-13 Thread Mads Ravn via Phabricator via cfe-commits
madsravn updated this revision to Diff 81260. madsravn added a comment. Updated matcher. Made fixits for some cases Updated the documentation. https://reviews.llvm.org/D27210 Files: clang-tidy/misc/CMakeLists.txt clang-tidy/misc/MiscTidyModule.cpp clang-tidy/misc/StringCompareCheck.cpp

[PATCH] D27424: Add the diagnose_if attribute to clang.

2016-12-13 Thread George Burgess IV via Phabricator via cfe-commits
george.burgess.iv updated this revision to Diff 81259. george.burgess.iv marked an inline comment as done. george.burgess.iv added a comment. Addressed alignment comment. Thanks! (Late parsing is still to-be-done) https://reviews.llvm.org/D27424 Files: include/clang/Basic/Attr.td include/cl

[PATCH] D26846: __uuidof() and declspec(uuid("...")) should be allowed on enumeration types

2016-12-13 Thread Reid Kleckner via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL289567: __uuidof() and declspec(uuid("...")) should be allowed on enumeration types (authored by rnk). Changed prior to commit: https://reviews.llvm.org/D26846?vs=78569&id=81258#toc Repository: rL LL

[PATCH] D26846: __uuidof() and declspec(uuid("...")) should be allowed on enumeration types

2016-12-13 Thread Reid Kleckner via Phabricator via cfe-commits
rnk added a comment. FYI I had to make a few changes so that we still error out on __uuid in C mode. Repository: rL LLVM https://reviews.llvm.org/D26846 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman

r289567 - __uuidof() and declspec(uuid("...")) should be allowed on enumeration types

2016-12-13 Thread Reid Kleckner via cfe-commits
Author: rnk Date: Tue Dec 13 12:58:09 2016 New Revision: 289567 URL: http://llvm.org/viewvc/llvm-project?rev=289567&view=rev Log: __uuidof() and declspec(uuid("...")) should be allowed on enumeration types Although not specifically mentioned in the documentation, MSVC accepts __uuidof(…) and decl

[PATCH] D27210: [clang-tidy] misc-string-compare. Adding a new check to clang-tidy

2016-12-13 Thread Malcolm Parsons via Phabricator via cfe-commits
malcolm.parsons added inline comments. Comment at: docs/clang-tidy/checks/misc-string-compare.rst:12 +zero depending on the lexicographical relationship between the strings compared. +If an equality or inequality check can suffice, that is recommended. + alexfh

[PATCH] D27655: Fix modernize-deprecated-headers clang-tidy warnings

2016-12-13 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added a comment. Yes, IWYU is useful tool, but please note that it's not ideal, so will be good idea to check proposed changes manually. You could build IWYU in-tree with Clang or Clang extra tools. https://reviews.llvm.org/D27655 _

[PATCH] D27717: [analyzer] Suppress a leak false positive in Qt's QObject::connectImpl()

2016-12-13 Thread Aleksei Sidorin via Phabricator via cfe-commits
a.sidorin accepted this revision. a.sidorin added a comment. This revision is now accepted and ready to land. LGTM, thanks! Comment at: lib/StaticAnalyzer/Checkers/MallocChecker.cpp:2577 if (FName == "postEvent" && FD->getQualifiedNameAsString() == "QCoreApplication

[PATCH] D27535: [analyzer] Add ObjCPropertyChecker - check for autosynthesized copy-properties of mutable types.

2016-12-13 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL289554: [analyzer] Detect ObjC properties that are both (copy) and Mutable. (authored by dergachev). Changed prior to commit: https://reviews.llvm.org/D27535?vs=81083&id=81240#toc Repository: rL LLVM

r289554 - [analyzer] Detect ObjC properties that are both (copy) and Mutable.

2016-12-13 Thread Artem Dergachev via cfe-commits
Author: dergachev Date: Tue Dec 13 11:19:18 2016 New Revision: 289554 URL: http://llvm.org/viewvc/llvm-project?rev=289554&view=rev Log: [analyzer] Detect ObjC properties that are both (copy) and Mutable. When an Objective-C property has a (copy) attribute, the default setter for this property per

[PATCH] D27717: [analyzer] Suppress a leak false positive in Qt's QObject::connectImpl()

2016-12-13 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ created this revision. NoQ added reviewers: zaks.anna, dcoughlin, xazax.hun, a.sidorin. NoQ added a subscriber: cfe-commits. A quick fix to address the false positive posted by Tiago Macarios in the mailing lists: http://lists.llvm.org/pipermail/cfe-dev/2016-December/051738.html MallocChecke

r289553 - Update for clang after llvm::StringLiteral.

2016-12-13 Thread Zachary Turner via cfe-commits
Author: zturner Date: Tue Dec 13 11:10:16 2016 New Revision: 289553 URL: http://llvm.org/viewvc/llvm-project?rev=289553&view=rev Log: Update for clang after llvm::StringLiteral. Modified: cfe/trunk/lib/CodeGen/CGBuiltin.cpp Modified: cfe/trunk/lib/CodeGen/CGBuiltin.cpp URL: http://llvm.org/

r289552 - Fixing build failure by adding triple option to new test condition.

2016-12-13 Thread Neil Hickey via cfe-commits
Author: neil.hickey Date: Tue Dec 13 11:04:33 2016 New Revision: 289552 URL: http://llvm.org/viewvc/llvm-project?rev=289552&view=rev Log: Fixing build failure by adding triple option to new test condition. Adding -triple option to ensure target supports double for fpmath test. Modified: cfe

[PATCH] D26167: [Clang-tidy] check for malloc, realloc and free calls

2016-12-13 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh added a comment. Committed in r289546. Repository: rL LLVM https://reviews.llvm.org/D26167 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] r289549 - Fix sphinx build.

2016-12-13 Thread Alexander Kornienko via cfe-commits
Author: alexfh Date: Tue Dec 13 10:49:10 2016 New Revision: 289549 URL: http://llvm.org/viewvc/llvm-project?rev=289549&view=rev Log: Fix sphinx build. Modified: clang-tools-extra/trunk/docs/clang-tidy/checks/cppcoreguidelines-no-malloc.rst Modified: clang-tools-extra/trunk/docs/clang-tidy/

[PATCH] D21698: [OpenCL] Allow disabling types and declarations associated with extensions

2016-12-13 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added inline comments. Comment at: include/clang/Sema/Sema.h:8081 + /// \brief Set current OpenCL extensions for a type which can only be used + /// when these OpenCL extensions are enabled. If current OpenCL Extsion is + /// empty, do nothing. Extsi

[PATCH] D26750: [clang-tidy] Add modernize-use-default-member-init check

2016-12-13 Thread Malcolm Parsons via Phabricator via cfe-commits
malcolm.parsons planned changes to this revision. malcolm.parsons added inline comments. Comment at: clang-tidy/modernize/UseDefaultMemberInitCheck.cpp:21 + +static StringRef getValueInit(const CXXCtorInitializer *Init) { + switch (Init->getInit()->getType()->getScalarTypeKind()

[clang-tools-extra] r289547 - Remove trailing whitespace in docs and clang-tidy sources.

2016-12-13 Thread Alexander Kornienko via cfe-commits
Author: alexfh Date: Tue Dec 13 10:38:45 2016 New Revision: 289547 URL: http://llvm.org/viewvc/llvm-project?rev=289547&view=rev Log: Remove trailing whitespace in docs and clang-tidy sources. Modified: clang-tools-extra/trunk/clang-tidy/modernize/LoopConvertCheck.cpp clang-tools-extra/tru

[clang-tools-extra] r289546 - [Clang-tidy] check for malloc, realloc and free calls

2016-12-13 Thread Alexander Kornienko via cfe-commits
Author: alexfh Date: Tue Dec 13 10:38:18 2016 New Revision: 289546 URL: http://llvm.org/viewvc/llvm-project?rev=289546&view=rev Log: [Clang-tidy] check for malloc, realloc and free calls Summary: This checker flags the use of C-style memory management functionality and notes about modern alterna

[PATCH] D27187: [clang-tidy] Do not move parameter if only DeclRefExpr occurs inside of a loop

2016-12-13 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. LG modulo comment. Comment at: clang-tidy/utils/DeclRefExprUtils.cpp:127 + match(findAll(declRefExpr(equalsNode(&DeclRef), +unless(hasAnc

RE: r286815 - Improve handling of floating point literals in OpenCL to only use double precision if the target supports fp64.

2016-12-13 Thread Neil Hickey via cfe-commits
I looked into this, and for C, clang converts the literal to inf in the first case. OpenCL spec doesn't mention anything different so I presume the behaviour should match Cs behaviour, which is does with this change. More exhaustive tests could be implemented to ensure this though. Neil >

[PATCH] D27424: Add the diagnose_if attribute to clang.

2016-12-13 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak added inline comments. Comment at: include/clang/Sema/Overload.h:754 +unsigned NumInlineBytesUsed; +llvm::AlignedCharArray InlineSpace; I guess you could use "void *" instead of ImplicitConversionSequence for the alignment to make it cl

[PATCH] D26167: [Clang-tidy] check for malloc, realloc and free calls

2016-12-13 Thread Jonas Toth via Phabricator via cfe-commits
JonasToth added a comment. In https://reviews.llvm.org/D26167#621106, @alexfh wrote: > Jonas, do you need someone to commit the patch for you? i think so, yes. can i trigger somehow automatically, that this will go into the code base somehow? Repository: rL LLVM https://reviews.llvm.org/D

[PATCH] D24235: [OpenCL] Improve floating point literal handling

2016-12-13 Thread Neil Hickey via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL289544: Improve handling of floating point literals in OpenCL to only use double… (authored by neil.hickey). Changed prior to commit: https://reviews.llvm.org/D24235?vs=77975&id=81235#toc Repository:

[PATCH] D26167: [Clang-tidy] check for malloc, realloc and free calls

2016-12-13 Thread Jonas Toth via Phabricator via cfe-commits
JonasToth added a comment. tbh. i dont know anything how the clang workflow works :) do i need to ask someone to commit, or what be my next step? Repository: rL LLVM https://reviews.llvm.org/D26167 ___ cfe-commits mailing list cfe-commits@lists.

r289544 - Improve handling of floating point literals in OpenCL to only use double precision if the target supports fp64.

2016-12-13 Thread Neil Hickey via cfe-commits
Author: neil.hickey Date: Tue Dec 13 10:22:50 2016 New Revision: 289544 URL: http://llvm.org/viewvc/llvm-project?rev=289544&view=rev Log: Improve handling of floating point literals in OpenCL to only use double precision if the target supports fp64. This change makes sure single-precision floati

[PATCH] D26167: [Clang-tidy] check for malloc, realloc and free calls

2016-12-13 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh added a comment. Jonas, do you need someone to commit the patch for you? Repository: rL LLVM https://reviews.llvm.org/D26167 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

r289543 - Remove deprecated methods ast_matchers::BoundNodes::{getStmtAs, getDeclAs}

2016-12-13 Thread Alexander Kornienko via cfe-commits
Author: alexfh Date: Tue Dec 13 10:19:34 2016 New Revision: 289543 URL: http://llvm.org/viewvc/llvm-project?rev=289543&view=rev Log: Remove deprecated methods ast_matchers::BoundNodes::{getStmtAs,getDeclAs} Modified: cfe/trunk/include/clang/ASTMatchers/ASTMatchers.h cfe/trunk/lib/Tooling/

[clang-tools-extra] r289542 - Remove deprecated methods ast_matchers::BoundNodes::{getStmtAs, getDeclAs}

2016-12-13 Thread Alexander Kornienko via cfe-commits
Author: alexfh Date: Tue Dec 13 10:19:19 2016 New Revision: 289542 URL: http://llvm.org/viewvc/llvm-project?rev=289542&view=rev Log: Remove deprecated methods ast_matchers::BoundNodes::{getStmtAs,getDeclAs} Modified: clang-tools-extra/trunk/clang-tidy/misc/BoolPointerImplicitConversionCheck.

[PATCH] D26750: [clang-tidy] Add modernize-use-default-member-init check

2016-12-13 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh added inline comments. Comment at: clang-tidy/modernize/UseDefaultMemberInitCheck.cpp:21 + +static StringRef getValueInit(const CXXCtorInitializer *Init) { + switch (Init->getInit()->getType()->getScalarTypeKind()) { The function name doesn't make it clea

[PATCH] D27166: [clang-tidy] Enhance modernize-use-auto to templated function casts

2016-12-13 Thread Piotr Padlewski via Phabricator via cfe-commits
Prazek added a comment. In https://reviews.llvm.org/D27166#617696, @malcolm.parsons wrote: > In https://reviews.llvm.org/D27166#617621, @Prazek wrote:. > > > Does it work for cases like? > > > Yes; `replaceExpr()` checks that the variable has the same unqualified type > as the initializer and th

  1   2   >