[PATCH] D46822: [RISCV] Add driver for riscv32-unknown-elf baremetal target

2018-07-31 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 added a comment. In https://reviews.llvm.org/D46822#1183007, @efriedma wrote: > Please don't commit patches on behalf of someone else if the author hasn't > specifically requested it. There might be some issue which the author forgot > to note on the review. Oh, ok. Repository:

[PATCH] D49865: Inform the AST of #pragma FENV_ACCESS use

2018-07-31 Thread Kevin P. Neal via Phabricator via cfe-commits
kpn updated this revision to Diff 158351. kpn added a comment. This includes the change to pass the annotation token when FENV_ACCESS is turned off. https://reviews.llvm.org/D49865 Files: include/clang/AST/Expr.h include/clang/Basic/LangOptions.h include/clang/Basic/TokenKinds.def incl

r338414 - Fix riscv32-toolchain.c with CLANG_DEFAULT_CXX_STDLIB

2018-07-31 Thread Jonas Hahnfeld via cfe-commits
Author: hahnfeld Date: Tue Jul 31 11:47:48 2018 New Revision: 338414 URL: http://llvm.org/viewvc/llvm-project?rev=338414&view=rev Log: Fix riscv32-toolchain.c with CLANG_DEFAULT_CXX_STDLIB This configuration was (again) broken after r338385 because Clang might be configured to always use libc++.

[PATCH] D15225: [Driver] Sanitizer support based on runtime library presence

2018-07-31 Thread Reid Kleckner via Phabricator via cfe-commits
rnk added subscribers: hans, thakis, samsonov, rnk. rnk added a comment. +@thakis @hans I think this broke Chromium's distributed Mac ASan build. I personally found the error message confusing for the reasons that @samsonov mentioned back in 2015. It's not that ASan wasn't supported on the plat

[PATCH] D45679: [clang-tidy] Add ExprMutationAnalyzer, that analyzes whether an expression is mutated within a statement.

2018-07-31 Thread George Karpenkov via Phabricator via cfe-commits
george.karpenkov added a comment. @aaron.ballman @alexfh @shuaiwang Would it be possible to move that code into a matcher, or into a something which could be used from Clang? We would also like to use similar functionality, but can't include stuff from clang-tidy. Repository: rCTE Clang Tool

[PATCH] D32747: [Analyzer] Iterator Checker - Part 3: Invalidation check, first for (copy) assignments

2018-07-31 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added inline comments. Comment at: lib/StaticAnalyzer/Checkers/IteratorChecker.cpp:605 + if (Pos && !Pos->isValid()) { +// If I do not put a tag here, some invalidation tests will fail +static CheckerProgramPointTag Tag("InvalidatedIteratorChecker",

[PATCH] D15225: [Driver] Sanitizer support based on runtime library presence

2018-07-31 Thread George Karpenkov via Phabricator via cfe-commits
george.karpenkov added a comment. @rnk could you clarify how did it break the distributed asanified build? If the slave compiler supports asan it should have this runtime, right? Repository: rL LLVM https://reviews.llvm.org/D15225 ___ cfe-commit

[PATCH] D47849: [OpenMP][Clang][NVPTX] Enable math functions called in an OpenMP NVPTX target device region to be resolved as device-native function calls

2018-07-31 Thread Jonas Hahnfeld via Phabricator via cfe-commits
Hahnfeld added a comment. In https://reviews.llvm.org/D47849#1124861, @hfinkel wrote: > In https://reviews.llvm.org/D47849#1124638, @Hahnfeld wrote: > > > 2. Incidentally I ran into a closely related problem: I can't `#include > > ` in translation units compiled for offloading, Clang complains

[PATCH] D15225: [Driver] Sanitizer support based on runtime library presence

2018-07-31 Thread George Karpenkov via Phabricator via cfe-commits
george.karpenkov added a comment. @rnk Regarding the error message, would it be possible to compromise on something like "sanitizer runtime not available"? I understand that the exact error message would be very useful for you, but it's just confusing for a user getting a toolchain with Xcode, s

[PATCH] D47196: [Time-report ](2): Recursive timers in Clang

2018-07-31 Thread Eli Friedman via Phabricator via cfe-commits
efriedma added a comment. I think there's something weird happening with your timers if they're showing half a second spent parsing or instantiating std::declval: it doesn't have a definition, anywhere (it's just a placeholder for template metaprogramming tricks). Comment at

[libcxx] r338419 - import timespec and timespec_get into namespace std if we're under c++17 or later AND the underlying C library has them. Fixes PR#38220, but doesn't implement all of P0063 yet.

2018-07-31 Thread Marshall Clow via cfe-commits
Author: marshall Date: Tue Jul 31 12:25:00 2018 New Revision: 338419 URL: http://llvm.org/viewvc/llvm-project?rev=338419&view=rev Log: import timespec and timespec_get into namespace std if we're under c++17 or later AND the underlying C library has them. Fixes PR#38220, but doesn't implement al

[PATCH] D46845: [libcxx][c++17] P0083R5: Splicing Maps and Sets

2018-07-31 Thread Erik Pilkington via Phabricator via cfe-commits
erik.pilkington added a comment. Ping! https://reviews.llvm.org/D46845 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

r338420 - [analyzer] Don't try to simplify mixed Loc/NonLoc expressions.

2018-07-31 Thread Artem Dergachev via cfe-commits
Author: dergachev Date: Tue Jul 31 12:26:34 2018 New Revision: 338420 URL: http://llvm.org/viewvc/llvm-project?rev=338420&view=rev Log: [analyzer] Don't try to simplify mixed Loc/NonLoc expressions. This fix is similar to r337769 and addresses a regression caused by r337167. When an operation be

[PATCH] D49749: [analyzer] Admit that we can't simplify the newly produced mixed Loc/NonLoc expressions.

2018-07-31 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ closed this revision. NoQ marked an inline comment as done. NoQ added a comment. Committed in https://reviews.llvm.org/rC338420 but i accidentally screwed the revision link. Repository: rC Clang https://reviews.llvm.org/D49749 ___ cfe-commit

[PATCH] D47849: [OpenMP][Clang][NVPTX] Enable math functions called in an OpenMP NVPTX target device region to be resolved as device-native function calls

2018-07-31 Thread Hal Finkel via Phabricator via cfe-commits
hfinkel added a comment. In https://reviews.llvm.org/D47849#1183134, @Hahnfeld wrote: > In https://reviews.llvm.org/D47849#1124861, @hfinkel wrote: > > > In https://reviews.llvm.org/D47849#1124638, @Hahnfeld wrote: > > > > > 2. Incidentally I ran into a closely related problem: I can't `#include

r338422 - [analyzer] Reuse some code in simplifySVal().

2018-07-31 Thread Artem Dergachev via cfe-commits
Author: dergachev Date: Tue Jul 31 12:29:25 2018 New Revision: 338422 URL: http://llvm.org/viewvc/llvm-project?rev=338422&view=rev Log: [analyzer] Reuse some code in simplifySVal(). No functional change intended. Differential Revision: https://reviews.llvm.org/D49826 Modified: cfe/trunk/lib

[PATCH] D49826: [analyzer] NFC: Minor code reuse in simplifySVal().

2018-07-31 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL338422: [analyzer] Reuse some code in simplifySVal(). (authored by dergachev, committed by ). Herald added a subscriber: llvm-commits. Changed prior to commit: https://reviews.llvm.org/D49826?vs=157389&

[PATCH] D50089: [DWARF v4] Suppressing the __debug_ranges section when there are no ranges

2018-07-31 Thread Adrian Prantl via Phabricator via cfe-commits
aprantl accepted this revision. aprantl added inline comments. This revision is now accepted and ready to land. Comment at: apple-accel.cpp:11 +__attribute__((section("1,__text_foo"))) void foo() {} int main (int argc, char const *argv[]) { return argc; } A co

r338425 - [CFG] [analyzer] Add stubs for constructor and message argument constructors.

2018-07-31 Thread Artem Dergachev via cfe-commits
Author: dergachev Date: Tue Jul 31 12:39:37 2018 New Revision: 338425 URL: http://llvm.org/viewvc/llvm-project?rev=338425&view=rev Log: [CFG] [analyzer] Add stubs for constructor and message argument constructors. CFG now correctly identifies construction context for temporaries constructed for t

[PATCH] D47394: [OpenMP][Clang][NVPTX] Replace bundling with partial linking for the OpenMP NVPTX device offloading toolchain

2018-07-31 Thread Samuel Antao via Phabricator via cfe-commits
sfantao added inline comments. Comment at: include/clang/Driver/Compilation.h:312 + /// \param skipBundler - bool value set once by the driver. + void setSkipOffloadBundler(bool skipBundler); + gtbercea wrote: > sfantao wrote: > > gtbercea wrote: > > > sfantao

[PATCH] D49826: [analyzer] NFC: Minor code reuse in simplifySVal().

2018-07-31 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added a comment. Uhm, sry, https://reviews.llvm.org/rC338425 is not relevant, i screwed up the revision link again. Repository: rL LLVM https://reviews.llvm.org/D49826 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm

[PATCH] D48249: [CFG] [analyzer] Add stubs for argument construction contexts for arguments of C++ constructors and Objective-C messages.

2018-07-31 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ closed this revision. NoQ added a comment. Committed in https://reviews.llvm.org/rC338425 but i accidentally screwed up the revision link. https://reviews.llvm.org/D48249 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm

[PATCH] D50099: [DebugInfo][OpenCL] Address post-commit review of D49930

2018-07-31 Thread Scott Linder via Phabricator via cfe-commits
scott.linder created this revision. scott.linder added reviewers: echristo, Anastasia, yaxunl. Herald added subscribers: cfe-commits, JDevlieghere, aprantl. Refactor collection of member debug info into helper functions and add separate debug-info tests. The reason for `-debug-info-kind=limited`

r338426 - [CFG] [analyzer] Add construction contexts for returning C++ objects in ObjC++.

2018-07-31 Thread Artem Dergachev via cfe-commits
Author: dergachev Date: Tue Jul 31 12:46:14 2018 New Revision: 338426 URL: http://llvm.org/viewvc/llvm-project?rev=338426&view=rev Log: [CFG] [analyzer] Add construction contexts for returning C++ objects in ObjC++. Like any normal funciton, Objective-C message can return a C++ object in Objectiv

[PATCH] D48608: [CFG] [analyzer] Add construction contexts for C++ objects returned from Objective-C messages.

2018-07-31 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC338426: [CFG] [analyzer] Add construction contexts for returning C++ objects in ObjC++. (authored by dergachev, committed by ). Repository: rC Clang https://reviews.llvm.org/D48608 Files: include/cl

[PATCH] D49723: [OpenCL] Check for invalid kernel arguments in array types

2018-07-31 Thread Alexey Sotkin via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC338427: [OpenCL] Check for invalid kernel arguments in array types (authored by AlexeySotkin, committed by ). Changed prior to commit: https://reviews.llvm.org/D49723?vs=157688&id=158365#toc Repository

r338427 - [OpenCL] Check for invalid kernel arguments in array types

2018-07-31 Thread via cfe-commits
Author: AlexeySotkin Date: Tue Jul 31 12:47:19 2018 New Revision: 338427 URL: http://llvm.org/viewvc/llvm-project?rev=338427&view=rev Log: [OpenCL] Check for invalid kernel arguments in array types Summary: OpenCL specification forbids use of several types as kernel arguments. This patch improves

[PATCH] D50068: [AArch64][ARM] Add Armv8.4-A tests

2018-07-31 Thread Ahmed Bougacha via Phabricator via cfe-commits
ab accepted this revision. ab added a comment. This revision is now accepted and ready to land. LGTM, thanks! Comment at: test/Driver/aarch64-cpus.c:9 // RUN: %clang -target aarch64_be -mlittle-endian -mcpu=generic -### -c %s 2>&1 | FileCheck -check-prefix=GENERIC %s // GENE

[PATCH] D45679: [clang-tidy] Add ExprMutationAnalyzer, that analyzes whether an expression is mutated within a statement.

2018-07-31 Thread Shuai Wang via Phabricator via cfe-commits
shuaiwang added a comment. In https://reviews.llvm.org/D45679#1183116, @george.karpenkov wrote: > @aaron.ballman @alexfh @shuaiwang Would it be possible to move that code into > a matcher, or into a something which could be used from Clang? We would also > like to use similar functionality, but

[PATCH] D49833: [clangd] Receive compilationDatabasePath in 'initialize' request

2018-07-31 Thread Simon Marchi via Phabricator via cfe-commits
simark updated this revision to Diff 158366. simark added a comment. Address Ilya's comment (add an indirection for initializationOptions). Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D49833 Files: clangd/ClangdLSPServer.cpp clangd/ClangdLSPServer.h clangd/Protocol.cpp

[PATCH] D49725: [OpenCL] Forbid size dependent types used as kernel arguments

2018-07-31 Thread Alexey Sotkin via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL338432: [OpenCL] Forbid size dependent types used as kernel arguments (authored by AlexeySotkin, committed by ). Herald added a subscriber: llvm-commits. Repository: rL LLVM https://reviews.llvm.org/D4

r338433 - [analyzer] Move InnerPointerChecker out of alpha.

2018-07-31 Thread Reka Kovacs via cfe-commits
Author: rkovacs Date: Tue Jul 31 13:27:11 2018 New Revision: 338433 URL: http://llvm.org/viewvc/llvm-project?rev=338433&view=rev Log: [analyzer] Move InnerPointerChecker out of alpha. Differential Revision: https://reviews.llvm.org/D49058 Modified: cfe/trunk/include/clang/StaticAnalyzer/Chec

[PATCH] D45679: [clang-tidy] Add ExprMutationAnalyzer, that analyzes whether an expression is mutated within a statement.

2018-07-31 Thread Jonas Toth via Phabricator via cfe-commits
JonasToth added a comment. I think `clang/lib/Analysis` is a good place. > I think it should in theory be possible, though I need some advice about > where exactly is the best place in clang. > > Repository: > > rCTE Clang Tools Extra > > https://reviews.llvm.org/D45679 Repository: rCTE

[PATCH] D49058: [analyzer] Move InnerPointerChecker out of alpha

2018-07-31 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL338433: [analyzer] Move InnerPointerChecker out of alpha. (authored by rkovacs, committed by ). Herald added a subscriber: llvm-commits. Changed prior to commit: https://reviews.llvm.org/D49058?vs=15798

[PATCH] D50101: [asan] Update a vector's storage annotation during destruction.

2018-07-31 Thread Ben via Phabricator via cfe-commits
bobsayshilol created this revision. bobsayshilol added reviewers: mclow.lists, EricWF. Herald added subscribers: cfe-commits, ldionne. This allows a user replaced operator delete to modify or reuse returned memory in the case where the size and capacity of a vector do not match upon destruction

[PATCH] D49758: [clangd] allow clients to pass in compilationDatabaseChanges in the 'workspace/didChangeConfiguration' request

2018-07-31 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman updated this revision to Diff 158376. arphaman marked 3 inline comments as done. arphaman added a comment. Updated to address review comments. https://reviews.llvm.org/D49758 Files: clangd/ClangdLSPServer.cpp clangd/ClangdLSPServer.h clangd/GlobalCompilationDatabase.cpp clangd/

[PATCH] D49758: [clangd] allow clients to pass in compilationDatabaseChanges in the 'workspace/didChangeConfiguration' request

2018-07-31 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman added inline comments. Comment at: test/clangd/did-change-configuration-params.test:43 +# +# ERR: Updating file /clangd-test/foo.c with command [/clangd-test2] clang -c foo.c -Wall -Werror +# Don't reparse the second file: ilya-biryukov wrote: > Matchin

[PATCH] D15225: [Driver] Sanitizer support based on runtime library presence

2018-07-31 Thread Reid Kleckner via Phabricator via cfe-commits
rnk added a comment. In https://reviews.llvm.org/D15225#1183132, @george.karpenkov wrote: > @rnk could you clarify how did it break the distributed asanified build? If > the slave compiler supports asan it should have this runtime, right? Most open source distributed build systems wrap only co

[PATCH] D15225: [Driver] Sanitizer support based on runtime library presence

2018-07-31 Thread George Karpenkov via Phabricator via cfe-commits
george.karpenkov added a comment. > it's just that the runtime library didn't happen to exist on the system > performing compilation But then conceptually, the compiler toolchain on the system performing compilation is not fully supporting asan, right? It works for producing asanified object fi

[PATCH] D15225: [Driver] Sanitizer support based on runtime library presence

2018-07-31 Thread George Karpenkov via Phabricator via cfe-commits
george.karpenkov added a comment. @rnk OK I see, we've accidentally posted comments nearly simultaneously. Repository: rL LLVM https://reviews.llvm.org/D15225 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/m

[PATCH] D50055: Update the coding standard about NFC changes and whitespace

2018-07-31 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added subscribers: llvm-commits, cfe-commits. aaron.ballman added a comment. In https://reviews.llvm.org/D50055#1183277, @probinson wrote: > I think you forgot to subscribe llvm-commits to this review? Oh shoot, good catch! I've added llvm-commits and cfe-commits both. Thank you

[PATCH] D49725: [OpenCL] Forbid size dependent types used as kernel arguments

2018-07-31 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. FYI: @asavonic, the email address you have associated with your commit id is `AlexeySotkin@/etc/mailname` which is getting stuck in the moderation queue as not being signed up to the mailing list. You may want to correct your svn information as I am not certain wh

r338432 - [OpenCL] Forbid size dependent types used as kernel arguments

2018-07-31 Thread via cfe-commits
Author: AlexeySotkin Date: Tue Jul 31 13:26:43 2018 New Revision: 338432 URL: http://llvm.org/viewvc/llvm-project?rev=338432&view=rev Log: [OpenCL] Forbid size dependent types used as kernel arguments Summary: Size_t, intptr_t, uintptr_t and ptrdiff_t cannot be used as kernel arguments, according

r338436 - [CFG] [analyzer] Implement function argument construction contexts.

2018-07-31 Thread Artem Dergachev via cfe-commits
Author: dergachev Date: Tue Jul 31 13:45:53 2018 New Revision: 338436 URL: http://llvm.org/viewvc/llvm-project?rev=338436&view=rev Log: [CFG] [analyzer] Implement function argument construction contexts. In r330377 and r338425 we have already identified what constitutes function argument construc

[PATCH] D15225: [Driver] Sanitizer support based on runtime library presence

2018-07-31 Thread George Karpenkov via Phabricator via cfe-commits
george.karpenkov added a comment. @rnk changing subjects: will you be at the LLVM social on Thursday? Could we discuss it there? Repository: rL LLVM https://reviews.llvm.org/D15225 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://l

[PATCH] D49953: [compiler-rt] Add a routine to specify the mode used when creating profile dirs.

2018-07-31 Thread Paul Robinson via Phabricator via cfe-commits
probinson accepted this revision. probinson added a comment. This revision is now accepted and ready to land. Using `%t` with suffixes instead of `%T` is the preferred idiom, glad you worked that out. The more elaborate test depends on a set of Posix-y calls, but that's fine. If there are more

[PATCH] D50089: [DWARF v4] Suppressing the __debug_ranges section when there are no ranges

2018-07-31 Thread Wolfgang Pieb via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL338437: [DWARF] Do not create a .debug_ranges section when no ranges are needed. (authored by wolfgangp, committed by ). Changed prior to commit: https://reviews.llvm.org/D50089?vs=158328&id=158378#toc

[PATCH] D49922: [P0936R0] add [[clang::lifetimebound]] attribute

2018-07-31 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman accepted this revision. aaron.ballman added a comment. This revision is now accepted and ready to land. LGTM, though I raised a few questions. If you want to handle them as part of this patch, I'm happy to do another round of review. If you want to handle them in a follow-up patch,

r338438 - [serialization] PR34728: Don't assume that only a suffix of template

2018-07-31 Thread Richard Smith via cfe-commits
Author: rsmith Date: Tue Jul 31 14:01:53 2018 New Revision: 338438 URL: http://llvm.org/viewvc/llvm-project?rev=338438&view=rev Log: [serialization] PR34728: Don't assume that only a suffix of template parameters can have default arguments. At least for function templates and class template parti

[PATCH] D50050: [AST] CastExpr: BasePathSize is not large enough.

2018-07-31 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. Comment at: include/clang/AST/Expr.h:2791 +public: + using BasePathSizeTy = unsigned short; + static_assert(std::numeric_limits::max() >= 16384,

[PATCH] D15225: [Driver] Sanitizer support based on runtime library presence

2018-07-31 Thread Reid Kleckner via Phabricator via cfe-commits
rnk added a comment. In https://reviews.llvm.org/D15225#1183318, @george.karpenkov wrote: > @rnk changing subjects: will you be at the LLVM social on Thursday? Could we > discuss it there? Yes, we can and should, but I'd like update chromium's copy of clang before then. Repository: rL LLV

[PATCH] D47394: [OpenMP][Clang][NVPTX] Replace bundling with partial linking for the OpenMP NVPTX device offloading toolchain

2018-07-31 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
gtbercea added inline comments. Comment at: include/clang/Driver/Compilation.h:312 + /// \param skipBundler - bool value set once by the driver. + void setSkipOffloadBundler(bool skipBundler); + sfantao wrote: > gtbercea wrote: > > sfantao wrote: > > > gtbercea

[PATCH] D50050: [AST] CastExpr: BasePathSize is not large enough.

2018-07-31 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri updated this revision to Diff 158379. lebedev.ri added a comment. Drop pointless cast of zero. Repository: rC Clang https://reviews.llvm.org/D50050 Files: include/clang/AST/Expr.h include/clang/AST/ExprCXX.h include/clang/AST/ExprObjC.h include/clang/AST/Stmt.h lib/AST/E

[PATCH] D50102: Use ExprMutationAnalyzer in performance-unnecessary-value-param

2018-07-31 Thread Shuai Wang via Phabricator via cfe-commits
shuaiwang created this revision. Herald added a reviewer: george.karpenkov. Herald added subscribers: cfe-commits, a.sidorin. This yields better recall as ExprMutationAnalyzer is more accurate. One common pattern this check is now able to catch is: void foo(std::vector v) { for (const auto

[PATCH] D15225: [Driver] Sanitizer support based on runtime library presence

2018-07-31 Thread George Karpenkov via Phabricator via cfe-commits
george.karpenkov added a comment. @rnk OK it's fine with me to revert it now and then we see what can be done. Repository: rL LLVM https://reviews.llvm.org/D15225 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-b

[PATCH] D50102: Use ExprMutationAnalyzer in performance-unnecessary-value-param

2018-07-31 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added a comment. It is great when the test cases are included :) Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D50102 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/

r338439 - [CFG] [analyzer] NFC: Enumerate construction context layer kinds.

2018-07-31 Thread Artem Dergachev via cfe-commits
Author: dergachev Date: Tue Jul 31 14:12:42 2018 New Revision: 338439 URL: http://llvm.org/viewvc/llvm-project?rev=338439&view=rev Log: [CFG] [analyzer] NFC: Enumerate construction context layer kinds. This is a refactoring patch; no functional change intended. The common part of ConstructionCon

r338441 - [analyzer] Fix eliding the same destructor twice due to buggy default arguments.

2018-07-31 Thread Artem Dergachev via cfe-commits
Author: dergachev Date: Tue Jul 31 14:17:40 2018 New Revision: 338441 URL: http://llvm.org/viewvc/llvm-project?rev=338441&view=rev Log: [analyzer] Fix eliding the same destructor twice due to buggy default arguments. Because of incomplete support for CXXDefaultArgExpr, we cannot yet commit to ass

[PATCH] D49213: [analyzer] pr38072: Suppress an assertion failure for eliding the same destructor twice due to the default argument problem.

2018-07-31 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC338441: [analyzer] Fix eliding the same destructor twice due to buggy default arguments. (authored by dergachev, committed by ). Repository: rC Clang https://reviews.llvm.org/D49213 Files: lib/Stati

[PATCH] D49771: CodeGen: use non-zero memset when possible for automatic variables

2018-07-31 Thread JF Bastien via Phabricator via cfe-commits
jfb added a comment. In https://reviews.llvm.org/D49771#1181008, @mehdi_amini wrote: > I'm curious: isn't the kind of optimization we should expect LLVM to provide? Maybe? It seems obvious to do here since we know we'll probably want to be doing it, and I have another patch I'm working on whic

[PATCH] D50104: [OpenCL] Always emit alloca in entry block for enqueue_kernel builtin

2018-07-31 Thread Scott Linder via Phabricator via cfe-commits
scott.linder created this revision. scott.linder added reviewers: yaxunl, Anastasia, arsenm. Herald added subscribers: cfe-commits, wdng. Ensures the statically sized alloca is not converted to DYNAMIC_STACKALLOC later because it is not in the entry block. I believe it is valid to insert the all

[PATCH] D49627: [CFG] [analyzer] Constructors of member CXXOperatorCallExpr's argument 0 are not argument constructors.

2018-07-31 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added a comment. In https://reviews.llvm.org/D49627#1176326, @baloghadamsoftware wrote: > How much different is a correct `this`-argument construction context from > real argument construction contexts? It's identified in a similar manner; this patch pretty much already shows how to ident

[PATCH] D50055: Update the coding standard about NFC changes and whitespace

2018-07-31 Thread Chandler Carruth via Phabricator via cfe-commits
chandlerc added inline comments. Comment at: docs/DeveloperPolicy.rst:395-408 +Commits with No Functional Change +- + +It may be permissible to commit changes without prior review when the changes +have no semantic impact on the code if the changes

[PATCH] D50106: [libc++] Fix tuple assignment from type derived from a tuple-like

2018-07-31 Thread Louis Dionne via Phabricator via cfe-commits
ldionne created this revision. ldionne added reviewers: EricWF, mclow.lists. Herald added subscribers: cfe-commits, dexonsmith, christof. The implementation of operator= for tuple currently diverges from the way the Standard specifies them, which leads to subtle cases where the behavior is not as

[PATCH] D46845: [libcxx][c++17] P0083R5: Splicing Maps and Sets

2018-07-31 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists added a comment. One more thing - When you add a new header file, you need to update `include/module.modulemap`, `test/libcxx/double_include.sh.cpp`, and `include/CMakeLists.txt`. Take a look at https://reviews.llvm.org/D49338 for an example. https://reviews.llvm.org/D46845

[PATCH] D49210: [CFG] [analyzer] NFC: Enumerate construction context layer kinds and re-use their code for ExprEngine keys.

2018-07-31 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ closed this revision. NoQ added a comment. Committed as https://reviews.llvm.org/rC338439 but Phabricator didn't pick it up because i put a `.` after the phabricator link. https://reviews.llvm.org/D49210 ___ cfe-commits mailing list cfe-commits

[PATCH] D48681: [CFG] [analyzer] Add construction contexts for function arguments.

2018-07-31 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ closed this revision. NoQ added a comment. Committed as https://reviews.llvm.org/rC338436 but Phabricator didn't pick it up because i put a `.` after the phabricator link. https://reviews.llvm.org/D48681 ___ cfe-commits mailing list cfe-commits

[PATCH] D49952: Check for NULL Destination-Type when creating ArrayConstant

2018-07-31 Thread Balaji Iyer via Phabricator via cfe-commits
bviyer updated this revision to Diff 158391. bviyer added a comment. Fixed code as suggested by John McCall. Repository: rC Clang https://reviews.llvm.org/D49952 Files: lib/CodeGen/CGExprConstant.cpp test/CodeGenCXX/empty-struct-init-list.cpp Index: test/CodeGenCXX/empty-struct-init-li

[PATCH] D50104: [OpenCL] Always emit alloca in entry block for enqueue_kernel builtin

2018-07-31 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added inline comments. Comment at: lib/CodeGen/CGBuiltin.cpp:3342 auto *AT = llvm::ArrayType::get(SizeTy, NumArgs - First); + // Always insert the alloca in the entry block so it remains static in + // the SelectionDAG. + BasicBlock *Begin = nullptr;

[PATCH] D50050: [AST] CastExpr: BasePathSize is not large enough.

2018-07-31 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added a comment. In https://reviews.llvm.org/D50050#1183341, @rjmccall wrote: > LGTM. Thank you for the review. I'll land in ~+9 hours or so, since i did not hear from @erichkeane back yet.. Repository: rC Clang https://reviews.llvm.org/D50050

r338444 - Revert r337635 "[Driver] Sanitizer support based on runtime library presence"

2018-07-31 Thread Reid Kleckner via cfe-commits
Author: rnk Date: Tue Jul 31 14:57:35 2018 New Revision: 338444 URL: http://llvm.org/viewvc/llvm-project?rev=338444&view=rev Log: Revert r337635 "[Driver] Sanitizer support based on runtime library presence" This change causes issues with distributed build systems, which may only have compiler bi

[PATCH] D49952: Check for NULL Destination-Type when creating ArrayConstant

2018-07-31 Thread Balaji Iyer via Phabricator via cfe-commits
bviyer updated this revision to Diff 158392. bviyer added a comment. Forgot to pass the -emit-llvm to the test case. https://reviews.llvm.org/D49952 Files: lib/CodeGen/CGExprConstant.cpp test/CodeGenCXX/empty-struct-init-list.cpp Index: test/CodeGenCXX/empty-struct-init-list.cpp =

[PATCH] D46845: [libcxx][c++17] P0083R5: Splicing Maps and Sets

2018-07-31 Thread Erik Pilkington via Phabricator via cfe-commits
erik.pilkington added a comment. In https://reviews.llvm.org/D46845#1183435, @mclow.lists wrote: > One more thing - > When you add a new header file, you need to update > `include/module.modulemap`, `test/libcxx/double_include.sh.cpp`, and > `include/CMakeLists.txt`. > Take a look at https:/

Re: r338321 - Fix use of uninitialized variable in r338299

2018-07-31 Thread Eric Christopher via cfe-commits
I'm probably missing something, from looking here: FieldOffset = 0; if (CGM.getLangOpts().OpenCL) { FType = CGM.getContext().IntTy; EltTys.push_back(CreateMemberType(Unit, FType, "__size", &FieldOffset)); EltTys.push_back(CreateMemberType(Unit, FType, "__align", &FieldOffset)); }

[PATCH] D50110: Handle shared release attributes correctly

2018-07-31 Thread Aaron Puchert via Phabricator via cfe-commits
aaronpuchert created this revision. aaronpuchert added reviewers: aaron.ballman, delesley. Herald added a subscriber: cfe-commits. Repository: rC Clang https://reviews.llvm.org/D50110 Files: lib/Analysis/ThreadSafety.cpp test/SemaCXX/warn-thread-safety-analysis.cpp Index: test/SemaCXX/wa

[PATCH] D50112: [Android] Increase default new alignment for Android

2018-07-31 Thread Pirama Arumuga Nainar via Phabricator via cfe-commits
pirama created this revision. pirama added a reviewer: rsmith. Android's memory allocators also guarantee 8-byte alignment for 32-bit architectures and 16-byte alignment for 64-bit. Repository: rC Clang https://reviews.llvm.org/D50112 Files: lib/Basic/TargetInfo.cpp test/Preprocessor/ini

[PATCH] D41458: [libc++][C++17] Elementary string conversions for integral types

2018-07-31 Thread Zhihao Yuan via Phabricator via cfe-commits
lichray updated this revision to Diff 158404. lichray added a comment. Dropping a lambda Repository: rCXX libc++ https://reviews.llvm.org/D41458 Files: include/CMakeLists.txt include/charconv include/module.modulemap src/charconv.cpp test/libcxx/double_include.sh.cpp test/std/uti

[PATCH] D49511: [Sema/Attribute] Check for noderef attribute

2018-07-31 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan updated this revision to Diff 158407. leonardchan marked 6 inline comments as done. leonardchan added a comment. - Added tests for checking that `noderef` can only be used for C style pointers and arrays (not usable for references or ObjC pointers) - Added warnings for dereferencing a

[PATCH] D50102: [clang-tidy] Use ExprMutationAnalyzer in performance-unnecessary-value-param

2018-07-31 Thread Shuai Wang via Phabricator via cfe-commits
shuaiwang updated this revision to Diff 158408. shuaiwang added a comment. Add test case Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D50102 Files: clang-tidy/performance/UnnecessaryValueParamCheck.cpp test/clang-tidy/performance-unnecessary-value-param.cpp Index: test/cl

[PATCH] D49511: [Sema/Attribute] Check for noderef attribute

2018-07-31 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan added a comment. > You shouldn't be adding your own `ExpressionEvaluationContextRecord`s. What I > was suggesting is that you store a list of pending `noderef` expressions on > the record, and diagnose them when the record is popped (if they've not been > removed since). This is

[PATCH] D49771: CodeGen: use non-zero memset when possible for automatic variables

2018-07-31 Thread Mehdi AMINI via Phabricator via cfe-commits
mehdi_amini added a comment. In https://reviews.llvm.org/D49771#1183380, @jfb wrote: > In https://reviews.llvm.org/D49771#1181008, @mehdi_amini wrote: > > > I'm curious: isn't the kind of optimization we should expect LLVM to > > provide? > > > Maybe? It seems obvious to do here since we know we

Re: r338321 - Fix use of uninitialized variable in r338299

2018-07-31 Thread via cfe-commits
What might be missing is the impl of CreateMemberType: llvm::DIType *CGDebugInfo::CreateMemberType(llvm::DIFile *Unit, QualType FType, StringRef Name, uint64_t *Offset) { llvm::DIType *FieldTy = CGDebugInfo::getOrCreateType(FType, Unit); uint64_t

[PATCH] D49771: CodeGen: use non-zero memset when possible for automatic variables

2018-07-31 Thread JF Bastien via Phabricator via cfe-commits
jfb added a comment. In https://reviews.llvm.org/D49771#1183562, @mehdi_amini wrote: > In https://reviews.llvm.org/D49771#1183380, @jfb wrote: > > > In https://reviews.llvm.org/D49771#1181008, @mehdi_amini wrote: > > > > > I'm curious: isn't the kind of optimization we should expect LLVM to > >

[PATCH] D46845: [libcxx][c++17] P0083R5: Splicing Maps and Sets

2018-07-31 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists accepted this revision. mclow.lists added a comment. In https://reviews.llvm.org/D46845#1183462, @erik.pilkington wrote: > In https://reviews.llvm.org/D46845#1183435, @mclow.lists wrote: > > > One more thing - > > When you add a new header file, you need to update > > `include/modu

[PATCH] D49511: [Sema/Attribute] Check for noderef attribute

2018-07-31 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan added a comment. > Your current counter-based approach doesn't work very well in the case where > we switch to another context while processing an expression (for example, > during template instantiation): you'll defer all the diagnostics for the > inner construct until the outer co

Re: r338321 - Fix use of uninitialized variable in r338299

2018-07-31 Thread Eric Christopher via cfe-commits
On Tue, Jul 31, 2018 at 3:59 PM wrote: > What might be missing is the impl of CreateMemberType: > > llvm::DIType *CGDebugInfo::CreateMemberType(llvm::DIFile *Unit, QualType > FType, > StringRef Name, uint64_t > *Offset) { >llvm::DIType *FieldTy = C

[PATCH] D41458: [libc++][C++17] Elementary string conversions for integral types

2018-07-31 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. LGTM. Thanks! Repository: rCXX libc++ https://reviews.llvm.org/D41458 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http:/

[PATCH] D38320: [clang] Fix serializers for `TypeTemplateParmDecl` + related types

2018-07-31 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added inline comments. Comment at: lib/Serialization/ASTReaderDecl.cpp:3448-3456 if (!inheritDefaultTemplateArgument(Context, FTTP, ToParam)) break; } else if (auto *FNTTP = dyn_cast(FromParam)) { if (!inheritDefaultTemplateArgument(Context, FNT

[libcxx] r338454 - Test for the presence of a bunch of new macros for c++17. These macros come from C11. Part of P0063

2018-07-31 Thread Marshall Clow via cfe-commits
Author: marshall Date: Tue Jul 31 16:29:06 2018 New Revision: 338454 URL: http://llvm.org/viewvc/llvm-project?rev=338454&view=rev Log: Test for the presence of a bunch of new macros for c++17. These macros come from C11. Part of P0063 Modified: libcxx/trunk/include/cfloat libcxx/trunk/in

r338455 - [constexpr] Support for constant evaluation of __builtin_memcpy and

2018-07-31 Thread Richard Smith via cfe-commits
Author: rsmith Date: Tue Jul 31 16:35:09 2018 New Revision: 338455 URL: http://llvm.org/viewvc/llvm-project?rev=338455&view=rev Log: [constexpr] Support for constant evaluation of __builtin_memcpy and __builtin_memmove (in non-type-punning cases). This is intended to permit libc++ to make std::co

[PATCH] D49396: [WebAssembly] Support for atomic.wait / atomic.wake builtins

2018-07-31 Thread Derek Schuff via Phabricator via cfe-commits
dschuff added inline comments. Comment at: include/clang/Basic/BuiltinsWebAssembly.def:38 +// Atomic wait and wake. +BUILTIN(__builtin_wasm_atomic_wait_i32, "Uii*iLLi", "n") +BUILTIN(__builtin_wasm_atomic_wait_i64, "UiLLi*LLiLLi", "n") So this means that the sign

[PATCH] D49953: [compiler-rt] Add a routine to specify the mode used when creating profile dirs.

2018-07-31 Thread Matt Davis via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. mattd marked an inline comment as done. Closed by commit rCRT338456: [compiler-rt] Add a routine to specify the mode used when creating profile dirs. (authored by mattd, committed by ). Herald added subscribers: Sanitizers,

[libcxx] r338457 - Final bit of P0063 - make sure that aligned_alloc is available when the underlying C library supports it

2018-07-31 Thread Marshall Clow via cfe-commits
Author: marshall Date: Tue Jul 31 16:39:12 2018 New Revision: 338457 URL: http://llvm.org/viewvc/llvm-project?rev=338457&view=rev Log: Final bit of P0063 - make sure that aligned_alloc is available when the underlying C library supports it Modified: libcxx/trunk/test/std/depr/depr.c.headers/

[PATCH] D50118: [VFS] Unify iteration code for VFSFromYamlDirIterImpl, NFC intended.

2018-07-31 Thread Volodymyr Sapsai via Phabricator via cfe-commits
vsapsai created this revision. vsapsai added reviewers: bruno, benlangmuir. Herald added a subscriber: dexonsmith. First and subsequent iteration steps are similar, capture this similarity. https://reviews.llvm.org/D50118 Files: clang/lib/Basic/VirtualFileSystem.cpp Index: clang/lib/Basic/V

[PATCH] D49771: CodeGen: use non-zero memset when possible for automatic variables

2018-07-31 Thread Mehdi AMINI via Phabricator via cfe-commits
mehdi_amini added a comment. > I'm worried, however, about generating a bunch more code than needed from > clang in the hopes that the compiler will clean it up later. Isn't a strong design component of clang/LLVM? Clang does not try to generate "smart" code and leave it up to LLVM to clean it

[PATCH] D49511: [Sema/Attribute] Check for noderef attribute

2018-07-31 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan updated this revision to Diff 158423. leonardchan added a comment. - Moved the counter and set into `ExpressionEvaluationContextRecord` Repository: rC Clang https://reviews.llvm.org/D49511 Files: include/clang/AST/Type.h include/clang/Basic/Attr.td include/clang/Basic/AttrD

[PATCH] D49114: [clang-tidy] Add a check for "magic numbers"

2018-07-31 Thread Florin Iucha via Phabricator via cfe-commits
0x8000- updated this revision to Diff 158425. 0x8000- added a comment. Add tests to show that we can detect, report and ignore floating point numbers represented using hexadecimal notation Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D49114 Files: clang-tidy/cppcore

[PATCH] D50119: Compiler support for P1144R0 "__is_trivially_relocatable(T)"

2018-07-31 Thread Arthur O'Dwyer via Phabricator via cfe-commits
Quuxplusone created this revision. Quuxplusone added a reviewer: rsmith. Quuxplusone added a project: clang. Herald added a subscriber: cfe-commits. This is the compiler half of C++ proposal 1144 "Object relocation in terms of move plus destroy," as seen on https://godbolt.org/g/zUUAVW and https

[PATCH] D48341: [clang-doc] Refactoring mapper to map by scope

2018-07-31 Thread Julie Hockett via Phabricator via cfe-commits
juliehockett added inline comments. Comment at: clang-tools-extra/clang-doc/Representation.h:246 + + std::vector ChildNamespaces; + std::vector ChildRecords; ioeric wrote: > Would a record ever have namespace children? Maybe we should assert that this > doesn'

r338464 - [P0936R0] add [[clang::lifetimebound]] attribute

2018-07-31 Thread Richard Smith via cfe-commits
Author: rsmith Date: Tue Jul 31 17:33:25 2018 New Revision: 338464 URL: http://llvm.org/viewvc/llvm-project?rev=338464&view=rev Log: [P0936R0] add [[clang::lifetimebound]] attribute This patch adds support for a new attribute, [[clang::lifetimebound]], that indicates that the lifetime of a functi

<    1   2   3   >