r303037 - Revert r302965 - [modules] When creating a declaration, cache its owning

2017-05-15 Thread Daniel Jasper via cfe-commits
Author: djasper Date: Mon May 15 02:51:10 2017 New Revision: 303037 URL: http://llvm.org/viewvc/llvm-project?rev=303037&view=rev Log: Revert r302965 - [modules] When creating a declaration, cache its owning module immediately Also revert dependent r302969. This is leading to crashes. Will provide

Re: r302965 - [modules] When creating a declaration, cache its owning module immediately

2017-05-15 Thread Daniel Jasper via cfe-commits
This was leading to many crashers. Reverted in r303037. On Sat, May 13, 2017 at 1:27 AM, Richard Smith via cfe-commits < cfe-commits@lists.llvm.org> wrote: > Author: rsmith > Date: Fri May 12 18:27:00 2017 > New Revision: 302965 > > URL: http://llvm.org/viewvc/llvm-project?rev=302965&view=rev > L

r303038 - clang-format: [JS] fix non-null assertion operator recognition.

2017-05-15 Thread Martin Probst via cfe-commits
Author: mprobst Date: Mon May 15 03:15:53 2017 New Revision: 303038 URL: http://llvm.org/viewvc/llvm-project?rev=303038&view=rev Log: clang-format: [JS] fix non-null assertion operator recognition. Summary: `getIdentifierInfo()` includes all keywords, whereas non-null assertion operators should o

[PATCH] D31745: [OpenCL] Added diagnostic for implicit declaration of function in OpenCL

2017-05-15 Thread Egor Churaev via Phabricator via cfe-commits
echuraev updated this revision to Diff 98958. echuraev added a comment. I disabled adding note diagnostic for OpenCL. Addition function to dictionary occurs in function CurrectTypo. In this function take place creation of consumer by calling function makeTypoCorrectionConsumer. The function do s

[PATCH] D33023: clang-format: [JS] wrap params with trailing commas.

2017-05-15 Thread Daniel Jasper via Phabricator via cfe-commits
djasper added inline comments. Comment at: lib/Format/ContinuationIndenter.cpp:1043 +bool EndsInComma = +Current.MatchingParen && Please make this specific to JavaScript for now. C++ doesn't allow trailing commas here and a trailing comma is more l

[PATCH] D33023: clang-format: [JS] wrap params with trailing commas.

2017-05-15 Thread Martin Probst via Phabricator via cfe-commits
mprobst updated this revision to Diff 98969. mprobst marked 2 inline comments as done. mprobst added a comment. - only trigger wrapping in js mode, revert appropriate tests https://reviews.llvm.org/D33023 Files: lib/Format/ContinuationIndenter.cpp lib/Format/TokenAnnotator.cpp unittests/F

[PATCH] D33023: clang-format: [JS] wrap params with trailing commas.

2017-05-15 Thread Martin Probst via Phabricator via cfe-commits
mprobst marked an inline comment as done. mprobst added inline comments. Comment at: unittests/Format/FormatTest.cpp:5505 + verifyFormat( + "void aa(\n" + "int level,\n" djasper wrote: > Don't add this line break? I suspect your cla

[PATCH] D30295: [analyzer] clarify undef shift result when shift count is negative or exceeds the bit width

2017-05-15 Thread Daniel Marjamäki via Phabricator via cfe-commits
danielmarjamaki updated this revision to Diff 98970. danielmarjamaki added a comment. minor tweak Repository: rL LLVM https://reviews.llvm.org/D30295 Files: include/clang/StaticAnalyzer/Core/PathSensitive/CheckerHelpers.h lib/StaticAnalyzer/Checkers/ConversionChecker.cpp lib/StaticAnal

[PATCH] D33023: clang-format: [JS] wrap params with trailing commas.

2017-05-15 Thread Martin Probst via Phabricator via cfe-commits
mprobst updated this revision to Diff 98971. mprobst marked an inline comment as done. mprobst added a comment. fix formatting a bit https://reviews.llvm.org/D33023 Files: lib/Format/ContinuationIndenter.cpp lib/Format/TokenAnnotator.cpp unittests/Format/FormatTest.cpp unittests/Format/

r303045 - [index] Avoid a crash that happens when looking up a dependent name

2017-05-15 Thread Alex Lorenz via cfe-commits
Author: arphaman Date: Mon May 15 05:20:39 2017 New Revision: 303045 URL: http://llvm.org/viewvc/llvm-project?rev=303045&view=rev Log: [index] Avoid a crash that happens when looking up a dependent name in a record that has no definition rdar://32194921 Modified: cfe/trunk/lib/Index/IndexBod

r303046 - [index] Store correct location for namespace nested name qualifiers

2017-05-15 Thread Alex Lorenz via cfe-commits
Author: arphaman Date: Mon May 15 05:41:04 2017 New Revision: 303046 URL: http://llvm.org/viewvc/llvm-project?rev=303046&view=rev Log: [index] Store correct location for namespace nested name qualifiers rdar://32195200 Modified: cfe/trunk/lib/Index/IndexTypeSourceInfo.cpp cfe/trunk/test/

r303048 - [index] Visit and store information about namespace alias declarations

2017-05-15 Thread Alex Lorenz via cfe-commits
Author: arphaman Date: Mon May 15 05:56:31 2017 New Revision: 303048 URL: http://llvm.org/viewvc/llvm-project?rev=303048&view=rev Log: [index] Visit and store information about namespace alias declarations rdar://32195226 Modified: cfe/trunk/lib/Index/IndexDecl.cpp cfe/trunk/test/Index/C

[PATCH] D33023: clang-format: [JS] wrap params with trailing commas.

2017-05-15 Thread Martin Probst via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL303049: JavaScript allows parameter lists to include trailing commas: (authored by mprobst). Changed prior to commit: https://reviews.llvm.org/D33023?vs=98971&id=98979#toc Repository: rL LLVM https:

r303049 - JavaScript allows parameter lists to include trailing commas:

2017-05-15 Thread Martin Probst via cfe-commits
Author: mprobst Date: Mon May 15 06:15:29 2017 New Revision: 303049 URL: http://llvm.org/viewvc/llvm-project?rev=303049&view=rev Log: JavaScript allows parameter lists to include trailing commas: myFunction(param1, param2,); For symmetry with other parenthesized lists ([...], {...}), clang-f

[PATCH] D32896: [OpenCL] Make CLK_NULL_RESERVE_ID invalid reserve id.

2017-05-15 Thread Egor Churaev via Phabricator via cfe-commits
echuraev added inline comments. Comment at: lib/Headers/opencl-c.h:16020 +// The macro CLK_NULL_RESERVE_ID refers to an invalid reservation ID. +#define CLK_NULL_RESERVE_ID (__builtin_astype((void *)0, reserve_id_t)) bool __ovld is_valid_reserve_id(reserve_id_t reserve_id);

[PATCH] D33173: Modify test to look for patterns in stderr as well

2017-05-15 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh added a comment. Feel free to commit this to fix buildbots, however the underlying https://reviews.llvm.org/D33013 raises some questions. Clang-tidy is also used as a library, in which case it should capture all compiler diagnostics and pass them to the caller. This test verifies that c

[PATCH] D33013: Driver must return non-zero code on errors in command line

2017-05-15 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh added inline comments. Comment at: lib/Tooling/CompilationDatabase.cpp:208 IntrusiveRefCntPtr DiagOpts = new DiagnosticOptions(); - UnusedInputDiagConsumer DiagClient; + TextDiagnosticPrinter DiagnosticPrinter(llvm::errs(), &*DiagOpts); + UnusedInputDiagConsumer Diag

[PATCH] D25866: [Sema] Support implicit scalar to vector conversions

2017-05-15 Thread Simon Dardis via Phabricator via cfe-commits
sdardis added a comment. Thanks for the review. Repository: rL LLVM https://reviews.llvm.org/D25866 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D33191: [analyzer] ObjCGenerics: account for __kindof specifiers met along a chain of casts.

2017-05-15 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ created this revision. Herald added a subscriber: xazax.hun. `__kindof` type specifiers allow the developers to express their intent in discriminating between generic type arguments being matched exactly or allowing sub-types. When generics were introduced, it was already too late to add `_

[PATCH] D33193: clang-format: [JS] for async loops.

2017-05-15 Thread Martin Probst via Phabricator via cfe-commits
mprobst created this revision. Herald added a subscriber: klimek. JavaScript supports asynchronous loop iteration in async functions: for async (const x of y) ... https://reviews.llvm.org/D33193 Files: lib/Format/TokenAnnotator.cpp lib/Format/UnwrappedLineParser.cpp unittests/Format/Fo

[PATCH] D33010: Make google-build-using-namespace skip std::.*literals

2017-05-15 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 with one nit. Thank you for addressing this! Do you need me to commit the patch for you? Comment at: clang-tidy/google/UsingNamespaceDirectiveCheck.cpp:48 +bool UsingNa

[PATCH] D33193: clang-format: [JS] for async loops.

2017-05-15 Thread Daniel Jasper via Phabricator via cfe-commits
djasper accepted this revision. djasper added inline comments. This revision is now accepted and ready to land. Comment at: lib/Format/TokenAnnotator.cpp:583 Contexts.back().ColonIsForRangeExpr = true; + // for async ( ... + if (CurrentToken->is(Keywords.kw_async

[PATCH] D33193: clang-format: [JS] for async loops.

2017-05-15 Thread Martin Probst via Phabricator via cfe-commits
mprobst updated this revision to Diff 98997. mprobst marked an inline comment as done. mprobst added a comment. - make parsing JS specific https://reviews.llvm.org/D33193 Files: lib/Format/TokenAnnotator.cpp lib/Format/UnwrappedLineParser.cpp unittests/Format/FormatTestJS.cpp Index: uni

[PATCH] D33193: clang-format: [JS] for async loops.

2017-05-15 Thread Martin Probst via Phabricator via cfe-commits
mprobst marked an inline comment as done. mprobst added inline comments. Comment at: lib/Format/TokenAnnotator.cpp:583 Contexts.back().ColonIsForRangeExpr = true; + // for async ( ... + if (CurrentToken->is(Keywords.kw_async)) djasper wrote: > Ca

[PATCH] D33047: [ClangD] Refactor clangd into separate components

2017-05-15 Thread Benjamin Kramer via Phabricator via cfe-commits
bkramer accepted this revision. bkramer added a comment. This revision is now accepted and ready to land. I believe this is good enough now. https://reviews.llvm.org/D33047 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.or

[clang-tools-extra] r303063 - Test commit(changed comment)

2017-05-15 Thread Ilya Biryukov via cfe-commits
Author: ibiryukov Date: Mon May 15 08:50:46 2017 New Revision: 303063 URL: http://llvm.org/viewvc/llvm-project?rev=303063&view=rev Log: Test commit(changed comment) Modified: clang-tools-extra/trunk/clangd/ASTManager.h Modified: clang-tools-extra/trunk/clangd/ASTManager.h URL: http://llvm.o

[PATCH] D33197: [libclang] [OpenCL] Expose more OpenCL CIndex types

2017-05-15 Thread Sven van Haastregt via Phabricator via cfe-commits
svenvh created this revision. Expose pipe, sampler_t, clk_event_t, queue_t, reserve_id_t, and all image types. Update the opencl-types.cl test RUN line such that we can test the OpenCL 2.0 types. Patch by Simon Perretta. https://reviews.llvm.org/D33197 Files: bindings/python

[clang-tools-extra] r303067 - [ClangD] Refactor clangd into separate components

2017-05-15 Thread Ilya Biryukov via cfe-commits
Author: ibiryukov Date: Mon May 15 09:17:35 2017 New Revision: 303067 URL: http://llvm.org/viewvc/llvm-project?rev=303067&view=rev Log: [ClangD] Refactor clangd into separate components Summary: Major refactoring to split LSP implementation, Clang API calls and threading(mostly synchronization)

r303068 - [index] References to fields from template instantiations should refer to

2017-05-15 Thread Alex Lorenz via cfe-commits
Author: arphaman Date: Mon May 15 09:26:22 2017 New Revision: 303068 URL: http://llvm.org/viewvc/llvm-project?rev=303068&view=rev Log: [index] References to fields from template instantiations should refer to fields in base templates rdar://32197158 Added: cfe/trunk/test/Index/Core/index-ins

r303072 - [OpenCL] Emit function-scope variable in constant address space as static variable

2017-05-15 Thread Yaxun Liu via cfe-commits
Author: yaxunl Date: Mon May 15 09:47:47 2017 New Revision: 303072 URL: http://llvm.org/viewvc/llvm-project?rev=303072&view=rev Log: [OpenCL] Emit function-scope variable in constant address space as static variable Differential Revision: https://reviews.llvm.org/D32977 Modified: cfe/trunk/

[PATCH] D32977: [OpenCL] Emit function-scope variable in constant address space as static variable

2017-05-15 Thread Yaxun Liu via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL303072: [OpenCL] Emit function-scope variable in constant address space as static… (authored by yaxunl). Changed prior to commit: https://reviews.llvm.org/D32977?vs=98510&id=99007#toc Repository: rL

[PATCH] D33201: [ClangD] Refactor ProtocolHandlers to decouple them from ClangdLSPServer

2017-05-15 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov updated this revision to Diff 99009. ilya-biryukov added a comment. Fixed a typo in a comment https://reviews.llvm.org/D33201 Files: clangd/ClangdLSPServer.cpp clangd/ClangdLSPServer.h clangd/ClangdMain.cpp clangd/ClangdServer.cpp clangd/ClangdServer.h clangd/JSONRPCDi

[PATCH] D33029: [clang-format] add option for dangling parenthesis

2017-05-15 Thread Ryan Stringham via Phabricator via cfe-commits
stringham added a comment. > Probably all of the examples from the original patch description and later > comments should be turned into unit tests. I would like to add some unit tests for this, but was not able to figure out how to run the unit test suite. Where can I find instructions on how

[PATCH] D33029: [clang-format] add option for dangling parenthesis

2017-05-15 Thread Ryan Stringham via Phabricator via cfe-commits
stringham updated this revision to Diff 99010. stringham added a comment. Generated the documentation using dump_format_style.py removed some unnecessary braces. https://reviews.llvm.org/D33029 Files: docs/ClangFormatStyleOptions.rst include/clang/Format/Format.h lib/Format/ContinuationI

[PATCH] D33010: Make google-build-using-namespace skip std::.*literals

2017-05-15 Thread Martin Ejdestig via Phabricator via cfe-commits
marejde updated this revision to Diff 99011. marejde added a comment. Modified isStdLiteralsNamespace() to be a static method. https://reviews.llvm.org/D33010 Files: clang-tidy/google/UsingNamespaceDirectiveCheck.cpp clang-tidy/google/UsingNamespaceDirectiveCheck.h test/clang-tidy/google-

[PATCH] D33010: Make google-build-using-namespace skip std::.*literals

2017-05-15 Thread Martin Ejdestig via Phabricator via cfe-commits
marejde added a comment. > Do you need me to commit the patch for you? Yes please. I do not have commit access. Comment at: clang-tidy/google/UsingNamespaceDirectiveCheck.cpp:48 +bool UsingNamespaceDirectiveCheck::isStdLiteralsNamespace( +const NamespaceDecl *NS) { -

[PATCH] D32248: CodeGen: Cast alloca to expected address space

2017-05-15 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl updated this revision to Diff 99014. yaxunl added a comment. Removed adjustAddrSpaceForAutoVar and use performAddrSpaceCast instead. https://reviews.llvm.org/D32248 Files: include/clang/AST/Type.h lib/CodeGen/CGDecl.cpp lib/CodeGen/CGExprScalar.cpp lib/CodeGen/CodeGenTypes.cpp

[PATCH] D32896: [OpenCL] Make CLK_NULL_RESERVE_ID invalid reserve id.

2017-05-15 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added inline comments. Comment at: lib/Headers/opencl-c.h:16020 +// The macro CLK_NULL_RESERVE_ID refers to an invalid reservation ID. +#define CLK_NULL_RESERVE_ID (__builtin_astype((void *)0, reserve_id_t)) bool __ovld is_valid_reserve_id(reserve_id_t reserve_id); ---

r303077 - [OPENMP] Check DSA for variables captured by value.

2017-05-15 Thread Alexey Bataev via cfe-commits
Author: abataev Date: Mon May 15 11:26:15 2017 New Revision: 303077 URL: http://llvm.org/viewvc/llvm-project?rev=303077&view=rev Log: [OPENMP] Check DSA for variables captured by value. Currently clang checks for default data sharing attributes only for variables captured in OpenMP regions by ref

[PATCH] D32896: [OpenCL] Make CLK_NULL_RESERVE_ID invalid reserve id.

2017-05-15 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added inline comments. Comment at: lib/Headers/opencl-c.h:16020 +// The macro CLK_NULL_RESERVE_ID refers to an invalid reservation ID. +#define CLK_NULL_RESERVE_ID (__builtin_astype((void *)0, reserve_id_t)) bool __ovld is_valid_reserve_id(reserve_id_t reserve_id); --

[clang-tools-extra] r303078 - Fix windows buildbots - missing include and namespace

2017-05-15 Thread Simon Pilgrim via cfe-commits
Author: rksimon Date: Mon May 15 11:36:11 2017 New Revision: 303078 URL: http://llvm.org/viewvc/llvm-project?rev=303078&view=rev Log: Fix windows buildbots - missing include and namespace Modified: clang-tools-extra/trunk/clangd/DraftStore.cpp clang-tools-extra/trunk/clangd/DraftStore.h

[PATCH] D31745: [OpenCL] Added diagnostic for implicit declaration of function in OpenCL

2017-05-15 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added inline comments. Comment at: lib/Sema/SemaDecl.cpp:12449 // function declaration is going to be treated as an error. - if (Diags.getDiagnosticLevel(diag_id, Loc) >= DiagnosticsEngine::Error) { + if (!getLangOpts().OpenCL && + Diags.getDiagnosticLevel(dia

[clang-tools-extra] r303081 - [clang-tidy] Partly rewrite readability-simplify-boolean-expr using RAV

2017-05-15 Thread Alexander Kornienko via cfe-commits
Author: alexfh Date: Mon May 15 12:06:51 2017 New Revision: 303081 URL: http://llvm.org/viewvc/llvm-project?rev=303081&view=rev Log: [clang-tidy] Partly rewrite readability-simplify-boolean-expr using RAV The check was using AST matchers in a very inefficient manner. By rewriting the BinaryOperat

Re: r302966 - Remove unused tracking of owning module for MacroInfo objects.

2017-05-15 Thread Jordan Rose via cfe-commits
Hi, Richard. Swift was using this information in order to put imported macros in a particular context. It wouldn't surprise me to hear that we were doing it wrong, and that there's a better way to go from a macro back to a module, but is there a recommended replacement? Thanks, Jordan > On Ma

Re: r261774 - Bail on compilation as soon as a job fails.

2017-05-15 Thread Steven Wu via cfe-commits
Hi Nico Now that r262420 is landed. Is there any plan to move CUDA to the new approach so we can fix the UNIX conformance test? Thanks Steven > On Apr 22, 2017, at 8:08 PM, Nico Weber via cfe-commits > wrote: > > On Sat, Apr 22, 2017 at 8:40 PM, Duncan P. N. Exon Smith via cfe-commits > ma

[PATCH] D32977: [OpenCL] Emit function-scope variable in constant address space as static variable

2017-05-15 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added inline comments. Comment at: lib/Sema/SemaDecl.cpp:10286 + // these variables must be a compile time constant. + VDecl->getType().getAddressSpace() == LangAS::opencl_constant) CheckForConstantInitializer(Init, DclT); yax

[PATCH] D30295: [analyzer] clarify undef shift result when shift count is negative or exceeds the bit width

2017-05-15 Thread Daniel Marjamäki via Phabricator via cfe-commits
danielmarjamaki updated this revision to Diff 99022. danielmarjamaki added a comment. renamed exprComparesTo to svalComparesTo Repository: rL LLVM https://reviews.llvm.org/D30295 Files: include/clang/StaticAnalyzer/Core/PathSensitive/CheckerHelpers.h lib/StaticAnalyzer/Checkers/Conversio

[clang-tools-extra] r303085 - Make google-build-using-namespace skip std::.*literals

2017-05-15 Thread Alexander Kornienko via cfe-commits
Author: alexfh Date: Mon May 15 12:37:48 2017 New Revision: 303085 URL: http://llvm.org/viewvc/llvm-project?rev=303085&view=rev Log: Make google-build-using-namespace skip std::.*literals Summary: C++14 added a couple of user-defined literals in the standard library. E.g. std::chrono_literals and

[PATCH] D33010: Make google-build-using-namespace skip std::.*literals

2017-05-15 Thread Alexander Kornienko via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL303085: Make google-build-using-namespace skip std::.*literals (authored by alexfh). Changed prior to commit: https://reviews.llvm.org/D33010?vs=99011&id=99025#toc Repository: rL LLVM https://review

[PATCH] D32248: CodeGen: Cast alloca to expected address space

2017-05-15 Thread Tony Tye via Phabricator via cfe-commits
t-tye added inline comments. Comment at: lib/CodeGen/CGDecl.cpp:1115 + assert(T.getAddressSpace() == LangAS::Default || + T.getQualifiers().hasTargetSpecificAddressSpace()); + auto Addr = getTargetHooks().performAddrSpaceCast(*this, Should allowing spec

[PATCH] D32248: CodeGen: Cast alloca to expected address space

2017-05-15 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl marked 2 inline comments as done. yaxunl added inline comments. Comment at: lib/CodeGen/CGDecl.cpp:1115 + assert(T.getAddressSpace() == LangAS::Default || + T.getQualifiers().hasTargetSpecificAddressSpace()); + auto Addr = getTargetHooks().performAddrSpaceCast(*t

[clang-tools-extra] r303094 - Revert "[ClangD] Refactor clangd into separate components"

2017-05-15 Thread Adam Nemet via cfe-commits
Author: anemet Date: Mon May 15 13:14:35 2017 New Revision: 303094 URL: http://llvm.org/viewvc/llvm-project?rev=303094&view=rev Log: Revert "[ClangD] Refactor clangd into separate components" This reverts commit r303067. Caused http://green.lab.llvm.org/green/job/clang-stage1-configure-RA/34305/

[clang-tools-extra] r303093 - Revert "Fix windows buildbots - missing include and namespace"

2017-05-15 Thread Adam Nemet via cfe-commits
Author: anemet Date: Mon May 15 13:14:31 2017 New Revision: 303093 URL: http://llvm.org/viewvc/llvm-project?rev=303093&view=rev Log: Revert "Fix windows buildbots - missing include and namespace" This reverts commit r303078. One test is still failing even after this: http://green.lab.llvm.org/gr

[PATCH] D33207: Fix an assertion failure in FormatASTNodeDiagnosticArgument.

2017-05-15 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh created this revision. The test being added in this patch used to cause an assertion failure: /build/./bin/clang -cc1 -internal-isystem /build/lib/clang/5.0.0/include -nostdsysteminc -verify -fsyntax-only -std=c++11 -Wshadow-all /src/tools/clang/test/SemaCXX/warn-shadow.cpp -

[PATCH] D33207: Fix an assertion failure in FormatASTNodeDiagnosticArgument.

2017-05-15 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh added a comment. The patch is trivial, I'm mostly wondering about the wording and whether we want to expand the "linkage specification" to specify whether it is `extern "C"` or `extern "C++"`, for example. https://reviews.llvm.org/D33207 __

[clang-tools-extra] r303095 - [clang-tidy] Fix a typo: dequeue => deque

2017-05-15 Thread Haojian Wu via cfe-commits
Author: hokein Date: Mon May 15 13:18:28 2017 New Revision: 303095 URL: http://llvm.org/viewvc/llvm-project?rev=303095&view=rev Log: [clang-tidy] Fix a typo: dequeue => deque Modified: clang-tools-extra/trunk/clang-tidy/performance/InefficientVectorOperationCheck.cpp Modified: clang-tools-

[PATCH] D32248: CodeGen: Cast alloca to expected address space

2017-05-15 Thread John McCall via Phabricator via cfe-commits
rjmccall added inline comments. Comment at: lib/CodeGen/CGDecl.cpp:1115 + assert(T.getAddressSpace() == LangAS::Default || + T.getQualifiers().hasTargetSpecificAddressSpace()); + auto Addr = getTargetHooks().performAddrSpaceCast(*this, yaxunl wrote: > t

Re: r261774 - Bail on compilation as soon as a job fails.

2017-05-15 Thread Nico Weber via cfe-commits
r262420 landed in a way adapted to Justin's change. An earlier version of https://reviews.llvm.org/D17695 had a different approach. I don't know if that approach could be used for CUDA. Justin should reply here. On Mon, May 15, 2017 at 1:32 PM, Steven Wu wrote: > Hi Nico > > Now that r262420 is

[PATCH] D32977: [OpenCL] Emit function-scope variable in constant address space as static variable

2017-05-15 Thread John McCall via Phabricator via cfe-commits
rjmccall added inline comments. Comment at: lib/Sema/SemaDecl.cpp:10286 + // these variables must be a compile time constant. + VDecl->getType().getAddressSpace() == LangAS::opencl_constant) CheckForConstantInitializer(Init, DclT); Anas

r303106 - clang-format: [JS] for async loops.

2017-05-15 Thread Martin Probst via cfe-commits
Author: mprobst Date: Mon May 15 14:33:20 2017 New Revision: 303106 URL: http://llvm.org/viewvc/llvm-project?rev=303106&view=rev Log: clang-format: [JS] for async loops. Summary: JavaScript supports asynchronous loop iteration in async functions: for async (const x of y) ... Reviewers: djas

[PATCH] D33193: clang-format: [JS] for async loops.

2017-05-15 Thread Martin Probst via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. mprobst marked an inline comment as done. Closed by commit rL303106: clang-format: [JS] for async loops. (authored by mprobst). Changed prior to commit: https://reviews.llvm.org/D33193?vs=98997&id=99048#toc Repository:

RE: r302935 - [Sema] Support implicit scalar to vector conversions

2017-05-15 Thread Simon Dardis via cfe-commits
Thanks, I'll try and look at this tomorrow. Simon From: Vitaly Buka [vitalyb...@google.com] Sent: 15 May 2017 20:57 To: Simon Dardis; cfe-commits@lists.llvm.org Subject: Re: r302935 - [Sema] Support implicit scalar to vector conversions From ubsan bot: http://lab.llvm.org:8011/builders/s

[PATCH] D33207: Fix an assertion failure in FormatASTNodeDiagnosticArgument.

2017-05-15 Thread Richard Smith via Phabricator via cfe-commits
rsmith added inline comments. Comment at: test/SemaCXX/warn-shadow.cpp:214 +void handleLinkageSpec() { + typedef void externC; // expected-warning {{declaration shadows a typedef in linkage specification}} +} We should be producing a diagnostic talking about th

[PATCH] D32248: CodeGen: Cast alloca to expected address space

2017-05-15 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl updated this revision to Diff 99056. yaxunl marked an inline comment as done. yaxunl added a comment. diagnose automatic var with invalid addr space for OpenCL. https://reviews.llvm.org/D32248 Files: include/clang/AST/Type.h include/clang/Basic/DiagnosticSemaKinds.td lib/CodeGen/CG

[PATCH] D31885: Remove TBAA information from LValues representing union members

2017-05-15 Thread Krzysztof Parzyszek via Phabricator via cfe-commits
kparzysz added a comment. In https://reviews.llvm.org/D31885#751164, @rjmccall wrote: > The right fix is probably just to make sure that EmitLValueForField doesn't > add TBAA information when the base LValue doesn't have it. That will also > fix problems with recursive member access where the

[PATCH] D32248: CodeGen: Cast alloca to expected address space

2017-05-15 Thread John McCall via Phabricator via cfe-commits
rjmccall added inline comments. Comment at: lib/Sema/SemaDecl.cpp:7210 + return; +} } err_opencl_function_variable seems like a better diagnostic, at least for opencl_global. You can fall back on this more general diagnostic for other address space

[PATCH] D31839: make -Winteger-overflow find overflows in function arguments

2017-05-15 Thread Nick Lewycky via Phabricator via cfe-commits
nlewycky added a comment. Ping! https://reviews.llvm.org/D31839 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

r303114 - [asan] One more test for -fsanitize-address-globals-dead-stripping.

2017-05-15 Thread Evgeniy Stepanov via cfe-commits
Author: eugenis Date: Mon May 15 15:43:48 2017 New Revision: 303114 URL: http://llvm.org/viewvc/llvm-project?rev=303114&view=rev Log: [asan] One more test for -fsanitize-address-globals-dead-stripping. Added: cfe/trunk/test/CodeGen/asan-no-globals-no-comdat.cpp Added: cfe/trunk/test/CodeGen/

[PATCH] D31885: Remove TBAA information from LValues representing union members

2017-05-15 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. In https://reviews.llvm.org/D31885#755456, @kparzysz wrote: > In https://reviews.llvm.org/D31885#751164, @rjmccall wrote: > > > The right fix is probably just to make sure that EmitLValueForField doesn't > > add TBAA information when the base LValue doesn't have it. Th

[PATCH] D32248: CodeGen: Cast alloca to expected address space

2017-05-15 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl updated this revision to Diff 99061. yaxunl added a comment. Fix diagnostic for global addr https://reviews.llvm.org/D32248 Files: include/clang/AST/Type.h include/clang/Basic/DiagnosticSemaKinds.td lib/CodeGen/CGDecl.cpp lib/CodeGen/CGExprScalar.cpp lib/CodeGen/CodeGenTypes.cp

[PATCH] D33214: [libcxx] [test] Workaround C1XX bug in uses_allocator_types.hpp

2017-05-15 Thread Casey Carter via Phabricator via cfe-commits
CaseyCarter created this revision. Needed by IIRC allocator.adaptor\allocator.adaptor.members\construct_pair.pass.cpp. https://reviews.llvm.org/D33214 Files: test/support/test.workarounds/c1xx_empty_parameter_pack_expansion.pass.cpp test/support/test_workarounds.h test/support/uses_alloc

[PATCH] D33209: [clang-tidy] Add "emplace_back" detection in inefficient-vector-operation.

2017-05-15 Thread Malcolm Parsons via Phabricator via cfe-commits
malcolm.parsons added a subscriber: cfe-commits. malcolm.parsons added inline comments. Comment at: clang-tidy/performance/InefficientVectorOperationCheck.cpp:92 + const auto VectorAppendCall = expr( + anyOf(VectorAppendCallExpr, exprWithCleanups(has(VectorAppendCallExpr))

[PATCH] D33170: [X86] Adding avx512_vpopcntdq feature set and its intrinsics

2017-05-15 Thread Craig Topper via Phabricator via cfe-commits
craig.topper added inline comments. Comment at: lib/CodeGen/CGBuiltin.cpp:7526 +llvm::Type *ResultType = ConvertType(E->getType()); +Value *X = EmitScalarExpr(E->getArg(0)); +llvm::Function *F = CGM.getIntrinsic(Intrinsic::ctpop, ResultType); I'm not

[PATCH] D32248: CodeGen: Cast alloca to expected address space

2017-05-15 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. Looking good. We had some overlapping patches and comments there, so I want to make sure you didn't miss my comment on EmitAutoVarAlloca. Comment at: lib/Sema/SemaDecl.cpp:7205 +} +assert (T.getAddressSpace() != LangAS::opencl_constant); +

[PATCH] D32520: Support __fp16 vectors

2017-05-15 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak added a comment. ping https://reviews.llvm.org/D32520 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: r261774 - Bail on compilation as soon as a job fails.

2017-05-15 Thread Steven Wu via cfe-commits
The other option is to make this behavior configurable so that clang on UNIX behaves differently than clang-cl or CUDA. I am not sure what problem CUDA is hitting. Is there a test case for that? Steven > On May 15, 2017, at 12:42 PM, Nico Weber wrote: > > r262420 landed in a way adapted to Ju

Re: r261774 - Bail on compilation as soon as a job fails.

2017-05-15 Thread Justin Lebar via cfe-commits
> I don't know if that approach could be used for CUDA. Justin should reply > here. Sorry, I am not sure what the question is. Compiling a single CUDA file invokes clang -cc1 multiple times: Once for the host (i.e. CPU), and once for every GPU architecture we're targeting. We then take the outp

Re: r261774 - Bail on compilation as soon as a job fails.

2017-05-15 Thread Nico Weber via cfe-commits
test/Driver/cl-pch-errorhandling.cpp tests the clang-cl pch bits. On Mon, May 15, 2017 at 5:42 PM, Steven Wu wrote: > The other option is to make this behavior configurable so that clang on > UNIX behaves differently than clang-cl or CUDA. I am not sure what problem > CUDA is hitting. Is there a

[PATCH] D32146: PR32476: __nop_locale_mgmt.h not needed with newlib 2.5+

2017-05-15 Thread Orivej Desh via Phabricator via cfe-commits
orivej added inline comments. Comment at: include/support/newlib/xlocale.h:20 +#if defined(__NEWLIB__) && (__NEWLIB__ == 2) \ +&& defined(__NEWLIB_MINOR__) && (__NEWLIB_MINOR__ >= 5) \ +&& (!defined(__POSIX_VISIBLE) || (__POSIX_VISIBLE < 200809)) You mean

r303121 - [Sema] Use CK_NoOp instead CK_Invalid in tryGCCVectorConvertAndSplat

2017-05-15 Thread Vitaly Buka via cfe-commits
Author: vitalybuka Date: Mon May 15 17:04:03 2017 New Revision: 303121 URL: http://llvm.org/viewvc/llvm-project?rev=303121&view=rev Log: [Sema] Use CK_NoOp instead CK_Invalid in tryGCCVectorConvertAndSplat This fix UBSAN bots after r302935. Storing non-defined values in enum is undefined behavior

Re: r261774 - Bail on compilation as soon as a job fails.

2017-05-15 Thread Steven Wu via cfe-commits
> On May 15, 2017, at 3:03 PM, Nico Weber wrote: > > test/Driver/cl-pch-errorhandling.cpp tests the clang-cl pch bits. I don't think reverting r261774 will break any cl-pch tests (didn't try windows). That is why I wondering if there is any test case for CUDA so I don't break them when fixing

[PATCH] D33214: [libcxx] [test] Workaround C1XX bug in uses_allocator_types.hpp

2017-05-15 Thread Casey Carter via Phabricator via cfe-commits
CaseyCarter updated this revision to Diff 99086. CaseyCarter edited the summary of this revision. CaseyCarter added a comment. Silence warnings. https://reviews.llvm.org/D33214 Files: test/std/utilities/allocator.adaptor/allocator.adaptor.members/construct_pair.pass.cpp test/support/test.w

[PATCH] D31646: [coroutines] Build GRO declaration and return GRO statement

2017-05-15 Thread Gor Nishanov via Phabricator via cfe-commits
GorNishanov added a comment. Half-monthly ping https://reviews.llvm.org/D31646 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D31608: [coroutines] Add emission of initial and final suspends

2017-05-15 Thread Gor Nishanov via Phabricator via cfe-commits
GorNishanov added a comment. soft ping https://reviews.llvm.org/D31608 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D32248: CodeGen: Cast alloca to expected address space

2017-05-15 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl updated this revision to Diff 99094. yaxunl added a comment. Fix format. https://reviews.llvm.org/D32248 Files: include/clang/AST/Type.h include/clang/Basic/DiagnosticSemaKinds.td lib/CodeGen/CGDecl.cpp lib/CodeGen/CGExprScalar.cpp lib/CodeGen/CodeGenTypes.cpp lib/CodeGen/Tar

[PATCH] D32248: CodeGen: Cast alloca to expected address space

2017-05-15 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added inline comments. Comment at: lib/CodeGen/CGDecl.cpp:1119 + T.getAddressSpace(), address.getPointer()->getType()-> + getPointerElementType()->getPointerTo(getContext().getTargetAddressSpace( + T.getAddressSpace())), true); rjmccall

[PATCH] D32248: CodeGen: Cast alloca to expected address space

2017-05-15 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl updated this revision to Diff 99099. yaxunl added a comment. Revised by John's comments. https://reviews.llvm.org/D32248 Files: include/clang/AST/Type.h include/clang/Basic/DiagnosticSemaKinds.td lib/CodeGen/CGDecl.cpp lib/CodeGen/CGExprScalar.cpp lib/CodeGen/CodeGenModule.cpp

[clang-tools-extra] r303139 - [clang-tidy] modernize-use-emplace: Remove unnecessary make_tuple calls

2017-05-15 Thread Jakub Kuderski via cfe-commits
Author: kuhar Date: Mon May 15 23:25:42 2017 New Revision: 303139 URL: http://llvm.org/viewvc/llvm-project?rev=303139&view=rev Log: [clang-tidy] modernize-use-emplace: Remove unnecessary make_tuple calls Summary: This patch makes modernize-use-emplace remove unnecessary make_ calls from push_bac

[PATCH] D32690: [clang-tidy] modernize-use-emplace: Remove unnecessary make_tuple calls

2017-05-15 Thread Jakub Kuderski via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL303139: [clang-tidy] modernize-use-emplace: Remove unnecessary make_tuple calls (authored by kuhar). Changed prior to commit: https://reviews.llvm.org/D32690?vs=98073&id=99100#toc Repository: rL LLVM

[clang-tools-extra] r303140 - Revert "[clang-tidy] modernize-use-emplace: Remove unnecessary make_tuple calls"

2017-05-15 Thread Jakub Kuderski via cfe-commits
Author: kuhar Date: Tue May 16 00:07:40 2017 New Revision: 303140 URL: http://llvm.org/viewvc/llvm-project?rev=303140&view=rev Log: Revert "[clang-tidy] modernize-use-emplace: Remove unnecessary make_tuple calls" This reverts commit r303139. The commit made docs build emit a warning. Modified:

[PATCH] D32690: [clang-tidy] modernize-use-emplace: Remove unnecessary make_tuple calls

2017-05-15 Thread Jakub Kuderski via Phabricator via cfe-commits
kuhar updated this revision to Diff 99103. kuhar added a comment. The patch broke the spinx docs build and I had to revert it in r303140. I fixed the docs file problems. Repository: rL LLVM https://reviews.llvm.org/D32690 Files: clang-tidy/modernize/UseEmplaceCheck.cpp clang-tidy/moderni

[clang-tools-extra] r303145 - [clang-tidy] modernize-use-emplace: Remove unnecessary make_tuple calls

2017-05-15 Thread Jakub Kuderski via cfe-commits
Author: kuhar Date: Tue May 16 01:32:38 2017 New Revision: 303145 URL: http://llvm.org/viewvc/llvm-project?rev=303145&view=rev Log: [clang-tidy] modernize-use-emplace: Remove unnecessary make_tuple calls Summary: This patch makes modernize-use-emplace remove unnecessary make_ calls from push_bac