[PATCH] D18263: [clang-tools-extra] Add release notes documentation

2016-03-19 Thread Richard via cfe-commits
LegalizeAdulthood created this revision. LegalizeAdulthood added a reviewer: alexfh. LegalizeAdulthood added a subscriber: cfe-commits. Add a file for Extra Clang Tools release notes, based on 3.9 release notes file for Clang. http://reviews.llvm.org/D18263 Files: docs/ReleaseNotes.rst docs

Re: [PATCH] D18203: [OPENMP] Implementation of codegen for firstprivate clause of target directive

2016-03-19 Thread Carlo Bertolli via cfe-commits
carlo.bertolli closed this revision. carlo.bertolli added a comment. Committed revision 263837. Repository: rL LLVM http://reviews.llvm.org/D18203 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listi

[PATCH] D18276: [OpenMP] Allow reduction on pointer dereference

2016-03-19 Thread Jonas Hahnfeld via cfe-commits
Hahnfeld created this revision. Hahnfeld added reviewers: ABataev, hfinkel, carlo.bertolli, sfantao. Hahnfeld added a subscriber: cfe-commits. Pointer dereference is equal to access of first array element which is already allowed for the `reduction` clause. While at it also add test for CodeGen

Re: [PATCH] D17893: Sema: Add semantic analysis for the C++ ABI stability attributes and whitelist.

2016-03-19 Thread Peter Collingbourne via cfe-commits
pcc added inline comments. Comment at: include/clang/Basic/DiagnosticSemaKinds.td:8380 @@ +8379,3 @@ +def warn_unused_abi_stability_attr : Warning< + "unused C++ ABI stability attribute on non-dynamic class">, + InGroup>; rsmith wrote: > How valuable is it to wa

Re: [PATCH] D15332: new clang-tidy checker readability-non-const-parameter

2016-03-19 Thread Richard Smith via cfe-commits
rsmith added inline comments. Comment at: test/clang-tidy/readability-non-const-parameter.cpp:116-134 @@ +115,21 @@ + +// CHECK-MESSAGES: :[[@LINE+1]]:18: warning: parameter 'p' can be const +int return1(int *p) { + // CHECK-FIXES: {{^}}int return1(const int *p) {{{$}} + return

Re: [PATCH] D16749: [OpenMP] Map clause codegeneration.

2016-03-19 Thread Alexey Bataev via cfe-commits
ABataev added a comment. Samuel, I have a patch that improves handling of map clauses with data members. Unfortunately, I cannot commit it because I can't create tests for it. Please, apply this patch to your map clause codegen changes. It uses common technique for handling non-static data memb

Re: [PATCH] D13643: [Sema] Warn on ternary comparison

2016-03-19 Thread Richard Smith via cfe-commits
rsmith added a comment. Once this lands, we should also consider the corresponding case from a //fold-expression//: template bool f(T ...t) { return (t < ...); } // warn if sizeof...(T) != 2 and we use built-in operator <. bool k = f(1.0, 2.0, 3.0); http://reviews.llvm.org/D13643 _

Re: [PATCH] D18262: [clang-tidy] Skip reporting of not applicable fixes.

2016-03-19 Thread Etienne Bergeron via cfe-commits
etienneb added inline comments. Comment at: ClangTidy.cpp:144 @@ -138,1 +143,3 @@ + +Diag << FixItHint::CreateReplacement(Range, Fix.getReplacementText()); ++TotalFixes; alexfh wrote: > aaron.ballman wrote: > > Is there a purpose to emittin

[PATCH] D18264: [clang-tidy] misc-assign-operator-signature checker checks return value of all assign operators

2016-03-19 Thread Balogh , Ádám via cfe-commits
baloghadamsoftware created this revision. baloghadamsoftware added reviewers: alexfh, hokein. baloghadamsoftware added subscribers: cfe-commits, xazax.hun. The return value of every assign operator should be Type&, not only for copy and move assign operators. This check and its test was implement

r263890 - Visual Studio Visualizer for clang::FunctionProtoType

2016-03-19 Thread Mike Spertus via cfe-commits
Author: mps Date: Sat Mar 19 19:20:43 2016 New Revision: 263890 URL: http://llvm.org/viewvc/llvm-project?rev=263890&view=rev Log: Visual Studio Visualizer for clang::FunctionProtoType Displays return type and parameters for the Function Protoype object in the Locals window. Modified: cfe/tr

Re: [PATCH] D18297: Visualizer for clang::FunctionProtoType

2016-03-19 Thread Mike Spertus via cfe-commits
mspertus added a comment. Based on Aaron's agreement to conducting post-commit reviews, I've committed this as revision 263890. Please let me know if I should not have done so. (This change is a lot smaller and simpler than I feared when I commented on my roadmap in diff http://reviews.llvm.org

Re: [PATCH] D18263: [clang-tools-extra] Add release notes documentation

2016-03-19 Thread Richard via cfe-commits
LegalizeAdulthood added inline comments. Comment at: docs/clang-tidy/checks/list.rst:91 @@ -90,2 +90,3 @@ performance-implicit-cast-in-loop + performance-unnecessary-copy-initialization.rst readability-braces-around-statements This check was missing from

[PATCH] D18299: Better visualization of clang::BuiltinType in VisualStudio

2016-03-19 Thread Mike Spertus via cfe-commits
mspertus created this revision. mspertus added reviewers: aaron.ballman, zturner, aemerson. mspertus added a subscriber: cfe-commits. Whenever possible, use C++ names for visualizing builtin types. E.g., `long double` instead of `LongDouble` Committed as revision 263891 for post-commit review h

r263891 - Better visualization of clang::BuiltinType in VisualStudio

2016-03-19 Thread Mike Spertus via cfe-commits
Author: mps Date: Sat Mar 19 19:32:30 2016 New Revision: 263891 URL: http://llvm.org/viewvc/llvm-project?rev=263891&view=rev Log: Better visualization of clang::BuiltinType in VisualStudio Whenever possible, use C++ names for visualizing builtin types. E.g., "long double" instead of "LongDouble"

Re: [PATCH] D18191: [clang-tidy] Add check for function parameters that are const& to builtin types

2016-03-19 Thread Etienne Bergeron via cfe-commits
etienneb added a subscriber: etienneb. etienneb added a comment. drive-by, some comments. Comment at: clang-tidy/misc/ConstRefBuiltinCheck.cpp:51 @@ +50,3 @@ + << Parameter->getFunctionScopeIndex() + << Function->getName() + << Fix; Function is de

Re: [PATCH] D18203: [OPENMP] Implementation of codegen for firstprivate clause of target directive

2016-03-19 Thread Carlo Bertolli via cfe-commits
carlo.bertolli updated this revision to Diff 50845. carlo.bertolli added a comment. Update against trunk as dependence was committed to trunk. Repository: rL LLVM http://reviews.llvm.org/D18203 Files: include/clang/Basic/DiagnosticSemaKinds.td lib/CodeGen/CGOpenMPRuntime.cpp lib/Sema/S

Re: [PATCH] D18196: [CodeGen] Emit lifetime.end intrinsic after destructor call in landing pad

2016-03-19 Thread Akira Hatanaka via cfe-commits
ahatanak added a comment. I can add another RUN line to test/CodeGenCXX/microsoft-abi-eh-cleanups.cpp that is identical to the existing RUN line except that it has "-O3 -disable-llvm-optzns". I confirmed that the test still passes without any changes to the test itself. Is that what you are lo

Re: [PATCH] D17893: Sema: Add semantic analysis for the C++ ABI stability attributes and whitelist.

2016-03-19 Thread Peter Collingbourne via cfe-commits
pcc added inline comments. Comment at: lib/Sema/SemaDeclCXX.cpp:4935-4943 @@ +4934,11 @@ + + bool HasStableAttr = Record->hasAttr(); + bool HasUnstableAttr = Record->hasAttr(); + if (HasStableAttr && HasUnstableAttr) { +Diag(Record->getLocation(), diag::err_abi_mismatch) <<

Re: [PATCH] D18011: [modules] Diagnose insufficient privileges when trying to load the modulemap

2016-03-19 Thread Richard Smith via cfe-commits
rsmith added a comment. I would prefer that we solve this problem generically for all files that Clang tries to open, not just for module map files. (Note, for instance, that PR20468 concerns files referenced by module map files, such as their nominated headers, not the module map files themsel

r263893 - Reapply [2] [VFS] Add 'overlay-relative' field to YAML files

2016-03-19 Thread Bruno Cardoso Lopes via cfe-commits
Author: bruno Date: Sat Mar 19 21:08:48 2016 New Revision: 263893 URL: http://llvm.org/viewvc/llvm-project?rev=263893&view=rev Log: Reapply [2] [VFS] Add 'overlay-relative' field to YAML files This reapplies r261552 and r263748. Fixed testcase to reapply. The VFS overlay mapping between virtual

Re: [PATCH] D18199: CodeGen: Implement IR generation for the relative vtable ABI (PR26723).

2016-03-19 Thread Peter Collingbourne via cfe-commits
pcc added inline comments. Comment at: lib/CodeGen/CGDebugInfo.cpp:1153 @@ -1152,3 +1152,3 @@ unsigned Virtuality = 0; - unsigned VIndex = 0; + unsigned VIndex = -1u; rsmith wrote: > Is this what debug info consumers expect for the non-virtual case? The deb

Re: [PATCH] D18191: [clang-tidy] Add check for function parameters that are const& to builtin types

2016-03-19 Thread Richard via cfe-commits
LegalizeAdulthood added a subscriber: LegalizeAdulthood. LegalizeAdulthood added a comment. There is utility in the definition of a function in saying that an argument is `const int i` instead of `int i`. The const-ness declares the intent that this local variable is not going to be modified.

Re: [PATCH] D17893: Sema: Add semantic analysis for the C++ ABI stability attributes and whitelist.

2016-03-19 Thread Peter Collingbourne via cfe-commits
pcc added inline comments. Comment at: lib/Sema/SemaDeclCXX.cpp:4999 @@ +4998,3 @@ +return; + } + joker.eph wrote: > joker.eph wrote: > > Isn't this correct by the loop which starts with `DC = InnermostExternalDC`? > `s/correct/already covered/` That loop che

Re: [PATCH] D17701: [Sema] Teach SemaCast to allow reinterpret_casts of overloaded functions with only one addressable candidate

2016-03-19 Thread Richard Smith via cfe-commits
rsmith accepted this revision. rsmith added a comment. This revision is now accepted and ready to land. OK, though I'm hoping either there aren't many more of these cases or we can treat them more generally somehow. Comment at: lib/Sema/SemaCast.cpp:1771-1782 @@ +1770,14 @@ + +

Re: [PATCH] D17951: Implement is_always_lock_free

2016-03-19 Thread JF Bastien via cfe-commits
jfb updated this revision to Diff 50903. jfb added a comment. - Size is based on __a_ not _Tp - Check value is consistent with C macros http://reviews.llvm.org/D17951 Files: include/atomic test/std/atomics/atomics.lockfree/isalwayslockfree.pass.cpp test/std/atomics/atomics.lockfree/lockfr

[PATCH] D18289: Attach profile summary information to module

2016-03-19 Thread Easwaran Raman via cfe-commits
eraman created this revision. eraman added a reviewer: vsk. eraman added subscribers: cfe-commits, davidxl. This allows optimization passes to make use of detailed profile summary. Once this is in and the optimization passes are made to use this, the "MaxFunctionCount" flag will be removed as th

[PATCH] D18261: Show members of DeclContexts (i.e., class members) in Visual Studio native visualizers

2016-03-19 Thread Mike Spertus via cfe-commits
mspertus created this revision. mspertus added reviewers: aaron.ballman, zturner. mspertus added a subscriber: cfe-commits. This change shows members of `DeclContext` objects in the Visual Studio debugger. It will also cast a `TagType` like a class or a struct to a `DeclContext`, so its methods

[PATCH] D18300: [clang-tidy] ProTypeMemberInitCheck - check that field decls do not have in-class initializer

2016-03-19 Thread Felix Berger via cfe-commits
flx created this revision. flx added reviewers: alexfh, JVApen. flx added a subscriber: cfe-commits. flx set the repository for this revision to rL LLVM. This fixes bug https://llvm.org/bugs/show_bug.cgi?id=26747 Repository: rL LLVM http://reviews.llvm.org/D18300 Files: clang-tidy/cppcoregu

Re: [PATCH] D17951: Implement is_always_lock_free

2016-03-19 Thread Eric Fiselier via cfe-commits
EricWF added inline comments. Comment at: include/atomic:859 @@ +858,3 @@ +template <> _LIBCPP_CONSTEXPR bool __libcpp_always_lock_free = 2 == ATOMIC_CHAR32_T_LOCK_FREE; +template <> _LIBCPP_CONSTEXPR bool __libcpp_always_lock_free = 2 == ATOMIC_WCHAR_T_LOCK_FREE; +template <> _

Re: [PATCH] D18138: Add -fnative-half-arguments-and-returns

2016-03-19 Thread Pirama Arumuga Nainar via cfe-commits
pirama added a comment. Thanks for the review! Repository: rL LLVM http://reviews.llvm.org/D18138 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: [PATCH] D18261: Show members of DeclContexts (i.e., class members) in Visual Studio native visualizers

2016-03-19 Thread Aaron Ballman via cfe-commits
aaron.ballman added a comment. Mostly LGTM with one question about a comment. Comment at: clang.natvis:77 @@ +76,3 @@ + + + The only hard-wiring I see uses 3 bits, so is this comment still accurate? http://reviews.llvm.org/D18261 _

Re: [PATCH] D16360: unordered_map: Avoid unnecessary mallocs when no insert occurs

2016-03-19 Thread Eric Fiselier via cfe-commits
EricWF added a comment. Adding inline comments for the implementation. Comments on the tests to follow shortly. Comment at: include/__hash_table:103 @@ -102,1 +102,3 @@ +template +struct __extract_key; Could you make `__extract_key` behave the same way as `_

r263654 - [OPENMP] Support for codegen of private clause of target, host side

2016-03-19 Thread Carlo Bertolli via cfe-commits
Author: cbertol Date: Wed Mar 16 14:04:22 2016 New Revision: 263654 URL: http://llvm.org/viewvc/llvm-project?rev=263654&view=rev Log: [OPENMP] Support for codegen of private clause of target, host side This patch adds support for codegen of private clause of target and a regression test for host

Re: [PATCH] D18138: Add -fnative-half-arguments-and-returns

2016-03-19 Thread Oliver Stannard via cfe-commits
olista01 accepted this revision. olista01 added a comment. This revision is now accepted and ready to land. LGTM http://reviews.llvm.org/D18138 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cf

Re: [PATCH] D18163: Add visualizers for more clang types. Create more C++-like visualizations for existing Clang types

2016-03-19 Thread Mike Spertus via cfe-commits
mspertus updated this revision to Diff 50820. mspertus added a comment. Added reference types and a more accurate AttributedType enum. I am working on additional items for the future (class members, function types, etc.) but those will take longer, and I think it is worthwhile to get this revisi

Re: [PATCH] D16360: unordered_map: Avoid unnecessary mallocs when no insert occurs

2016-03-19 Thread Duncan P. N. Exon Smith via cfe-commits
> On 2016-Mar-16, at 12:31, Duncan P. N. Exon Smith > wrote: > >> >> On 2016-Mar-16, at 12:20, Eric Fiselier wrote: >> >> EricWF added a comment. >> >> Adding inline comments for the implementation. Comments on the tests to >> follow shortly. >> >> >> >> Comment at: incl

Re: [PATCH] D16749: [OpenMP] Map clause codegeneration.

2016-03-19 Thread Samuel Antao via cfe-commits
sfantao added a comment. Hi Alexey, I am afraid I don't understand what you are trying to accomplish with this. I was unable to compile your patch as is, I think what you intended is something like this: // If we are mapping a field of 'this' we attempt to generate a // OMPCapturedExprDec

[PATCH] D18231: [Clang-tools-extra] Fix Clang-tidy modernize-deprecated-headers warnings; other minor fixes

2016-03-19 Thread Eugene Zelenko via cfe-commits
Eugene.Zelenko created this revision. Eugene.Zelenko added reviewers: alexfh, aaron.ballman. Eugene.Zelenko added a subscriber: cfe-commits. Eugene.Zelenko set the repository for this revision to rL LLVM. I checked this patch on my own build on RHEL 6. Regressions were OK. Repository: rL LLVM

Re: [PATCH] D16396: Warn if variable cannot be implicitly instantiated

2016-03-19 Thread Richard Smith via cfe-commits
rsmith added a comment. Are you planning on extending this to also cover templated functions? Comment at: include/clang/Basic/DiagnosticGroups.td:78 @@ -77,2 +77,3 @@ DiagGroup<"gnu-string-literal-operator-template">; +def UnavailableTemplate : DiagGroup<"unavailable-template

Re: [PATCH] D18265: [clang-tidy] New: checker misc-assign-operator-return

2016-03-19 Thread Eugene Zelenko via cfe-commits
Eugene.Zelenko added a subscriber: Eugene.Zelenko. Eugene.Zelenko added a comment. I think will be reasonable to merge misc-assign-operator-return and misc-assign-operator-signature into one check. http://reviews.llvm.org/D18265 ___ cfe-commits mai

Re: [PATCH] D17893: Sema: Add semantic analysis for the C++ ABI stability attributes and whitelist.

2016-03-19 Thread Mehdi AMINI via cfe-commits
joker.eph added inline comments. Comment at: lib/Sema/SemaDeclCXX.cpp:4999 @@ +4998,3 @@ +return; + } + pcc wrote: > joker.eph wrote: > > joker.eph wrote: > > > Isn't this correct by the loop which starts with `DC = > > > InnermostExternalDC`? > > `s/correct

Re: [PATCH] D17951: Implement is_always_lock_free

2016-03-19 Thread Eric Fiselier via cfe-commits
EricWF added a comment. In http://reviews.llvm.org/D17951#376546, @bcraig wrote: > Visual Studio has a flag, /Zc:wchar_t-, that turns wchar_t into a short. > This flag is for people that need to maintain ABI compatibility with ancient > Visual Studios (MSVC6? MSVC5?). It is definitely non-con

Re: [PATCH] D18219: Add -cuda-relaxed-constexpr, which lets CUDA device code call constexpr functions.

2016-03-19 Thread Justin Lebar via cfe-commits
jlebar added a comment. Abandoning this for now -- it is a maze of twisty passages all alike. Some std math functions are constexpr, and making them host+device affects all our existing math overloads in fun and exciting ways. We may need this at some point, but for now I'm going to try someth

Re: [PATCH] D16579: Warn if friend function depends on template parameters.

2016-03-19 Thread Serge Pavlov via cfe-commits
2016-03-18 0:35 GMT+06:00 Arthur O'Dwyer : > I'm not qualified to comment on the implementation, but I'm a bit > skeptical that this warning is appropriate in the first place. I've often > declared friend non-template functions, e.g. swap(). I've never intended to > declare a friend *template spec

Re: [PATCH] D17893: Sema: Add semantic analysis for the C++ ABI stability attributes and whitelist.

2016-03-19 Thread John McCall via cfe-commits
rjmccall added inline comments. Comment at: lib/Sema/SemaDeclCXX.cpp:4935-4943 @@ +4934,11 @@ + + bool HasStableAttr = Record->hasAttr(); + bool HasUnstableAttr = Record->hasAttr(); + if (HasStableAttr && HasUnstableAttr) { +Diag(Record->getLocation(), diag::err_abi_mismatc

Re: [PATCH] D16749: [OpenMP] Map clause codegeneration.

2016-03-19 Thread Samuel Antao via cfe-commits
sfantao added a comment. Hi Alexey, I am sorry but I don't think I am following. So in your example: #pragma omp target map(to: this->A) []()->void {++A}(); the map clause is going to make sure the runtime library allocates the section of `this` that contains A and that is what is used in

Re: [PATCH] D18199: CodeGen: Implement IR generation for the relative vtable ABI (PR26723).

2016-03-19 Thread Peter Collingbourne via cfe-commits
pcc updated this revision to Diff 51061. pcc added a comment. - Use a vindex of 0 for non-virtuals http://reviews.llvm.org/D18199 Files: docs/UsersManual.rst lib/CodeGen/CGDebugInfo.cpp lib/CodeGen/CGVTables.cpp lib/CodeGen/CGVTables.h lib/CodeGen/CodeGenFunction.h lib/CodeGen/Itani

<    1   2   3