[PATCH] D29758: [OpenMP] Parallel reduction on the NVPTX device.

2017-02-13 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev accepted this revision. ABataev added a comment. This revision is now accepted and ready to land. LG https://reviews.llvm.org/D29758 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-c

[PATCH] D29879: [OpenMP] Teams reduction on the NVPTX device.

2017-02-13 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added a comment. General note: Be more strict with the types. For indeces it's better to use `SizeTy` or `UintPtrTy`, if `Int32Ty` is specified as type of parameter, use `Int32y`, not `IntTy` Comment at: lib/CodeGen/CGOpenMPRuntimeNVPTX.cpp:725 +

[PATCH] D29884: [analyzer] Proper caching in CallDescription objects.

2017-02-13 Thread Gábor Horváth via Phabricator via cfe-commits
xazax.hun created this revision. During the review of https://reviews.llvm.org/D29567 it turned out the caching in CallDescription is not implemented properly. In case an identifier does not exist in a translation unit, repeated identifier lookups will be done which might have bad impact on the

[PATCH] D19105: Changes in clang after running http://reviews.llvm.org/D18821

2017-02-13 Thread Piotr Padlewski via Phabricator via cfe-commits
Prazek abandoned this revision. Prazek added inline comments. Comment at: lib/CodeGen/SplitKit.h:298 - typedef PointerIntPair ValueForcePair; + typedef PointerIntPair ValueForcePair; typedef DenseMap, ValueForcePair> ValueMap; alexfh wrote: > Is it an auto

[PATCH] D28365: [Driver] Updated for Visual Studio 2017

2017-02-13 Thread Hamza Sood via Phabricator via cfe-commits
hamzasood added a comment. In https://reviews.llvm.org/D28365#665408, @rnk wrote: > Doesn't your fix mean that the tests will fail on a Windows machine that > doesn't have VS because LLVM was built with mingw? Usually in these > situations we provide some way to provide a fake toolchain. I'm

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

2017-02-13 Thread Benjamin Kramer via Phabricator via cfe-commits
bkramer created this revision. Herald added a subscriber: mgorny. This requires an accessible compilation database. The parsing is done asynchronously on a separate thread. https://reviews.llvm.org/D29886 Files: clangd/ASTManager.cpp clangd/ASTManager.h clangd/CMakeLists.txt clangd/Clan

[PATCH] D23427: [Clang-tidy] Comparison Misuse

2017-02-13 Thread Gábor Horváth via Phabricator via cfe-commits
xazax.hun abandoned this revision. xazax.hun added a comment. For the first case ToT clang compiler gives a warning (-Wstring-compare), for the second case, it generates a compiler error (error: ordered comparison between pointer and zero). Note that, older versions of clang did not even give a

[PATCH] D23423: [Clang-tidy] Comparison Function Address

2017-02-13 Thread Gábor Horváth via Phabricator via cfe-commits
xazax.hun abandoned this revision. xazax.hun added a comment. -Wtautological-pointer-compare already covers this case. Repository: rL LLVM https://reviews.llvm.org/D23423 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.o

[PATCH] D19586: Misleading Indentation check

2017-02-13 Thread Gábor Horváth via Phabricator via cfe-commits
xazax.hun commandeered this revision. xazax.hun edited reviewers, added: Pajesz; removed: xazax.hun. xazax.hun added a comment. Herald added a subscriber: mgorny. The original author is no longer available. https://reviews.llvm.org/D19586 ___ cfe-co

[PATCH] D19586: Misleading Indentation check

2017-02-13 Thread Gábor Horváth via Phabricator via cfe-commits
xazax.hun updated this revision to Diff 88182. xazax.hun added a comment. - Updated to latest trunk. - Mentioned check in the release notes. - Documented the limitation that tabs and spaces need to be consistent for this check to work. - Fixed (hopefully all) review comments. - Fixed the test cas

[PATCH] D19586: Misleading Indentation check

2017-02-13 Thread Gábor Horváth via Phabricator via cfe-commits
xazax.hun marked 13 inline comments as done. xazax.hun added inline comments. Comment at: clang-tidy/readability/MisleadingIndentationCheck.cpp:20 + +void MisleadingIndentationCheck::danglingElseCheck( +const MatchFinder::MatchResult &Result) { danielmarjamak

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

2017-02-13 Thread Sanne Wouda via Phabricator via cfe-commits
sanwou01 updated this revision to Diff 88188. sanwou01 added a comment. 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, I think this test is usefu

[PATCH] D29757: [libcxx] Threading support: Externalize hardware_concurrency()

2017-02-13 Thread Asiri Rathnayake via Phabricator via cfe-commits
rmaprath updated this revision to Diff 88189. rmaprath retitled this revision from "Threading support: Externalize hardware_concurrency()" to "[libcxx] Threading support: Externalize hardware_concurrency()". rmaprath added a comment. Re-based on trunk. https://reviews.llvm.org/D29757 Files:

[PATCH] D29818: [libcxx] Threading support: Attempt to externalize system_clock::now() and steady_clock::now() implementations

2017-02-13 Thread Asiri Rathnayake via Phabricator via cfe-commits
rmaprath updated this revision to Diff 88190. rmaprath added a comment. Re-based. https://reviews.llvm.org/D29818 Files: include/__threading_support src/chrono.cpp Index: src/chrono.cpp === --- src/chrono.cpp +++ src/chrono.cp

[PATCH] D29839: [clang-tidy] New misc-istream-overflow check

2017-02-13 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In https://reviews.llvm.org/D29839#674714, @cryptoad wrote: > So if I understand correctly, the consensus is to abandon this and rewrite it > to be part of the clang static analyzer? That's correct. https://reviews.llvm.org/D29839 ___

[PATCH] D29830: [OpenCL][Doc] Relase 4.0 notes for OpenCL

2017-02-13 Thread Pekka Jääskeläinen via Phabricator via cfe-commits
pekka.jaaskelainen accepted this revision. pekka.jaaskelainen added a comment. LGTM. https://reviews.llvm.org/D29830 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[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 updated this revision to Diff 88198. aaron.ballman added a comment. Fixed review feedback https://reviews.llvm.org/D29868 Files: include/clang/Basic/DiagnosticParseKinds.td lib/Parse/ParseDecl.cpp test/Parser/declspec-recovery.c test/Parser/declspec-supported.c Index: te

[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

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] 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) ---

[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

[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

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

[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

[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) +

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] 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

[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

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] 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

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] 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 ==

[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] 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] 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] 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] 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] 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 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] 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 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

[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] 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

[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://

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

[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

[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

[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] 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] 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] 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] 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] 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] 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] 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] 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] 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] 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'

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] 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

[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

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] 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

[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] 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] 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] 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] 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] 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] 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] 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] 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] 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] 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] 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] 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] 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] 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] 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

[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] 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

[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] 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 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

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] 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

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] 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

[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

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] 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

[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

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] 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

[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

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

  1   2   >