r295034 - [CodeGen][ObjC] Use the type of the captured field of the enclosing

2017-02-13 Thread Akira Hatanaka via cfe-commits
Author: ahatanak Date: Tue Feb 14 00:46:55 2017 New Revision: 295034 URL: http://llvm.org/viewvc/llvm-project?rev=295034&view=rev Log: [CodeGen][ObjC] Use the type of the captured field of the enclosing block or lambda. This is a follow-up to r281682, which fixed a bug in computeBlockInfo where t

r295032 - Delete useless / in comment. NFC.

2017-02-13 Thread George Burgess IV via cfe-commits
Author: gbiv Date: Mon Feb 13 23:52:57 2017 New Revision: 295032 URL: http://llvm.org/viewvc/llvm-project?rev=295032&view=rev Log: Delete useless / in comment. NFC. Modified: cfe/trunk/lib/Serialization/ASTReaderStmt.cpp Modified: cfe/trunk/lib/Serialization/ASTReaderStmt.cpp URL: http://ll

[PATCH] D29464: [MinGWToolChain] Don't use GCC headers on Win32

2017-02-13 Thread Yaron Keren via Phabricator via cfe-commits
yaron.keren added a comment. These directories are "mostly" equivalent, with some headers existing is mings gcc dir but missing in clang resource dir and thus will break compilation. For example, the most popular (37089 download this week) https://sourceforge.net/projects/mingw-w64 distribuion f

r295029 - Add a destruct-on-exit function to ASTContext.

2017-02-13 Thread George Burgess IV via cfe-commits
Author: gbiv Date: Mon Feb 13 23:37:36 2017 New Revision: 295029 URL: http://llvm.org/viewvc/llvm-project?rev=295029&view=rev Log: Add a destruct-on-exit function to ASTContext. It looks like the only use of AddDeallocation is to indirectly call the destructors of objects. In one case I found (Ty

[PATCH] D26057: [coroutines] Add DependentCoawaitExpr and fix re-building CoroutineBodyStmt.

2017-02-13 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF updated this revision to Diff 88304. EricWF added a comment. Re-add tests that got lost in the merge. https://reviews.llvm.org/D26057 Files: include/clang/AST/ExprCXX.h include/clang/AST/RecursiveASTVisitor.h include/clang/AST/Stmt.h include/clang/AST/StmtCXX.h include/clang/Ba

[PATCH] D26057: [coroutines] Add DependentCoawaitExpr and fix re-building CoroutineBodyStmt.

2017-02-13 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF updated this revision to Diff 88300. EricWF marked 6 inline comments as done. EricWF added a comment. Merge with upstream and address almost all inline comments. The only comment left te address is @rsmith's comment about renaming `BuildDependentCoawaitExpr`. https://reviews.llvm.org/D2

Re: r295016 - Canonicalize implicit deduction guide parameter types when forming a deduction

2017-02-13 Thread Eric Fiselier via cfe-commits
Hi Richard, The following test triggers an assertion, even after this patch: #include #include template struct TestAlloc : std::allocator {}; template , class Allocator = std::allocator> struct String { using size_type = typename Allocator::size_type; String() = default; Str

r295020 - clang/test/Parser/cxx1z-class-template-argument-deduction.cpp: Tweak to ignore thiscall.

2017-02-13 Thread NAKAMURA Takumi via cfe-commits
Author: chapuni Date: Mon Feb 13 21:18:24 2017 New Revision: 295020 URL: http://llvm.org/viewvc/llvm-project?rev=295020&view=rev Log: clang/test/Parser/cxx1z-class-template-argument-deduction.cpp: Tweak to ignore thiscall. Line 38: multiple overloads of 'f' instantiate to the same signature 'v

[PATCH] D29922: [OpenMP] Prepare Sema for initial implementation for pragma 'distribute parallel for'

2017-02-13 Thread Carlo Bertolli via Phabricator via cfe-commits
carlo.bertolli created this revision. This patch adds two fields for use in the implementation of 'distribute parallel for': 1. The increment expression for the distribute loop. As the chunk assigned to a team is executed by multiple threads within the 'parallel for' region, the increment expr

[PATCH] D29464: [MinGWToolChain] Don't use GCC headers on Win32

2017-02-13 Thread Reid Kleckner via Phabricator via cfe-commits
rnk added a comment. If I understand correctly, these GCC version specific include directories are equivalent to clang's resource include directory. We shouldn't have those on the include search path, so in principle, this seems like the right change. https://reviews.llvm.org/D29464 ___

[PATCH] D29464: [MinGWToolChain] Don't use GCC headers on Win32

2017-02-13 Thread Reid Kleckner via Phabricator via cfe-commits
rnk requested changes to this revision. rnk added a comment. This revision now requires changes to proceed. Actually, I re-read the concerns about omp.h. We should get that ironed out first. https://reviews.llvm.org/D29464 ___ cfe-commits mailing l

r295016 - Canonicalize implicit deduction guide parameter types when forming a deduction

2017-02-13 Thread Richard Smith via cfe-commits
Author: rsmith Date: Mon Feb 13 19:49:59 2017 New Revision: 295016 URL: http://llvm.org/viewvc/llvm-project?rev=295016&view=rev Log: Canonicalize implicit deduction guide parameter types when forming a deduction guide from a constructor. The purpose of this change is to avoid triggering instantia

[PATCH] D29464: [MinGWToolChain] Don't use GCC headers on Win32

2017-02-13 Thread Reid Kleckner via Phabricator via cfe-commits
rnk accepted this revision. rnk added a comment. lgtm, do you need me to land this? Sorry I took a while to get around to this. https://reviews.llvm.org/D29464 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mai

r295011 - [c++1z] Add some more tests for class template argument deduction, add

2017-02-13 Thread Richard Smith via cfe-commits
Author: rsmith Date: Mon Feb 13 18:55:25 2017 New Revision: 295011 URL: http://llvm.org/viewvc/llvm-project?rev=295011&view=rev Log: [c++1z] Add some more tests for class template argument deduction, add feature-test macro, and mark feature as done on status page. Modified: cfe/trunk/lib/Fron

[PATCH] D29912: [MS ABI] Correctly mangling vbase destructors

2017-02-13 Thread David Majnemer via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL295010: [MS ABI] Correctly mangling vbase destructors (authored by majnemer). Changed prior to commit: https://reviews.llvm.org/D29912?vs=88258&id=88280#toc Repository: rL LLVM https://reviews.llvm.

r295010 - [MS ABI] Correctly mangling vbase destructors

2017-02-13 Thread David Majnemer via cfe-commits
Author: majnemer Date: Mon Feb 13 18:54:11 2017 New Revision: 295010 URL: http://llvm.org/viewvc/llvm-project?rev=295010&view=rev Log: [MS ABI] Correctly mangling vbase destructors They are a little bit of a special case in the mangling. They are always mangled without taking into account their v

LLVM buildmaster will be updated and restarted tonight

2017-02-13 Thread Galina Kistanova via cfe-commits
Hello everyone, LLVM buildmaster will be updated and restarted after 6 PM Pacific time today. Thanks Galina ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

r295007 - [c++1z] Synthesize implicit deduction guides from constructors on demand. Rank

2017-02-13 Thread Richard Smith via cfe-commits
Author: rsmith Date: Mon Feb 13 18:25:28 2017 New Revision: 295007 URL: http://llvm.org/viewvc/llvm-project?rev=295007&view=rev Log: [c++1z] Synthesize implicit deduction guides from constructors on demand. Rank such guides below explicit ones, and ensure that references to the class's template pa

[PATCH] D29868: Recover more gracefully when __declspec is not supported as a keyword

2017-02-13 Thread David Majnemer via Phabricator via cfe-commits
majnemer added inline comments. Comment at: lib/Parse/ParseDecl.cpp:2989 + + Diag(Loc, diag::err_ms_attributes_not_enabled); + continue; aaron.ballman wrote: > majnemer wrote: > > aaron.ballman wrote: > > > compnerd wrote: > > > > aaron.ballman

[PATCH] D28404: IRGen: Add optnone attribute on function during O0

2017-02-13 Thread Chandler Carruth via Phabricator via cfe-commits
chandlerc added a comment. Just to be explicit, I agree with Hal's summary. This seems like the right engineering tradeoff and I don't find anything particularly unsatisfying about it. In https://reviews.llvm.org/D28404#675616, @mehdi_amini wrote: > Also note that @chandlerc in r290398 made cl

r295006 - When the new expr's array size is an ICE, emit it as a constant expression.

2017-02-13 Thread Nick Lewycky via cfe-commits
Author: nicholas Date: Mon Feb 13 17:49:55 2017 New Revision: 295006 URL: http://llvm.org/viewvc/llvm-project?rev=295006&view=rev Log: When the new expr's array size is an ICE, emit it as a constant expression. This bypasses integer sanitization checks which are redundant on the expression since

[PATCH] D29912: [MS ABI] Correctly mangling vbase destructors

2017-02-13 Thread Reid Kleckner via Phabricator via cfe-commits
rnk accepted this revision. rnk added a comment. This revision is now accepted and ready to land. lgtm, thanks! https://reviews.llvm.org/D29912 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cf

[PATCH] D29863: [libc++] Fix PR 31938 - std::basic_string constructors use non-deductible parameter types.

2017-02-13 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF added inline comments. Comment at: include/string:782 _LIBCPP_INLINE_VISIBILITY basic_string(const value_type* __s, size_type __n); _LIBCPP_INLINE_VISIBILITY rsmith wrote: > EricWF wrote: > > rsmith wrote: > > > Did you skip this one intenti

r295003 - [CodeCompletion] Code complete the '__auto_type' keyword

2017-02-13 Thread Alex Lorenz via cfe-commits
Author: arphaman Date: Mon Feb 13 17:35:59 2017 New Revision: 295003 URL: http://llvm.org/viewvc/llvm-project?rev=295003&view=rev Log: [CodeCompletion] Code complete the '__auto_type' keyword rdar://29219185 Added: cfe/trunk/test/CodeCompletion/auto_type.c Modified: cfe/trunk/lib/Sema/Se

[PATCH] D29868: Recover more gracefully when __declspec is not supported as a keyword

2017-02-13 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman marked an inline comment as done. aaron.ballman added inline comments. Comment at: lib/Parse/ParseDecl.cpp:2989 + + Diag(Loc, diag::err_ms_attributes_not_enabled); + continue; majnemer wrote: > aaron.ballman wrote: > > compnerd wro

[PATCH] D28286: [CodeCompletion] Code complete the missing C++11 keywords

2017-02-13 Thread Alex Lorenz via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL295001: [CodeCompletion] Code complete the missing C++11 keywords (authored by arphaman). Changed prior to commit: https://reviews.llvm.org/D28286?vs=83030&id=88271#toc Repository: rL LLVM https://r

r295001 - [CodeCompletion] Code complete the missing C++11 keywords

2017-02-13 Thread Alex Lorenz via cfe-commits
Author: arphaman Date: Mon Feb 13 17:19:40 2017 New Revision: 295001 URL: http://llvm.org/viewvc/llvm-project?rev=295001&view=rev Log: [CodeCompletion] Code complete the missing C++11 keywords This commit adds context sensitive code completion support for the C++11 keywords that currently don't h

[PATCH] D29915: emit constant expression for new expression array size if it is one

2017-02-13 Thread Nick Lewycky via Phabricator via cfe-commits
nlewycky created this revision. When the new expr's array size is an ICE, emit it as a constant expression. This bypasses integer sanitization checks which are redundant on the expression since it's been checked by Sema. Fixes a clang codegen assertion on "void test() { new int[0+1]{0}; }" when

r294997 - [test] Make Lit tests C++11 Compatible - Objective-C++

2017-02-13 Thread Charles Li via cfe-commits
Author: lcharles Date: Mon Feb 13 17:09:56 2017 New Revision: 294997 URL: http://llvm.org/viewvc/llvm-project?rev=294997&view=rev Log: [test] Make Lit tests C++11 Compatible - Objective-C++ Set 5 Objective-C++ tests to run at gnu++98 Differential Revision: https://reviews.llvm.org/D29739 Modifi

[PATCH] D29739: Make Lit tests C++11 compatible - Objective-C++

2017-02-13 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL294997: [test] Make Lit tests C++11 Compatible - Objective-C++ (authored by lcharles). Changed prior to commit: https://reviews.llvm.org/D29739?vs=87735&id=88267#toc Repository: rL LLVM https://revi

[PATCH] D29739: Make Lit tests C++11 compatible - Objective-C++

2017-02-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. https://reviews.llvm.org/D29739 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/

[PATCH] D29739: Make Lit tests C++11 compatible - Objective-C++

2017-02-13 Thread Charles Li via Phabricator via cfe-commits
tigerleapgorge reclaimed this revision. tigerleapgorge added a comment. @rjmccall - Hi John, I have reopened this patch. https://reviews.llvm.org/D29739 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/li

[PATCH] D28404: IRGen: Add optnone attribute on function during O0

2017-02-13 Thread Mehdi AMINI via Phabricator via cfe-commits
mehdi_amini added a comment. Also note that @chandlerc in r290398 made clang adding "noinline" on every function at O0 by default, which seems very similar to what I'm doing here. We're still waiting for @rsmith to comment whether it'd be better to `have a LangOpts flag that basically means "pr

[libcxx] r294995 - Add tests for noexcept functions

2017-02-13 Thread Eric Fiselier via cfe-commits
Author: ericwf Date: Mon Feb 13 16:44:39 2017 New Revision: 294995 URL: http://llvm.org/viewvc/llvm-project?rev=294995&view=rev Log: Add tests for noexcept functions Modified: libcxx/trunk/test/std/utilities/meta/meta.unary/meta.unary.cat/is_function.pass.cpp libcxx/trunk/test/std/utili

[PATCH] D29530: [ubsan] Reduce null checking of C++ object pointers (PR27581)

2017-02-13 Thread Vedant Kumar via Phabricator via cfe-commits
vsk updated this revision to Diff 88259. vsk marked an inline comment as done. vsk added a comment. - Tighten up the tests per Alex's suggestion. https://reviews.llvm.org/D29530 Files: lib/CodeGen/CGExpr.cpp lib/CodeGen/CGExprCXX.cpp lib/CodeGen/CodeGenFunction.cpp lib/CodeGen/CodeGenFu

[PATCH] D29530: [ubsan] Reduce null checking of C++ object pointers (PR27581)

2017-02-13 Thread Vedant Kumar via Phabricator via cfe-commits
vsk marked 2 inline comments as done. vsk added inline comments. Comment at: test/CodeGenCXX/ubsan-suppress-null-checks.cpp:8 + int load_member() { +// CHECK: call void @__ubsan_handle_type_mismatch +// CHECK-NOT: call void @__ubsan_handle_type_mismatch

[PATCH] D29868: Recover more gracefully when __declspec is not supported as a keyword

2017-02-13 Thread David Majnemer via Phabricator via cfe-commits
majnemer added inline comments. Comment at: lib/Parse/ParseDecl.cpp:2989 + + Diag(Loc, diag::err_ms_attributes_not_enabled); + continue; aaron.ballman wrote: > compnerd wrote: > > aaron.ballman wrote: > > > compnerd wrote: > > > > I think that w

[PATCH] D29912: [MS ABI] Correctly mangling vbase destructors

2017-02-13 Thread David Majnemer via Phabricator via cfe-commits
majnemer created this revision. They are a little bit of a special case in the mangling. They are always mangled without taking into account their virtual-ness of the destructor. They are also mangled to return void, unlike the actual destructor. This fixes PR31931. https://reviews.llvm.org/D29

[PATCH] D29910: [OpenMP] Specialize default schedule on a worksharing loop on the NVPTX device.

2017-02-13 Thread Arpith Jacob via Phabricator via cfe-commits
arpith-jacob created this revision. The default schedule type on a worksharing loop is implementation defined according to the OpenMP specifications. Currently, the compiler codegens a doubly nested loop that effectively implements a schedule of type (static). This is ideal for threads on CPUs.

[PATCH] D29908: Disallow returning a __block variable via a move

2017-02-13 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak created this revision. This patch disables moving a __block variable to return it from a function, which was causing a crash that occurred when compiling and executing the following code: #include #include #include class A { public: A(int x) : internal(x) {} int

[PATCH] D28473: Implement http://wg21.link/P0426 Constexpr for std::char_traits

2017-02-13 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists closed this revision. mclow.lists added a comment. Landed as r291741, r291742 and r293154. https://reviews.llvm.org/D28473 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D20660: Remove `auto_ptr` in C++17.

2017-02-13 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. Landed as r292986 https://reviews.llvm.org/D20660 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin

[PATCH] D29464: [MinGWToolChain] Don't use GCC headers on Win32

2017-02-13 Thread Mateusz Mikuła via Phabricator via cfe-commits
mati865 added a comment. My GPU has died in the meantime but openmp project doesn't seem buildable with mingw-w64 based compilers. So the case is still open. https://reviews.llvm.org/D29464 ___ cfe-commits mailing list cfe-commits@lists.llvm.org ht

[PATCH] D29432: Modular Codegen: Emit inline asm into users, not modular objects

2017-02-13 Thread David Blaikie via Phabricator via cfe-commits
dblaikie added a comment. +rsmith we chatted about a bit of this offline & some things came out of it, not entirely resolved: 1. Is this the right thing for inline asm or similar things (static functions? static variables?) - I was mirroring the choice already made for static variables (motiva

[PATCH] D28933: Revert the return type for `emplace_(back|front)` to `void` in C++14 and before

2017-02-13 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists closed this revision. mclow.lists added a comment. Landed as r292990. https://reviews.llvm.org/D28933 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D29905: [OpenMP] Pass argument to device kernel by reference when map is used.

2017-02-13 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
gtbercea created this revision. When a scalar argument is explicitly mapped, the device kernel needs to be passed that argument by reference. This is a partial fix to this bug . The full fix requires data sharing support which will land in future p

[PATCH] D29904: [OpenMP] Prevent emission of exception handling code when using OpenMP to offload to NVIDIA devices.

2017-02-13 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
gtbercea created this revision. For the OpenMP toolchain which offloads to NVIDIA GPUs make sure that no exception handling code is emitted. Repository: rL LLVM https://reviews.llvm.org/D29904 Files: lib/Frontend/CompilerInvocation.cpp test/OpenMP/target_parallel_no_exceptions.cpp Ind

[PATCH] D24812: Lit C++11 Compatibility Patch #11

2017-02-13 Thread John McCall via Phabricator via cfe-commits
rjmccall added a reviewer: rnk. rjmccall added a comment. Generally looks good to me, thanks. One question for Reid. Comment at: test/CodeGenCXX/static-init.cpp:14 +// CHECK98: @_ZZN5test414useStaticLocalEvE3obj = linkonce_odr global %"struct.test4::HasVTable" zeroinitializer

[PATCH] D29739: Make Lit tests C++11 compatible - Objective-C++

2017-02-13 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. In https://reviews.llvm.org/D29739#675277, @probinson wrote: > In https://reviews.llvm.org/D29739#674297, @rjmccall wrote: > > > In https://reviews.llvm.org/D29739#674288, @probinson wrote: > > > > > I really think Apple would need to step up here if the default > > > O

[PATCH] D29901: Modular Codegen: Add/use a bit in serialized function definitions to track whether they are the subject of modular codegen

2017-02-13 Thread David Blaikie via Phabricator via cfe-commits
dblaikie created this revision. Some decls are created not where they are written, but in other module files/users (implicit special members and function template implicit specializations). To correctly identify them, use a bit next to the definition to track the modular codegen property. Possibl

[PATCH] D29843: [CodeGen] Treat auto-generated __dso_handle symbol as HiddenVisibility

2017-02-13 Thread Reid Kleckner via Phabricator via cfe-commits
rnk added a comment. I committed a modified patch that set the visibility on the global after creating it to avoid adding an optional boolean parameter. Thanks for the report and patch! Repository: rL LLVM https://reviews.llvm.org/D29843 ___ cf

[PATCH] D21626: Lit C++11 Compatibility Patch #10

2017-02-13 Thread Charles Li via Phabricator via cfe-commits
tigerleapgorge updated this revision to Diff 88232. tigerleapgorge edited the summary of this revision. tigerleapgorge added a comment. Remove 2 tests reviewed in https://reviews.llvm.org/D29685 https://reviews.llvm.org/D21626 Files: test/Modules/Inputs/merge-using-decls/a.h test/Modules/In

r294979 - [Test] Make Lit tests C++11 compatible - printf format string

2017-02-13 Thread Charles Li via cfe-commits
Author: lcharles Date: Mon Feb 13 12:57:06 2017 New Revision: 294979 URL: http://llvm.org/viewvc/llvm-project?rev=294979&view=rev Log: [Test] Make Lit tests C++11 compatible - printf format string Different diagnostics when format string does not match actual arg type. This commit contains the

[PATCH] D29764: [OpenCL] Blocks cannot capture/reference another block

2017-02-13 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl accepted this revision. yaxunl added a comment. This revision is now accepted and ready to land. Please fix the test. Otherwise LGTM. Thanks! https://reviews.llvm.org/D29764 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists

[PATCH] D29843: [CodeGen] Treat auto-generated __dso_handle symbol as HiddenVisibility

2017-02-13 Thread Reid Kleckner via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL294978: [CodeGen] Treat auto-generated __dso_handle symbol as HiddenVisibility (authored by rnk). Changed prior to commit: https://reviews.llvm.org/D29843?vs=88068&id=88229#toc Repository: rL LLVM h

r294978 - [CodeGen] Treat auto-generated __dso_handle symbol as HiddenVisibility

2017-02-13 Thread Reid Kleckner via cfe-commits
Author: rnk Date: Mon Feb 13 12:49:21 2017 New Revision: 294978 URL: http://llvm.org/viewvc/llvm-project?rev=294978&view=rev Log: [CodeGen] Treat auto-generated __dso_handle symbol as HiddenVisibility Fixes https://bugs.llvm.org/show_bug.cgi?id=31932 Based on a patch by Roland McGrath Reviewed

[PATCH] D29530: [ubsan] Reduce null checking of C++ object pointers (PR27581)

2017-02-13 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman added inline comments. Comment at: test/CodeGenCXX/ubsan-suppress-null-checks.cpp:8 + int load_member() { +// CHECK: call void @__ubsan_handle_type_mismatch +// CHECK-NOT: call void @__ubsan_handle_type_mismatch I think this kind of check would'

[PATCH] D29685: Lit C++11 Compatibility - Function Attributes

2017-02-13 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In https://reviews.llvm.org/D29685#675306, @tigerleapgorge wrote: > @aaron.ballman Thank you for the code review. I take it I can commit the > first 2 tests? Yes, the first two tests are good to commit. https://reviews.llvm.org/D29685 ___

[PATCH] D29685: Lit C++11 Compatibility - Function Attributes

2017-02-13 Thread Charles Li via Phabricator via cfe-commits
tigerleapgorge added a comment. @aaron.ballman Thank you for the code review. I take it I can commit the first 2 tests? @delesley Thank you for the analysis. Should I open a bugzilla to track this issue? https://reviews.llvm.org/D29685 ___ cfe-co

[PATCH] D28768: [clang-tidy] Add check 'modernize-return-braced-init-list'

2017-02-13 Thread Jonas Devlieghere via Phabricator via cfe-commits
JDevlieghere updated this revision to Diff 88226. JDevlieghere marked 5 inline comments as done. JDevlieghere added a comment. Thanks for reviewing @aaron.ballman and @alexfh. I have updated the diff to address your issues. While looking at the logic that checked for matching argument types I di

[PATCH] D29886: [clangd] Wire up ASTUnit and publish diagnostics with it.

2017-02-13 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman added inline comments. Comment at: clangd/ASTManager.cpp:69 + // our one-element queue is empty. + if (!RequestIsPending && !Done) +ClangRequestCV.wait(Lock); This is just a suggestion based on personal opinion: `RequestIsPending` and

[PATCH] D24812: Lit C++11 Compatibility Patch #11

2017-02-13 Thread Charles Li via Phabricator via cfe-commits
tigerleapgorge updated this revision to Diff 88224. tigerleapgorge edited the summary of this revision. tigerleapgorge added a comment. Remove another 3 tests reviewed in https://reviews.llvm.org/D29859 https://reviews.llvm.org/D24812 Files: test/CodeGenCXX/mangle-unnamed.cpp test/CodeGenCX

[PATCH] D29739: Make Lit tests C++11 compatible - Objective-C++

2017-02-13 Thread Paul Robinson via Phabricator via cfe-commits
probinson added a comment. In https://reviews.llvm.org/D29739#674297, @rjmccall wrote: > In https://reviews.llvm.org/D29739#674288, @probinson wrote: > > > I really think Apple would need to step up here if the default > > Objective-C++ dialect is going to change. > > > I don't mind stepping up

[PATCH] D29764: [OpenCL] Blocks cannot capture/reference another block

2017-02-13 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added a comment. In https://reviews.llvm.org/D29764#673679, @yaxunl wrote: > In https://reviews.llvm.org/D29764#673548, @Nicola wrote: > > > Looking at "Example 4" in the standard it looks like this should also be > > illegal. > > > > int (^block1)(void) = ^int {return 1;}; > > int

[PATCH] D29819: Introduce an 'external_source_symbol' attribute that describes the origin and the nature of a declaration

2017-02-13 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman added inline comments. Comment at: include/clang/Basic/AttrDocs.td:1007 + +defined_in=\ *string-literal* + The name of the source container in which the declaration was defined. The aaron.ballman wrote: > Would this hold something like a file name? If s

[PATCH] D29819: Introduce an 'external_source_symbol' attribute that describes the origin and the nature of a declaration

2017-02-13 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman updated this revision to Diff 88222. arphaman marked 9 inline comments as done. arphaman added a comment. Thanks for the feedback! I've addressed the majority of your comments. Repository: rL LLVM https://reviews.llvm.org/D29819 Files: include/clang/Basic/Attr.td include/clang/B

[PATCH] D29685: Lit C++11 Compatibility - Function Attributes

2017-02-13 Thread Delesley Hutchins via Phabricator via cfe-commits
delesley added a comment. I agree with Aaron here. Those thread safety errors are supposed to fire; simply disabling the unit tests because they no longer fire is not acceptable. I also don't understand how this could be a bug with the thread safety analysis, since these particular errors are

[PATCH] D29899: [clang-tidy] Add support for NOLINTNEXTLINE.

2017-02-13 Thread Benjamin Kramer via Phabricator via cfe-commits
bkramer created this revision. Herald added a subscriber: JDevlieghere. https://reviews.llvm.org/D29899 Files: clang-tidy/ClangTidyDiagnosticConsumer.cpp test/clang-tidy/nolintnextline.cpp Index: test/clang-tidy/nolintnextline.cpp

[clang-tools-extra] r294974 - [clang-tidy] Reduce indentation. NFC.

2017-02-13 Thread Benjamin Kramer via cfe-commits
Author: d0k Date: Mon Feb 13 12:03:10 2017 New Revision: 294974 URL: http://llvm.org/viewvc/llvm-project?rev=294974&view=rev Log: [clang-tidy] Reduce indentation. NFC. Modified: clang-tools-extra/trunk/clang-tidy/ClangTidyDiagnosticConsumer.cpp Modified: clang-tools-extra/trunk/clang-tidy/Cl

r294972 - [Test] Make Lit tests C++11 compatible - nounwind noexcept

2017-02-13 Thread Charles Li via cfe-commits
Author: lcharles Date: Mon Feb 13 11:56:30 2017 New Revision: 294972 URL: http://llvm.org/viewvc/llvm-project?rev=294972&view=rev Log: [Test] Make Lit tests C++11 compatible - nounwind noexcept C++11 destructors are nothrow by default. Differential Revision: https://reviews.llvm.org/D29859 Modi

[PATCH] D29859: Make Lit tests C++11 compatible - nounwind noexcept

2017-02-13 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL294972: [Test] Make Lit tests C++11 compatible - nounwind noexcept (authored by lcharles). Changed prior to commit: https://reviews.llvm.org/D29859?vs=88074&id=88220#toc Repository: rL LLVM https://

[PATCH] D19586: Misleading Indentation check

2017-02-13 Thread Daniel Marjamäki via Phabricator via cfe-commits
danielmarjamaki added inline comments. Comment at: clang-tidy/readability/MisleadingIndentationCheck.cpp:42 +const Stmt *Inside = nullptr; + +if (const auto *CurrentIf = dyn_cast(CurrentStmt)) { I would rename Inside to Inner. That would make InnerLoc mor

[clang-tools-extra] r294969 - [change-namespace] add an option to dump changed files in YAML.

2017-02-13 Thread Eric Liu via cfe-commits
Author: ioeric Date: Mon Feb 13 11:24:14 2017 New Revision: 294969 URL: http://llvm.org/viewvc/llvm-project?rev=294969&view=rev Log: [change-namespace] add an option to dump changed files in YAML. Reviewers: hokein Reviewed By: hokein Subscribers: fhahn, cfe-commits Differential Revision: http

[PATCH] D29893: [change-namespace] add an option to dump changed files in YAML.

2017-02-13 Thread Eric Liu via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL294969: [change-namespace] add an option to dump changed files in YAML. (authored by ioeric). Changed prior to commit: https://reviews.llvm.org/D29893?vs=88208&id=88211#toc Repository: rL LLVM https

[PATCH] D29893: [change-namespace] add an option to dump changed files in YAML.

2017-02-13 Thread Eric Liu via Phabricator via cfe-commits
ioeric added inline comments. Comment at: change-namespace/tool/ClangChangeNamespace.cpp:68 +cl::opt +DumpYAML("dump_yaml", + cl::desc("Dump new file content in YAML, if specified."), hokein wrote: > hokein wrote: > > `dump_result` maybe a clearer nam

[PATCH] D29893: [change-namespace] add an option to dump changed files in YAML.

2017-02-13 Thread Haojian Wu via Phabricator via cfe-commits
hokein accepted this revision. hokein added inline comments. This revision is now accepted and ready to land. Comment at: change-namespace/tool/ClangChangeNamespace.cpp:68 +cl::opt +DumpYAML("dump_yaml", + cl::desc("Dump new file content in YAML, if specified."),

[PATCH] D29893: [change-namespace] add an option to dump changed files in YAML.

2017-02-13 Thread Eric Liu via Phabricator via cfe-commits
ioeric updated this revision to Diff 88208. ioeric marked 2 inline comments as done. ioeric added a comment. - Addressed review comments. https://reviews.llvm.org/D29893 Files: change-namespace/ChangeNamespace.cpp change-namespace/tool/ClangChangeNamespace.cpp Index: change-namespace/tool

[PATCH] D29770: [Assembler] Inline assembly diagnostics test.

2017-02-13 Thread Jim Grosbach via Phabricator via cfe-commits
grosbach added a comment. Eric is correct. These tests would be more suitable in llc. The clang tests should check that the inline asm is inserted into the IR in the correct form if there's any difference pre and post patch (I don't think there is?). https://reviews.llvm.org/D29770

[PATCH] D29893: [change-namespace] add an option to dump changed files in YAML.

2017-02-13 Thread Eric Liu via Phabricator via cfe-commits
ioeric added inline comments. Comment at: change-namespace/tool/ClangChangeNamespace.cpp:137 + + for (const auto &File : ChangedFiles) { const auto *Entry = FileMgr.getFile(File); hokein wrote: > Is this duplicated as we already have "dump_results" option n

[PATCH] D29893: [change-namespace] add an option to dump changed files in YAML.

2017-02-13 Thread Haojian Wu via Phabricator via cfe-commits
hokein added inline comments. Comment at: change-namespace/tool/ClangChangeNamespace.cpp:68 +cl::opt +DumpYAML("dump_yaml", + cl::desc("Dump new file content in YAML, if specified."), `dump_result` maybe a clearer name, which also is consistent with c

[PATCH] D29770: [Assembler] Inline assembly diagnostics test.

2017-02-13 Thread Eric Christopher via Phabricator via cfe-commits
echristo added a comment. In https://reviews.llvm.org/D29770#674961, @sanwou01 wrote: > Use clang_cc1 -verify for testing as suggested by @rnk. > > @echristo, llc does use the same diags interfaces as clang, however, it is > lacking the infrastructure to make use of LocCookies. > > In any case,

[PATCH] D29599: Clang Changes for alloc_align

2017-02-13 Thread Erich Keane via Phabricator via cfe-commits
erichkeane added a comment. In https://reviews.llvm.org/D29599#674772, @ahatanak wrote: > Can this attribute be used on c++ template methods? Is the following code > valid? > > template > struct S { > T foo(int a) __attribute__((alloc_align(1))); > }; > Yes it can, however that exam

[PATCH] D29886: [clangd] Wire up ASTUnit and publish diagnostics with it.

2017-02-13 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir added inline comments. Comment at: clangd/DocumentStore.h:42 /// Delete a document from the store. - void removeDocument(StringRef Uri) { Docs.erase(Uri); } + void removeDocument(StringRef Uri) { Docs.erase(Uri); +for (const auto &Listener : Listeners) -

[PATCH] D29893: [change-namespace] add an option to dump changed files in YAML.

2017-02-13 Thread Eric Liu via Phabricator via cfe-commits
ioeric created this revision. Herald added a subscriber: fhahn. https://reviews.llvm.org/D29893 Files: change-namespace/ChangeNamespace.cpp change-namespace/tool/ClangChangeNamespace.cpp Index: change-namespace/tool/ClangChangeNamespace.cpp ==

r294963 - [ASTUnit] Clear out diagnostic state after creating the preamble.

2017-02-13 Thread Benjamin Kramer via cfe-commits
Author: d0k Date: Mon Feb 13 10:16:43 2017 New Revision: 294963 URL: http://llvm.org/viewvc/llvm-project?rev=294963&view=rev Log: [ASTUnit] Clear out diagnostic state after creating the preamble. If the preamble had diagnostic state this would leave behind invalid state in the DiagnosticsEngine a

[PATCH] D29857: Catch trivially true statements of the form a != 1 || a != 3. Statements likethese are likely errors. They are particularly easy to miss when handling enums:enum State {RUNNING, STOPPE

2017-02-13 Thread Etienne Bergeron via Phabricator via cfe-commits
etienneb added a comment. which one is the final version? https://reviews.llvm.org/D25946 Please close one of them. https://reviews.llvm.org/D29857 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listi

r294961 - [PM] Add support for instrumented PGO in the new pass manager (clang-side)

2017-02-13 Thread Davide Italiano via cfe-commits
Author: davide Date: Mon Feb 13 10:07:05 2017 New Revision: 294961 URL: http://llvm.org/viewvc/llvm-project?rev=294961&view=rev Log: [PM] Add support for instrumented PGO in the new pass manager (clang-side) Differential Revision: https://reviews.llvm.org/D29309 Modified: cfe/trunk/lib/Code

[PATCH] D19586: Misleading Indentation check

2017-02-13 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh requested changes to this revision. alexfh added inline comments. This revision now requires changes to proceed. Comment at: clang-tidy/readability/MisleadingIndentationCheck.cpp:72 +SM.getExpansionColumnNumber(NextLoc)) + diag(NextLoc, "misleading indentation

[PATCH] D29886: [clangd] Wire up ASTUnit and publish diagnostics with it.

2017-02-13 Thread Eric Liu via Phabricator via cfe-commits
ioeric added inline comments. Comment at: clangd/ASTManager.cpp:21 +using namespace clang; +using namespace clangd; + Any reason not to wrap code in namespaces instead? https://reviews.llvm.org/D29886 ___ cfe-commi

Re: r293199 - Turn on -Wblock-capture-autoreleasing by default.

2017-02-13 Thread Nico Weber via cfe-commits
If I'm understanding you correctly, you're saying that clang implicitly marks the indirect NSError** parameter with __autoreleasing, so there's no bug here. Is that correct? If so, should Wblock-capture-autoreleasing just not fire on parameters that are already implicitly marked as __autoreleasing?

[PATCH] D29858: [clang-tidy] Catch trivially true statements like a != 1 || a != 3

2017-02-13 Thread Etienne Bergeron via Phabricator via cfe-commits
etienneb added a comment. Could you add some tests with enums (like the one in your description)? This is missing and it's a nice to have. Comment at: clang-tidy/misc/RedundantExpressionCheck.cpp:244 + // x != 5 || x != 10 + if (OpcodeLHS == BO_NE || OpcodeLHS == BO_NE) +

[PATCH] D29542: [TargetInfo] Adjust x86-32 atomic support to the CPU used

2017-02-13 Thread Michał Górny via Phabricator via cfe-commits
mgorny added a comment. Le gentle ping. https://reviews.llvm.org/D29542 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: r294954 - Fix r291495 -- Normalize LLVM_CMAKE_PATH in clang standalone build.

2017-02-13 Thread Michał Górny via cfe-commits
W dniu 13.02.2017, pon o godzinie 14∶59 +, użytkownik NAKAMURA Takumi via cfe-commits napisał: > Author: chapuni > Date: Mon Feb 13 08:59:53 2017 > New Revision: 294954 > > URL: http://llvm.org/viewvc/llvm-project?rev=294954&view=rev > Log: > Fix r291495 -- Normalize LLVM_CMAKE_PATH in clang s

[libcxx] r294958 - config: disable thread safety analysis on COFF

2017-02-13 Thread Saleem Abdulrasool via cfe-commits
Author: compnerd Date: Mon Feb 13 09:26:51 2017 New Revision: 294958 URL: http://llvm.org/viewvc/llvm-project?rev=294958&view=rev Log: config: disable thread safety analysis on COFF clang cannot properly handle __declspec and __attribute__ on classes right now. This prevents the shared_mutex tes

[libcxx] r294956 - test: mark another test as requiring pthreads

2017-02-13 Thread Saleem Abdulrasool via cfe-commits
Author: compnerd Date: Mon Feb 13 09:26:47 2017 New Revision: 294956 URL: http://llvm.org/viewvc/llvm-project?rev=294956&view=rev Log: test: mark another test as requiring pthreads This is checking pthread specific behaviour. Add a requirement on pthreads. Modified: libcxx/trunk/test/libcx

[libcxx] r294957 - math: actually pull the declarations/overloads into std

2017-02-13 Thread Saleem Abdulrasool via cfe-commits
Author: compnerd Date: Mon Feb 13 09:26:50 2017 New Revision: 294957 URL: http://llvm.org/viewvc/llvm-project?rev=294957&view=rev Log: math: actually pull the declarations/overloads into std The previous changes missed the change to include/cmath. These changes allow some of the rand.distributio

[PATCH] D29886: [clangd] Wire up ASTUnit and publish diagnostics with it.

2017-02-13 Thread Wojciech Cierpucha via Phabricator via cfe-commits
cierpuchaw added inline comments. Comment at: clangd/DocumentStore.h:42 /// Delete a document from the store. - void removeDocument(StringRef Uri) { Docs.erase(Uri); } + void removeDocument(StringRef Uri) { Docs.erase(Uri); +for (const auto &Listener : Listeners) ---

[PATCH] D29886: [clangd] Wire up ASTUnit and publish diagnostics with it.

2017-02-13 Thread Wojciech Cierpucha via Phabricator via cfe-commits
cierpuchaw added inline comments. Comment at: clangd/DocumentStore.h:42 /// Delete a document from the store. - void removeDocument(StringRef Uri) { Docs.erase(Uri); } + void removeDocument(StringRef Uri) { Docs.erase(Uri); +for (const auto &Listener : Listeners) ---

r294954 - Fix r291495 -- Normalize LLVM_CMAKE_PATH in clang standalone build.

2017-02-13 Thread NAKAMURA Takumi via cfe-commits
Author: chapuni Date: Mon Feb 13 08:59:53 2017 New Revision: 294954 URL: http://llvm.org/viewvc/llvm-project?rev=294954&view=rev Log: Fix r291495 -- Normalize LLVM_CMAKE_PATH in clang standalone build. CMake handles paths with slashes. It caused cmake/install failure on msbuild.exe. Note, Other

[PATCH] D29868: Recover more gracefully when __declspec is not supported as a keyword

2017-02-13 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman marked 3 inline comments as done. aaron.ballman added inline comments. Comment at: lib/Parse/ParseDecl.cpp:2989 + + Diag(Loc, diag::err_ms_attributes_not_enabled); + continue; compnerd wrote: > aaron.ballman wrote: > > compnerd wro

  1   2   >