[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 https://reviews.llvm

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

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&view=rev Log: CodeGenObjCXX: handle inalloca appropriately for msgSend variant objc_msgSend_stret takes a hidden parameter for the returned structure's address for the construc

[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

[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&view=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 clang-tools-extra/t

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&view=rev Log: [Hexagon] Add -ffixed-r19 driver option and translate it to +reserved-r19 Modified: cfe/trunk/include/clang/Driver/Options.td cfe/trunk/lib/Driver/ToolCha

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&view=rev Log: [OpenMP] Extend NVPTX SPMD implementation of combined constructs Differential Revision: https://reviews.llvm.org/D43852 This patch extends the SPMD implementation

[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: https://reviews.llvm.org/

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

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&view=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: http://llvm.org/viewvc/ll

[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

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

[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 lib/Sema/SemaT

[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] 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] 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 &Entity, rtrieu wrote: > I have a few concerns about this function. The cod

[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 include/clang/Basic/Diagn

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

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

[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 http://lists.llvm.org/cgi-bin/mailman/listinfo/

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

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

[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] 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: unittests/clang-tidy/Moderniz

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

[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 test/CodeGen/ms_struct-long-

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&view=rev Log: [hwasan] update the asm snippet in the docs to match the current default behaviour Modified: cfe/trunk/docs/HardwareAssistedAddressSanitizerDesign.rst Modified:

[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 test/CodeGenCXX/cxx0x-initializer-stdinitializerl

[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 http://lists.llvm.org/cgi-bin

[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 llvm::DenseMap

[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 cfe-commit

[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 http://lists.llvm.org/cg

[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 http://lists.llvm.org/cgi-bin/mailman/li

[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&view=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

[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 don't support very small… (authored by vsapsai, committed b

[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&view=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 {misc,bugprone}

[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: https://reviews.llvm.org/D43868?vs=136277&id=13

[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&id=136412#toc Repository: rCTE Clang Tool

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

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&view=rev Log: Pass a GlobalDecl to SetInternalFunctionAttributes. NFC. This just reduces the noise in a followup patch. Part of D43900. Modified: cfe/trunk/lib/CodeGen/CGBl

[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&view=rev Log: [clang-tidy] Another batch of checks to rename from misc- to bugprone-. Summary: clang-tidy/rename_check.py {misc,bugprone}-suspicious-semicolon clang-tidy/rename_c

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&view=rev Log: Pass a GlobalDecl to setNonAliasAttributes. NFC. Also part of D43900. Modified: cfe/trunk/lib/CodeGen/CodeGenModule.cpp cfe/trunk/lib/CodeGen/CodeGenModule

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&view=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

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&view=rev Log: Pass a GlobalDecl to SetCommonAttributes. NFC. Part of D43900. Modified: cfe/trunk/lib/CodeGen/CodeGenModule.cpp cfe/trunk/lib/CodeGen/CodeGenModule.h Mod

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

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&view=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 dllimpo

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

[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 http://lists.llvm.org/c

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

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

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&view=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 i

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

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

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&view=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 durin

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

[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

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&view=rev Log: [analyzer] [tests] Create a directory for the log file Modified: cfe/trunk/utils/analyzer/SATestUpdateDiffs.py Modified: cfe/trunk/utils/analyzer/SAT

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

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

[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*)` funct

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

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

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&view=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;

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

[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<["-"], "fdisable-tail

[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

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&view=rev Log: Function definition may have uninstantiated body Current implementation of `FunctionDecl::isDefined` does not take into account redeclarations that do not have b

[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: https://reviews.llvm.org/D30170?vs=1155

[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

<    1   2