[PATCH] D43766: [clang-tidy][modernize-make-unique] Checks c++14 flag before using std::make_unique

2018-02-28 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang-tidy/modernize/MakeUniqueCheck.cpp:21 +: MakeSmartPtrCheck(Name, Context, "std::make_unique"), + MinimumLanguageVersion(Options.get("MakeUniqueLanguageVersion", +

[PATCH] D43842: CodeGenObjCXX: handle inalloca appropriately for msgSend variant

2018-02-28 Thread Shoaib Meenai via Phabricator via cfe-commits
smeenai added a comment. In https://reviews.llvm.org/D43842#1022498, @rjmccall wrote: > Ugh, I hate `inalloca` *so much*. > > It's still an indirect return, right? It's just that the return-slot pointer > has to get stored to the `inalloca` allocation like any other argument? Correct.

[PATCH] D43842: CodeGenObjCXX: handle inalloca appropriately for msgSend variant

2018-02-28 Thread Saleem Abdulrasool via Phabricator via cfe-commits
compnerd added a comment. Yeah, this is still an indirect return. I can see your point about the representation, nfortunately, I think that change is way out of scope for this. That would be a pretty large and invasive change to wire that through. Repository: rC Clang

[clang-tools-extra] r326365 - [clangd] Try to fix failures on clang-x64-ninja-win7 build bot.

2018-02-28 Thread Eric Liu via cfe-commits
Author: ioeric Date: Wed Feb 28 12:31:00 2018 New Revision: 326365 URL: http://llvm.org/viewvc/llvm-project?rev=326365=rev Log: [clangd] Try to fix failures on clang-x64-ninja-win7 build bot. Modified: clang-tools-extra/trunk/test/clangd/crash-non-added-files.test

[PATCH] D43852: [OpenMP] Extend NVPTX SPMD implementation of combined constructs

2018-02-28 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL326368: [OpenMP] Extend NVPTX SPMD implementation of combined constructs (authored by cbertol, committed by ). Herald added a subscriber: llvm-commits. Changed prior to commit:

[PATCH] D43870: [clang-tidy] Another batch of checks to rename from misc- to bugprone-.

2018-02-28 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: docs/ReleaseNotes.rst:60 +- The 'misc-undelegated-constructor' check was renamed to `bugprone-undelegated-constructor + `_

[PATCH] D35068: [analyzer] Detect usages of unsafe I/O functions

2018-02-28 Thread George Karpenkov via Phabricator via cfe-commits
george.karpenkov added inline comments. Comment at: lib/StaticAnalyzer/Checkers/CheckSecuritySyntaxOnly.cpp:100 void checkCall_strcat(const CallExpr *CE, const FunctionDecl *FD); + void checkDeprecatedOrUnsafeBufferHandling(const CallExpr *CE, const FunctionDecl *FD);

[PATCH] D39562: [CodeGen][ObjC] Fix an assertion failure caused by copy elision

2018-02-28 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak added a comment. I'm planning to work on a new patch this week. https://reviews.llvm.org/D39562 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D43888: [clang-cl] Implement /X

2018-02-28 Thread Nico Weber via Phabricator via cfe-commits
thakis created this revision. thakis added a reviewer: hans. /X makes cl stop looking in %INCLUDE%. Implement this for clang-cl. As it turns out, the return in ToolChains/MSVC.cpp, AddClangSystemIncludeArgs() for -nostdlibinc is already in the right place (but -nostdlibinc isn't exposed by

[clang-tools-extra] r326354 - [Documentation] Split Clang-tidy changes in Release Notes into sections: new checks, new aliases, renamed checks; sort all of them alphabetically. Enforce 80 characters l

2018-02-28 Thread Eugene Zelenko via cfe-commits
Author: eugenezelenko Date: Wed Feb 28 11:15:49 2018 New Revision: 326354 URL: http://llvm.org/viewvc/llvm-project?rev=326354=rev Log: [Documentation] Split Clang-tidy changes in Release Notes into sections: new checks, new aliases, renamed checks; sort all of them alphabetically. Enforce 80

[PATCH] D41102: Setup clang-doc frontend framework

2018-02-28 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added a comment. Thank you for working on this! Some more review notes. Please look into adding a bit more tests. Comment at: clang-doc/BitcodeWriter.cpp:179 + assert(Inits.size() == RecordIdCount); + for (const auto : Inits) RecordIdNameMap[Init.first] =

[PATCH] D43804: [analyzer] Enable cfg-temporary-dtors by default?

2018-02-28 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added a comment. That's right, most analyzer-oriented tests were added explicitly by me to `temporaries.cpp` and `lifetime-extension.cpp` in previous patches, so they didn't need to be changed in this patch. There didn't seem to be many FIXME tests specific to my work before i started

[PATCH] D43842: CodeGenObjCXX: handle inalloca appropriately for msgSend variant

2018-02-28 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. Okay. In that case, this seems correct, although it seems to me that perhaps `inalloca` is not actually orthogonal to anything else. In fact, it seems to me that maybe `inalloca` ought to just be a bit on the CGFunctionInfo and the individual ABIInfos should be left

[PATCH] D43842: CodeGenObjCXX: handle inalloca appropriately for msgSend variant

2018-02-28 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. Alright, yeah, we can fix that later. LGTM. Repository: rC Clang https://reviews.llvm.org/D43842 ___ cfe-commits mailing list

[PATCH] D42893: [libclang] Add clang_File_tryGetRealPathName

2018-02-28 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. ping Repository: rC Clang https://reviews.llvm.org/D42893 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

r326368 - [OpenMP] Extend NVPTX SPMD implementation of combined constructs

2018-02-28 Thread Carlo Bertolli via cfe-commits
Author: cbertol Date: Wed Feb 28 12:48:35 2018 New Revision: 326368 URL: http://llvm.org/viewvc/llvm-project?rev=326368=rev Log: [OpenMP] Extend NVPTX SPMD implementation of combined constructs Differential Revision: https://reviews.llvm.org/D43852 This patch extends the SPMD implementation to

[PATCH] D43162: [Parser] (C++) Make -Wextra-semi slightly more useful

2018-02-28 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added a comment. Thank you for the feedback! In https://reviews.llvm.org/D43162#1022427, @rsmith wrote: > This is the wrong way to deal with this. The only thing that should ever be > controlled by -W flags is whether the warnings in that group appear, not > whether warnings in

[PATCH] D30170: Function definition may have uninstantiated body

2018-02-28 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith accepted this revision. rsmith added inline comments. This revision is now accepted and ready to land. Comment at: include/clang/AST/Decl.h:1840 + /// there is one). + /// bool hasBody(const FunctionDecl *) const; Please remove trailing blank comment

r326355 - Fix gcc -Wreturn-type warnings after r326307.

2018-02-28 Thread Nico Weber via cfe-commits
Author: nico Date: Wed Feb 28 11:28:47 2018 New Revision: 326355 URL: http://llvm.org/viewvc/llvm-project?rev=326355=rev Log: Fix gcc -Wreturn-type warnings after r326307. Modified: cfe/trunk/lib/CodeGen/CGBlocks.cpp Modified: cfe/trunk/lib/CodeGen/CGBlocks.cpp URL:

[PATCH] D43841: Add an option to disable tail-call optimization for escaping blocks

2018-02-28 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. Can you explain the rationale for limiting this to escaping blocks in more depth? That seems like an extremely orthogonal limitation; the user might be thinking about a very specific block and not really considering this in general. https://reviews.llvm.org/D43841

[PATCH] D43842: CodeGenObjCXX: handle inalloca appropriately for msgSend variant

2018-02-28 Thread Saleem Abdulrasool via Phabricator via cfe-commits
compnerd closed this revision. compnerd added a comment. SVN r326362 Repository: rC Clang https://reviews.llvm.org/D43842 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

r326366 - [Hexagon] Add -ffixed-r19 driver option and translate it to +reserved-r19

2018-02-28 Thread Krzysztof Parzyszek via cfe-commits
Author: kparzysz Date: Wed Feb 28 12:31:55 2018 New Revision: 326366 URL: http://llvm.org/viewvc/llvm-project?rev=326366=rev Log: [Hexagon] Add -ffixed-r19 driver option and translate it to +reserved-r19 Modified: cfe/trunk/include/clang/Driver/Options.td

[PATCH] D43162: [Parser] (C++) Make -Wextra-semi slightly more useful

2018-02-28 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added a comment. This is the wrong way to deal with this. The only thing that should ever be controlled by -W flags is whether the warnings in that group appear, not whether warnings in other groups appear. The principle is that -W flags should behave "as if" they filter the diagnostic

[PATCH] D43842: CodeGenObjCXX: handle inalloca appropriately for msgSend variant

2018-02-28 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. Ugh, I hate `inalloca` *so much*. It's still an indirect return, right? It's just that the return-slot pointer has to get stored to the `inalloca` allocation like any other argument? Repository: rC Clang https://reviews.llvm.org/D43842

[PATCH] D43840: [CFG] [analyzer] Fix a crash on finding construction context for implicit constructor conversion.

2018-02-28 Thread George Karpenkov via Phabricator via cfe-commits
george.karpenkov accepted this revision. george.karpenkov added a comment. This revision is now accepted and ready to land. Should there be a FIXME note saying that other casts should be supported? Repository: rC Clang https://reviews.llvm.org/D43840

[PATCH] D43839: Add an option to disable tail-call optimization for escaping blocks

2018-02-28 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. Oh, sorry, somehow I missed that it was abandoned. https://reviews.llvm.org/D43839 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D43888: [clang-cl] Implement /X

2018-02-28 Thread Hans Wennborg via Phabricator via cfe-commits
hans accepted this revision. hans added a comment. This revision is now accepted and ready to land. lgtm Nicely tested too :-) https://reviews.llvm.org/D43888 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D43804: [analyzer] Enable cfg-temporary-dtors by default?

2018-02-28 Thread George Karpenkov via Phabricator via cfe-commits
george.karpenkov added a comment. Currently there's no test demonstrating a different behavior from `cfg-temporary-dtors` being set to true?.. Repository: rC Clang https://reviews.llvm.org/D43804 ___ cfe-commits mailing list

r326332 - Test commit access: apply clang-format suggestion

2018-02-28 Thread Joel E. Denny via cfe-commits
Author: jdenny Date: Wed Feb 28 08:57:33 2018 New Revision: 326332 URL: http://llvm.org/viewvc/llvm-project?rev=326332=rev Log: Test commit access: apply clang-format suggestion Modified: cfe/trunk/utils/TableGen/ClangAttrEmitter.cpp Modified: cfe/trunk/utils/TableGen/ClangAttrEmitter.cpp

[PATCH] D43841: Add an option to disable tail-call optimization for escaping blocks

2018-02-28 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak added a comment. This is limited to escaping blocks because disabling tail-call optimizations for all blocks might impact performance. The user is claiming that non-escaping blocks are often used in areas that are performance-sensitive (for example, dispatch_sync() and -[NSArray

[PATCH] D43839: Add an option to disable tail-call optimization for escaping blocks

2018-02-28 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. Abandon this one, then, please. https://reviews.llvm.org/D43839 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D30170: Function definition may have uninstantiated body

2018-02-28 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff added a comment. The issue is still observed in trunk. Other compilers process the tests correctly (checked using https://godbolt.org/). For instance, the code: template struct C20 { friend void func_20() {} // expected-note{{previous definition is here}} }; C20 c20i; void

[PATCH] D43888: [clang-cl] Implement /X

2018-02-28 Thread Nico Weber via Phabricator via cfe-commits
thakis closed this revision. thakis added a comment. r326357, thanks! https://reviews.llvm.org/D43888 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

r326357 - [clang-cl] Implement /X

2018-02-28 Thread Nico Weber via cfe-commits
Author: nico Date: Wed Feb 28 11:49:07 2018 New Revision: 326357 URL: http://llvm.org/viewvc/llvm-project?rev=326357=rev Log: [clang-cl] Implement /X /X makes cl stop looking in %INCLUDE%. Implement this for clang-cl. As it turns out, the return in ToolChains/MSVC.cpp,

r326362 - CodeGenObjCXX: handle inalloca appropriately for msgSend variant

2018-02-28 Thread Saleem Abdulrasool via cfe-commits
Author: compnerd Date: Wed Feb 28 12:16:12 2018 New Revision: 326362 URL: http://llvm.org/viewvc/llvm-project?rev=326362=rev Log: CodeGenObjCXX: handle inalloca appropriately for msgSend variant objc_msgSend_stret takes a hidden parameter for the returned structure's address for the

[PATCH] D43839: Add an option to disable tail-call optimization for escaping blocks

2018-02-28 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak added a comment. This one is abandoned. The new phab review is here: https://reviews.llvm.org/D43841 https://reviews.llvm.org/D43839 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

r326370 - Attempt to fix cl-include.c on Windows.

2018-02-28 Thread Nico Weber via cfe-commits
Author: nico Date: Wed Feb 28 12:58:06 2018 New Revision: 326370 URL: http://llvm.org/viewvc/llvm-project?rev=326370=rev Log: Attempt to fix cl-include.c on Windows. Modified: cfe/trunk/test/Driver/cl-include.c Modified: cfe/trunk/test/Driver/cl-include.c URL:

[PATCH] D43322: Diagnose cases of "return x" that should be "return std::move(x)" for efficiency

2018-02-28 Thread Arthur O'Dwyer via Phabricator via cfe-commits
Quuxplusone added inline comments. Comment at: include/clang/Basic/DiagnosticSemaKinds.td:5639 + "local variable %0 will be copied despite being %select{returned|thrown}1 by name">, + InGroup, DefaultIgnore; +def note_add_std_move : Note< I would like some

[PATCH] D43764: [clang-apply-replacements] Convert tooling::Replacements to tooling::AtomicChange for conflict resolving of changes, code cleanup, and code formatting.

2018-02-28 Thread Jeremy Demeule via Phabricator via cfe-commits
jdemeule added a comment. Thanks for your feedback, they are very precious to me! Comment at: clang-apply-replacements/include/clang-apply-replacements/Tooling/ApplyReplacements.h:45 +/// \brief Map mapping file name to AtomicChange targeting that file. +typedef

r326391 - Inline a trivial function. NFC.

2018-02-28 Thread Rafael Espindola via cfe-commits
Author: rafael Date: Wed Feb 28 16:00:02 2018 New Revision: 326391 URL: http://llvm.org/viewvc/llvm-project?rev=326391=rev Log: Inline a trivial function. NFC. Modified: cfe/trunk/lib/CodeGen/CGCXX.cpp cfe/trunk/lib/CodeGen/CodeGenModule.cpp cfe/trunk/lib/CodeGen/CodeGenModule.h

[PATCH] D43804: [analyzer] Enable cfg-temporary-dtors by default?

2018-02-28 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ updated this revision to Diff 136428. NoQ added a comment. Don't inline temporary destructors for now (i.e. keep `c++-temp-dtor-inlining=false`, previously it was by default irrelevant and arbitrarily set to true). That's because https://reviews.llvm.org/D43791 wasn't enough to handle all

[PATCH] D43734: [RecordLayout] Don't align to non-power-of-2 sizes when using -mms-bitfields

2018-02-28 Thread Eli Friedman via Phabricator via cfe-commits
efriedma added inline comments. Comment at: cfe/trunk/lib/AST/RecordLayoutBuilder.cpp:1758 + Context.getTargetInfo().getTriple().isWindowsGNUEnvironment()) && +"Non PowerOf2 size outside of GNU mode"); +if (TypeSize > FieldAlign &&

[PATCH] D43906: [clang-format] Improve detection of Objective-C block types

2018-02-28 Thread Ben Hamilton via Phabricator via cfe-commits
benhamilton created this revision. benhamilton added reviewers: krasimir, jolesiak. Herald added a subscriber: cfe-commits. Previously, clang-format would detect the following as an Objective-C block type: FOO(^); when it actually must be a C or C++ macro dealing with an XOR statement or an

[PATCH] D43905: [clang-format] Improve detection of ObjC for-in statements

2018-02-28 Thread Ben Hamilton via Phabricator via cfe-commits
benhamilton created this revision. benhamilton added reviewers: krasimir, jolesiak. Previously, clang-format would detect the following as an Objective-C for-in statement: for (int x = in.value(); ...) {} because the logic only decided a for-loop was definitely *not* an Objective-C for-in

[PATCH] D43905: [clang-format] Improve detection of ObjC for-in statements

2018-02-28 Thread Ben Hamilton via Phabricator via cfe-commits
benhamilton abandoned this revision. benhamilton added a comment. Whoops, sent out twice. Repository: rC Clang https://reviews.llvm.org/D43905 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D43851: Start setting dllimport/dllexport in setGVProperties

2018-02-28 Thread Eric Christopher via Phabricator via cfe-commits
echristo accepted this revision. echristo added a comment. This revision is now accepted and ready to land. Seems reasonable to me. https://reviews.llvm.org/D43851 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D42755: [libcxx] Fix last_write_time tests for filesystems that don't support very small times.

2018-02-28 Thread Volodymyr Sapsai via Phabricator via cfe-commits
vsapsai added a comment. I am going to commit this change as I've addressed the review comments. If anybody has anything else to add, we can discuss that in post-commit review. https://reviews.llvm.org/D42755 ___ cfe-commits mailing list

[PATCH] D43908: [RecordLayout] Only assert that fundamental type sizes are power of two on MSVC

2018-02-28 Thread Eli Friedman via Phabricator via cfe-commits
efriedma accepted this revision. efriedma added a comment. This revision is now accepted and ready to land. LGTM Repository: rC Clang https://reviews.llvm.org/D43908 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D43908: [RecordLayout] Only assert that fundamental type sizes are power of two on MSVC

2018-02-28 Thread Saleem Abdulrasool via Phabricator via cfe-commits
compnerd accepted this revision. compnerd added a comment. Ugh, really not a fan of this change. Repository: rC Clang https://reviews.llvm.org/D43908 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

r326397 - Start setting dllimport/dllexport in setGVProperties.

2018-02-28 Thread Rafael Espindola via cfe-commits
Author: rafael Date: Wed Feb 28 16:35:47 2018 New Revision: 326397 URL: http://llvm.org/viewvc/llvm-project?rev=326397=rev Log: Start setting dllimport/dllexport in setGVProperties. This is the next step in setting dso_local for COFF. The patches changes setGVProperties to first set

[PATCH] D43904: [clang-format] Improve detection of ObjC for-in statements

2018-02-28 Thread Ben Hamilton via Phabricator via cfe-commits
benhamilton created this revision. benhamilton added reviewers: krasimir, jolesiak. Herald added a subscriber: cfe-commits. Previously, clang-format would detect the following as an Objective-C for-in statement: for (int x = in.value(); ...) {} because the logic only decided a for-loop was

[PATCH] D43870: [clang-tidy] Another batch of checks to rename from misc- to bugprone-.

2018-02-28 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh marked an inline comment as done. alexfh added inline comments. Comment at: docs/ReleaseNotes.rst:60 +- The 'misc-undelegated-constructor' check was renamed to `bugprone-undelegated-constructor +

r326388 - Pass a GlobalDecl to setNonAliasAttributes. NFC.

2018-02-28 Thread Rafael Espindola via cfe-commits
Author: rafael Date: Wed Feb 28 15:54:23 2018 New Revision: 326388 URL: http://llvm.org/viewvc/llvm-project?rev=326388=rev Log: Pass a GlobalDecl to setNonAliasAttributes. NFC. Also part of D43900. Modified: cfe/trunk/lib/CodeGen/CodeGenModule.cpp cfe/trunk/lib/CodeGen/CodeGenModule.h

[PATCH] D43734: [RecordLayout] Don't align to non-power-of-2 sizes when using -mms-bitfields

2018-02-28 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo added inline comments. Comment at: cfe/trunk/lib/AST/RecordLayoutBuilder.cpp:1758 + Context.getTargetInfo().getTriple().isWindowsGNUEnvironment()) && +"Non PowerOf2 size outside of GNU mode"); +if (TypeSize > FieldAlign &&

[PATCH] D43902: [clang-format] Don't detect C++11 attribute specifiers as ObjC

2018-02-28 Thread Ben Hamilton via Phabricator via cfe-commits
benhamilton created this revision. benhamilton added reviewers: krasimir, jolesiak. Herald added a subscriber: cfe-commits. Previously, clang-format would detect C++11 and C++17 attribute specifiers like the following as Objective-C method invocations: [[noreturn]]; [[clang::fallthrough]];

[PATCH] D43842: CodeGenObjCXX: handle inalloca appropriately for msgSend variant

2018-02-28 Thread Reid Kleckner via Phabricator via cfe-commits
rnk added a comment. In https://reviews.llvm.org/D43842#1022546, @rjmccall wrote: > Okay. In that case, this seems correct, although it seems to me that perhaps > `inalloca` is not actually orthogonal to anything else. In fact, it seems to > me that maybe `inalloca` ought to just be a bit on

[PATCH] D43911: [AMDGPU] Clean up old address space mapping and fix constant address space value

2018-02-28 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl created this revision. yaxunl added reviewers: t-tye, b-sumner, arsenm. Herald added subscribers: tpr, dstuttard, nhaehnle, wdng, kzhuravl. https://reviews.llvm.org/D43911 Files: lib/Basic/Targets/AMDGPU.cpp lib/Basic/Targets/AMDGPU.h

[libcxx] r326383 - [libcxx] Fix last_write_time test for filesystems that don't support very small times.

2018-02-28 Thread Volodymyr Sapsai via cfe-commits
Author: vsapsai Date: Wed Feb 28 15:27:40 2018 New Revision: 326383 URL: http://llvm.org/viewvc/llvm-project?rev=326383=rev Log: [libcxx] Fix last_write_time test for filesystems that don't support very small times. APFS minimum supported file write time is -2^63 nanoseconds, which doesn't go

[PATCH] D42755: [libcxx] Fix last_write_time tests for filesystems that don't support very small times.

2018-02-28 Thread Volodymyr Sapsai via Phabricator via cfe-commits
This revision was not accepted when it landed; it landed in state "Needs Review". This revision was automatically updated to reflect the committed changes. Closed by commit rL326383: [libcxx] Fix last_write_time test for filesystems that dont support very small… (authored by vsapsai, committed

[PATCH] D43851: Start setting dllimport/dllexport in setGVProperties

2018-02-28 Thread Rafael Avila de Espindola via Phabricator via cfe-commits
espindola closed this revision. espindola added a comment. r326397 https://reviews.llvm.org/D43851 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D38216: [C++17] Fix class template argument deduction for default constructors without an initializer

2018-02-28 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith requested changes to this revision. rsmith added a comment. This revision now requires changes to proceed. Per [dcl.type.class.deduct]p1, only the initializing declaration of a variable can use a placeholder type. The existing diagnostic was correct in many of the modified cases.

[PATCH] D43840: [CFG] [analyzer] Fix a crash on finding construction context for implicit constructor conversion.

2018-02-28 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ updated this revision to Diff 136434. NoQ added a comment. Add the comment. https://reviews.llvm.org/D43840 Files: lib/Analysis/CFG.cpp test/Analysis/cfg-rich-constructors.cpp Index: test/Analysis/cfg-rich-constructors.cpp

[PATCH] D43322: Diagnose cases of "return x" that should be "return std::move(x)" for efficiency

2018-02-28 Thread Arthur O'Dwyer via Phabricator via cfe-commits
Quuxplusone added inline comments. Comment at: lib/Sema/SemaStmt.cpp:2937 +static void AttemptMoveInitialization(Sema& S, + const InitializedEntity , rtrieu wrote: > I have a few concerns about this function. The code

[PATCH] D43500: [clang-tidy]: modernize-use-default-member-init: Remove trailing comma and colon.

2018-02-28 Thread Jeremy Demeule via Phabricator via cfe-commits
jdemeule updated this revision to Diff 136389. jdemeule added a comment. Update after review. https://reviews.llvm.org/D43500 Files: unittests/clang-tidy/CMakeLists.txt unittests/clang-tidy/ClangTidyTest.h unittests/clang-tidy/ModernizerModuleTest.cpp Index:

[PATCH] D43868: Rename more checks from misc- to bugprone-.

2018-02-28 Thread Alexander Kornienko via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rCTE326384: Rename more checks from misc- to bugprone-. (authored by alexfh, committed by ). Changed prior to commit: https://reviews.llvm.org/D43868?vs=136277=136412#toc Repository: rCTE Clang Tools

[PATCH] D43868: Rename more checks from misc- to bugprone-.

2018-02-28 Thread Alexander Kornienko via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL326384: Rename more checks from misc- to bugprone-. (authored by alexfh, committed by ). Herald added a subscriber: llvm-commits. Changed prior to commit:

r326392 - Pass a GlobalDecl to SetCommonAttributes. NFC.

2018-02-28 Thread Rafael Espindola via cfe-commits
Author: rafael Date: Wed Feb 28 16:06:55 2018 New Revision: 326392 URL: http://llvm.org/viewvc/llvm-project?rev=326392=rev Log: Pass a GlobalDecl to SetCommonAttributes. NFC. Part of D43900. Modified: cfe/trunk/lib/CodeGen/CodeGenModule.cpp cfe/trunk/lib/CodeGen/CodeGenModule.h

[clang-tools-extra] r326384 - Rename more checks from misc- to bugprone-.

2018-02-28 Thread Alexander Kornienko via cfe-commits
Author: alexfh Date: Wed Feb 28 15:30:29 2018 New Revision: 326384 URL: http://llvm.org/viewvc/llvm-project?rev=326384=rev Log: Rename more checks from misc- to bugprone-. Summary: clang-tidy/rename_check.py {misc,bugprone}-string-integer-assignment clang-tidy/rename_check.py

[PATCH] D43898: Preliminary refactoring in service of -Wreturn-std-move. NFC.

2018-02-28 Thread Arthur O'Dwyer via Phabricator via cfe-commits
Quuxplusone created this revision. Quuxplusone added a reviewer: rtrieu. Herald added a subscriber: cfe-commits. This patch is extracted from https://reviews.llvm.org/D43322, which adds a new diagnostic `-Wreturn-std-move`. This patch here is just the non-functional parts of that patch. It

[PATCH] D43898: Preliminary refactoring in service of -Wreturn-std-move. NFC.

2018-02-28 Thread Arthur O'Dwyer via Phabricator via cfe-commits
Quuxplusone updated this revision to Diff 136380. Quuxplusone added a comment. Add a block comment for function `TryMoveInitialization`. Repository: rC Clang https://reviews.llvm.org/D43898 Files: include/clang/Sema/Sema.h lib/Sema/SemaExprCXX.cpp lib/Sema/SemaStmt.cpp

[PATCH] D43734: [RecordLayout] Don't align to non-power-of-2 sizes when using -mms-bitfields

2018-02-28 Thread Eli Friedman via Phabricator via cfe-commits
efriedma added inline comments. Comment at: cfe/trunk/lib/AST/RecordLayoutBuilder.cpp:1758 + Context.getTargetInfo().getTriple().isWindowsGNUEnvironment()) && +"Non PowerOf2 size outside of GNU mode"); +if (TypeSize > FieldAlign &&

[PATCH] D43322: Diagnose cases of "return x" that should be "return std::move(x)" for efficiency

2018-02-28 Thread Arthur O'Dwyer via Phabricator via cfe-commits
Quuxplusone updated this revision to Diff 136383. Quuxplusone added a comment. Rename some functions and parameters. Rebase onto https://reviews.llvm.org/D43898. Repository: rC Clang https://reviews.llvm.org/D43322 Files: include/clang/Basic/DiagnosticGroups.td

[PATCH] D43902: [clang-format] Don't detect C++11 attribute specifiers as ObjC

2018-02-28 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: lib/Format/TokenAnnotator.cpp:346 + bool parseCpp11AttributeSpecifier(FormatToken *Tok) { +if (!Style.isCpp()) return false; +if (!Tok || !Tok->startsSequence(tok::l_square, tok::l_square)) C can use this

[PATCH] D43902: [clang-format] Don't detect C++11 attribute specifiers as ObjC

2018-02-28 Thread Ben Hamilton via Phabricator via cfe-commits
benhamilton added inline comments. Comment at: lib/Format/TokenAnnotator.cpp:346 + bool parseCpp11AttributeSpecifier(FormatToken *Tok) { +if (!Style.isCpp()) return false; +if (!Tok || !Tok->startsSequence(tok::l_square, tok::l_square)) aaron.ballman

[PATCH] D43908: [RecordLayout] Only assert that fundamental type sizes are power of two on MSVC

2018-02-28 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo created this revision. mstorsjo added reviewers: efriedma, compnerd. This fixes using the ms_struct attribute together with long double on e.g. x86-32 linux. Repository: rC Clang https://reviews.llvm.org/D43908 Files: lib/AST/RecordLayoutBuilder.cpp

r326373 - [hwasan] update the asm snippet in the docs to match the current default behaviour

2018-02-28 Thread Kostya Serebryany via cfe-commits
Author: kcc Date: Wed Feb 28 13:58:19 2018 New Revision: 326373 URL: http://llvm.org/viewvc/llvm-project?rev=326373=rev Log: [hwasan] update the asm snippet in the docs to match the current default behaviour Modified: cfe/trunk/docs/HardwareAssistedAddressSanitizerDesign.rst Modified:

[clang-tools-extra] r326386 - [clang-tidy] Another batch of checks to rename from misc- to bugprone-.

2018-02-28 Thread Alexander Kornienko via cfe-commits
Author: alexfh Date: Wed Feb 28 15:47:15 2018 New Revision: 326386 URL: http://llvm.org/viewvc/llvm-project?rev=326386=rev Log: [clang-tidy] Another batch of checks to rename from misc- to bugprone-. Summary: clang-tidy/rename_check.py {misc,bugprone}-suspicious-semicolon

r326385 - Pass a GlobalDecl to SetInternalFunctionAttributes. NFC.

2018-02-28 Thread Rafael Espindola via cfe-commits
Author: rafael Date: Wed Feb 28 15:46:35 2018 New Revision: 326385 URL: http://llvm.org/viewvc/llvm-project?rev=326385=rev Log: Pass a GlobalDecl to SetInternalFunctionAttributes. NFC. This just reduces the noise in a followup patch. Part of D43900. Modified:

[PATCH] D43108: Support for the mno-stack-arg-probe flag

2018-02-28 Thread Amara Emerson via Phabricator via cfe-commits
aemerson added a comment. Can we clarify the meaning of this option a bit. The doc you've added here is saying that `-mno-stack-arg-probe` disables stack probes. Then what does `-mstack-arg-probe` mean specifically? Does it mean that only stack probes for ABI required reasons are enabled, or

[PATCH] D26350: Keep invalid Switch in the AST

2018-02-28 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added inline comments. Comment at: lib/Sema/SemaStmt.cpp:823 + CondExpr->isValueDependent() || + isa(CondExpr); + unsigned CondWidth = It's fragile to assume that the only way you can see

[PATCH] D43804: [analyzer] Enable cfg-temporary-dtors by default?

2018-02-28 Thread Devin Coughlin via Phabricator via cfe-commits
dcoughlin accepted this revision. dcoughlin added a comment. This revision is now accepted and ready to land. Yay! This looks good to me. https://reviews.llvm.org/D43804 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

r326405 - [analyzer] Add a checker for mmap()s which are both writable and executable.

2018-02-28 Thread Artem Dergachev via cfe-commits
Author: dergachev Date: Wed Feb 28 17:27:46 2018 New Revision: 326405 URL: http://llvm.org/viewvc/llvm-project?rev=326405=rev Log: [analyzer] Add a checker for mmap()s which are both writable and executable. This is a security check that warns when both PROT_WRITE and PROT_EXEC are set during

r326416 - Remove redundant casts. NFC

2018-02-28 Thread George Burgess IV via cfe-commits
Author: gbiv Date: Wed Feb 28 21:43:23 2018 New Revision: 326416 URL: http://llvm.org/viewvc/llvm-project?rev=326416=rev Log: Remove redundant casts. NFC So I wrote a clang-tidy check to lint out redundant `isa`, `cast`, and `dyn_cast`s for fun. This is a portion of what it found for clang; I

[PATCH] D43841: Add an option to disable tail-call optimization for escaping blocks

2018-02-28 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. TCO is a pretty neglible optimization; its primary advantage is slightly better locality for stack memory. I guess the more compelling argument is that non-escaping blocks can by definition only be executed with the original block-creating code still active, so

r326408 - [analyzer] [tests] Create a directory for the log file

2018-02-28 Thread George Karpenkov via cfe-commits
Author: george.karpenkov Date: Wed Feb 28 18:18:54 2018 New Revision: 326408 URL: http://llvm.org/viewvc/llvm-project?rev=326408=rev Log: [analyzer] [tests] Create a directory for the log file Modified: cfe/trunk/utils/analyzer/SATestUpdateDiffs.py Modified:

[PATCH] D43108: Support for the mno-stack-arg-probe flag

2018-02-28 Thread Ruslan Nikolaev via Phabricator via cfe-commits
nruslan added a comment. @aemerson : I am not 100% sure, but I think you are talking about different flag. This commit is for supporting a flag to disable stack probes (identical flag can be found in MinGW), it basically only applies to PE/COFF (Windows) targets. It can be useful to compile

[PATCH] D43696: Reduce hash collisions for reference and pointer types

2018-02-28 Thread Richard Trieu via Phabricator via cfe-commits
rtrieu added inline comments. Comment at: lib/AST/ODRHash.cpp:581 + void VisitType(const Type *T) { +ID.AddInteger(T->getTypeClass()); + } v.g.vassilev wrote: > rtrieu wrote: > > rsmith wrote: > > > This looks redundant, the above `Visit(const Type*)`

[PATCH] D43840: [CFG] [analyzer] Fix a crash on finding construction context for implicit constructor conversion.

2018-02-28 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC326402: [CFG] [analyzer] Recall that we only skip NoOp casts in construction contexts. (authored by dergachev, committed by ). Repository: rL LLVM https://reviews.llvm.org/D43840 Files:

[PATCH] D43840: [CFG] [analyzer] Fix a crash on finding construction context for implicit constructor conversion.

2018-02-28 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL326402: [CFG] [analyzer] Recall that we only skip NoOp casts in construction contexts. (authored by dergachev, committed by ). Herald added a subscriber: llvm-commits. Changed prior to commit:

[PATCH] D42645: New simple Checker for mmap calls

2018-02-28 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added a comment. Sorry, busy days>< Done. Repository: rL LLVM https://reviews.llvm.org/D42645 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D43841: Add an option to disable tail-call optimization for escaping blocks

2018-02-28 Thread John McCall via Phabricator via cfe-commits
rjmccall added inline comments. Comment at: include/clang/Driver/Options.td:1419 +def fno_disable_tail_calls_escaping_blocks : Flag<["-"], "fno-disable-tail-calls-escaping-blocks">, Group, Flags<[CC1Option]>; +def fdisable_tail_calls_escaping_blocks : Flag<["-"],

[PATCH] D30170: Function definition may have uninstantiated body

2018-02-28 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff marked 3 inline comments as done. sepavloff added a comment. Thank you! Comment at: lib/Sema/SemaDecl.cpp:11995-12006 +for (auto I : FD->redecls()) { + if (I != FD && !I->isInvalidDecl() && + I->getFriendObjectKind() != Decl::FOK_None) { +if

[PATCH] D42645: New simple Checker for mmap calls

2018-02-28 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL326405: [analyzer] Add a checker for mmap()s which are both writable and executable. (authored by dergachev, committed by ). Herald added a subscriber: llvm-commits. Changed prior to commit:

[PATCH] D26350: Keep invalid Switch in the AST

2018-02-28 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: lib/Sema/SemaStmt.cpp:823 + CondExpr->isValueDependent() || + isa(CondExpr); + unsigned CondWidth = rsmith wrote: > It's fragile to assume that

[PATCH] D43842: CodeGenObjCXX: handle inalloca appropriately for msgSend variant

2018-02-28 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. That's a fair point. I agree that separate allocas would make this a lot cleaner, in both IR and frontend implementation. We could also set an inalloca bit (+ field index? or maybe keep the arg index -> field index mapping on the CGFunctionInfo) on each arg info *in

r326402 - [CFG] [analyzer] Recall that we only skip NoOp casts in construction contexts.

2018-02-28 Thread Artem Dergachev via cfe-commits
Author: dergachev Date: Wed Feb 28 17:09:24 2018 New Revision: 326402 URL: http://llvm.org/viewvc/llvm-project?rev=326402=rev Log: [CFG] [analyzer] Recall that we only skip NoOp casts in construction contexts. For now. We should also add support for ConstructorConversion casts as presented in

[PATCH] D43927: [Coroutines] Schedule coro-split before asan

2018-02-28 Thread Brian Gesiak via Phabricator via cfe-commits
modocache created this revision. modocache added reviewers: GorNishanov, lewissbaker, EricWF. The docs for the LLVM coroutines intrinsic `@llvm.coro.id` state that "The second argument, if not null, designates a particular alloca instruction to be a coroutine promise." However, if the address

[PATCH] D43927: [Coroutines] Schedule coro-split before asan

2018-02-28 Thread Brian Gesiak via Phabricator via cfe-commits
modocache added a comment. I wasn't sure what the best way to test this would be. The assertion occurs in LLVM, but Clang is responsible for scheduling the passes. If anyone has any suggestions, I'd greatly appreciate them! Repository: rC Clang https://reviews.llvm.org/D43927

[PATCH] D30170: Function definition may have uninstantiated body

2018-02-28 Thread Serge Pavlov via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL326419: Function definition may have uninstantiated body (authored by sepavloff, committed by ). Herald added a subscriber: llvm-commits. Changed prior to commit:

r326419 - Function definition may have uninstantiated body

2018-02-28 Thread Serge Pavlov via cfe-commits
Author: sepavloff Date: Wed Feb 28 23:04:11 2018 New Revision: 326419 URL: http://llvm.org/viewvc/llvm-project?rev=326419=rev Log: Function definition may have uninstantiated body Current implementation of `FunctionDecl::isDefined` does not take into account redeclarations that do not have

  1   2   >