[PATCH] D39367: [clang-tidy] Add support for operator new[] in check bugprone-misplaced-operator-in-strlen-in-alloc

2017-10-30 Thread Balogh , Ádám via Phabricator via cfe-commits
baloghadamsoftware updated this revision to Diff 120776. baloghadamsoftware added a comment. Oops! Sorry! https://reviews.llvm.org/D39367 Files: clang-tidy/bugprone/MisplacedOperatorInStrlenInAllocCheck.cpp clang-tidy/bugprone/MisplacedOperatorInStrlenInAllocCheck.h docs/ReleaseNotes.rst

r316885 - [analyzer] Handle ObjC messages conservatively in CallDescription

2017-10-30 Thread Gabor Horvath via cfe-commits
Author: xazax Date: Mon Oct 30 01:47:13 2017 New Revision: 316885 URL: http://llvm.org/viewvc/llvm-project?rev=316885&view=rev Log: [analyzer] Handle ObjC messages conservatively in CallDescription Differential Revision: https://reviews.llvm.org/D37470 Added: cfe/trunk/test/Analysis/block-in

[PATCH] D37470: [analyzer] Handle ObjC messages conservatively in CallDescription

2017-10-30 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL316885: [analyzer] Handle ObjC messages conservatively in CallDescription (authored by xazax). Changed prior to commit: https://reviews.llvm.org/D37470?vs=120598&id=120778#toc Repository: rL LLVM ht

r316886 - Add missing expected-no-diagnostics comment to test.

2017-10-30 Thread Gabor Horvath via cfe-commits
Author: xazax Date: Mon Oct 30 02:01:48 2017 New Revision: 316886 URL: http://llvm.org/viewvc/llvm-project?rev=316886&view=rev Log: Add missing expected-no-diagnostics comment to test. Modified: cfe/trunk/test/Analysis/block-in-critical-section.m Modified: cfe/trunk/test/Analysis/block-in-cr

[PATCH] D39121: [clang-tidy] Misplaced Operator in Strlen in Alloc

2017-10-30 Thread Balogh , Ádám via Phabricator via cfe-commits
baloghadamsoftware added a comment. In https://reviews.llvm.org/D39121#909255, @aaron.ballman wrote: > My only remaining concern is with the diagnostic message/fixit interaction > itself. Let's see if @alexfh has any suggestions there, or we think of an > improvement ourselves. What do you me

r316892 - [analyzer] lock_guard and unique_lock extension for BlockInCriticalSection checker

2017-10-30 Thread Gabor Horvath via cfe-commits
Author: xazax Date: Mon Oct 30 03:09:55 2017 New Revision: 316892 URL: http://llvm.org/viewvc/llvm-project?rev=316892&view=rev Log: [analyzer] lock_guard and unique_lock extension for BlockInCriticalSection checker A patch by zdtorok (Zoltán Dániel Török)! Differential Revision: https://reviews

[PATCH] D39372: Make DiagnosticIDs::getAllDiagnostics static.

2017-10-30 Thread Gábor Horváth via Phabricator via cfe-commits
xazax.hun added a comment. I like the idea of making functions that can be static, static. Could you update the usages of this function as well? https://reviews.llvm.org/D39372 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.ll

[PATCH] D38986: [Analyzer] Better unreachable message in enumeration

2017-10-30 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added a comment. > Does llvm_unreachable() guarantee that the string construction code is > completely removed from release builds? http://llvm.org/docs/CodingStandards.html#assert-liberally: > When assertions are disabled (i.e. in release builds), `llvm_unreachable` > becomes a hint to co

[PATCH] D39049: [analyzer] Fix wrong calculation of offset in ArrayBoundsV2

2017-10-30 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added a comment. // TODO: once the constraint manager is smart enough to handle non simplified // symbolic expressions remove this function. Note that this can not be used in // the constraint manager as is, since this does not handle overflows. It is // safe to assume, however, that

[PATCH] D39332: [clang-refactor] Introduce "local-qualified-rename" action.

2017-10-30 Thread Haojian Wu via Phabricator via cfe-commits
hokein updated this revision to Diff 120792. hokein added a comment. - rebase to master - move the implementation to a refactoring rule in `local-rename` - support non-selection based refactoring action invocation call path https://reviews.llvm.org/D39332 Files: include/clang/Tooling/Refactor

[PATCH] D39332: [clang-refactor] Introduce "local-qualified-rename" action.

2017-10-30 Thread Haojian Wu via Phabricator via cfe-commits
hokein marked an inline comment as done. hokein added inline comments. Comment at: lib/Tooling/Refactoring/Rename/RenamingAction.cpp:154 + +class LocalQualifiedRename final : public RefactoringAction { +public: ioeric wrote: > arphaman wrote: > > ioeric wrote: >

[PATCH] D38801: [analyzer] In getSVal() API, disable auto-detection of void type as char type.

2017-10-30 Thread Gábor Horváth via Phabricator via cfe-commits
xazax.hun added a comment. I like the idea of making `ProgramState::getSVal(const MemRegion *)` symmetric to `ProgramState::getSVal(Loc)`. Just some philosophical questions which should probably be addressed in the future: But also I wonder, should we maintain all these overloads? I mean, a lot

r316895 - [refactor] Fix a clang-tidy warning.

2017-10-30 Thread Haojian Wu via cfe-commits
Author: hokein Date: Mon Oct 30 04:17:09 2017 New Revision: 316895 URL: http://llvm.org/viewvc/llvm-project?rev=316895&view=rev Log: [refactor] Fix a clang-tidy warning. NFC Modified: cfe/trunk/lib/Tooling/Refactoring/Rename/RenamingAction.cpp Modified: cfe/trunk/lib/Tooling/Refactoring/Ren

[PATCH] D38110: [libunwind][MIPS]: Add support for unwinding in O32 and N64 processes.

2017-10-30 Thread John Baldwin via Phabricator via cfe-commits
bsdjhb updated this revision to Diff 120798. bsdjhb marked an inline comment as done. bsdjhb added a comment. - Rebase on more MAX_REGISTER changes. - Use macro for lastDwarfRegisterNumber. - Move MIPS ABI constants under a single #ifdef __mips__. https://reviews.llvm.org/D38110 Files: includ

[PATCH] D38801: [analyzer] In getSVal() API, disable auto-detection of void type as char type.

2017-10-30 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added a comment. Yeah, cleaning up this API would be great - as long as everybody loves to have the API broken and rewrite stuff. If we are to simplify some APIs, i'd definitely start with `getAsSymExpr()`/`getAsSymbol()`/`getAsSymbolicExpression()`. Essentially we only need `getSVal(MR)`

[PATCH] D38110: [libunwind][MIPS]: Add support for unwinding in O32 and N64 processes.

2017-10-30 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo added a comment. Just a heads up WRT this patch; we're discussing changing the size of `unw_word_t` to match `uintptr_t` in https://reviews.llvm.org/D39365. Does that break anything for your case? It shouldn't affect what's stored in the Register class, only pointers in the unw_proc_in

[PATCH] D38921: [analyzer] LoopUnrolling: update the matched assignment operators

2017-10-30 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added a comment. Yay. Thanks Gabor, i didn't think about it but it look very nice to have such matcher. I think the matcher shouldn't be checker-local, but shared into `ASTMatchers.h` all other matchers - not only this matcher is universally useful, but also i have weird vague memories th

r316896 - [CodeGen] Generate TBAA info for reference loads

2017-10-30 Thread Ivan A. Kosarev via cfe-commits
Author: kosarev Date: Mon Oct 30 04:49:31 2017 New Revision: 316896 URL: http://llvm.org/viewvc/llvm-project?rev=316896&view=rev Log: [CodeGen] Generate TBAA info for reference loads Differential Revision: https://reviews.llvm.org/D39177 Modified: cfe/trunk/lib/CodeGen/CGBlocks.cpp cfe/t

[PATCH] D39177: [CodeGen] Generate TBAA info for reference loads

2017-10-30 Thread Ivan Kosarev via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL316896: [CodeGen] Generate TBAA info for reference loads (authored by kosarev). Changed prior to commit: https://reviews.llvm.org/D39177?vs=120654&id=120800#toc Repository: rL LLVM https://reviews.l

[PATCH] D38844: [analyzer] Make issue hash related tests more concise

2017-10-30 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ accepted this revision. NoQ added a comment. This revision is now accepted and ready to land. Great stuff! Comment at: lib/StaticAnalyzer/Checkers/ExprInspectionChecker.cpp:84 &ExprInspectionChecker::analyzerNumTimesReached) +.Case("clang_analyzer_hashDump",

[PATCH] D38110: [libunwind][MIPS]: Add support for unwinding in O32 and N64 processes.

2017-10-30 Thread John Baldwin via Phabricator via cfe-commits
bsdjhb added a comment. In https://reviews.llvm.org/D38110#910526, @mstorsjo wrote: > Just a heads up WRT this patch; we're discussing changing the size of > `unw_word_t` to match `uintptr_t` in https://reviews.llvm.org/D39365. Does > that break anything for your case? It shouldn't affect what'

r316900 - [analyzer] Use the signature of the primary template for issue hash calculation

2017-10-30 Thread Gabor Horvath via cfe-commits
Author: xazax Date: Mon Oct 30 05:16:07 2017 New Revision: 316900 URL: http://llvm.org/viewvc/llvm-project?rev=316900&view=rev Log: [analyzer] Use the signature of the primary template for issue hash calculation Now when a template is instantiated more times and there is a bug found in the instan

[PATCH] D38728: [analyzer] Use the signature of the primary template for issue hash calculation

2017-10-30 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL316900: [analyzer] Use the signature of the primary template for issue hash calculation (authored by xazax). Changed prior to commit: https://reviews.llvm.org/D38728?vs=118788&id=120804#toc Repository:

[PATCH] D39416: [modules] Correctly overload getModule in the MultiplexExternalSemaSource

2017-10-30 Thread Raphael Isemann via Phabricator via cfe-commits
teemperor created this revision. The MultiplexExternalSemaSource doesn't correctly overload the `getModule` function, causing the multiplexer to not forward this call as intended. https://reviews.llvm.org/D39416 Files: include/clang/Sema/MultiplexExternalSemaSource.h lib/Sema/MultiplexExte

[PATCH] D39416: [modules] Correctly overload getModule in the MultiplexExternalSemaSource

2017-10-30 Thread Raphael Isemann via Phabricator via cfe-commits
teemperor updated this revision to Diff 120808. teemperor added a comment. - Removed `virtual` keyword when we already have `override`. https://reviews.llvm.org/D39416 Files: include/clang/Sema/MultiplexExternalSemaSource.h lib/Sema/MultiplexExternalSemaSource.cpp Index: lib/Sema/Multiple

[PATCH] D39365: [libunwind] Change unw_word_t to always have the same size as the pointer size

2017-10-30 Thread David Chisnall via Phabricator via cfe-commits
theraven added a comment. This makes things worse for us. On CHERI, `[u]intptr_t` is a (`typedef` for a) built-in type that can hold a capability. Having `unw_word_t` be `uintptr_t` made LLVM's libunwind considerably easier to port than the HP unwinder would have been, because `uintptr_t` is

[PATCH] D39365: [libunwind] Change unw_word_t to always have the same size as the pointer size

2017-10-30 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo added a comment. In https://reviews.llvm.org/D39365#910590, @theraven wrote: > This makes things worse for us. On CHERI, `[u]intptr_t` is a (`typedef` for > a) built-in type that can hold a capability. Having `unw_word_t` be > `uintptr_t` For understanding, I guess you meant "Havin

[PATCH] D39419: Fix crash when parsing objective-c++ containing invalid lambda

2017-10-30 Thread Jan Korous via Phabricator via cfe-commits
jkorous-apple created this revision. https://reviews.llvm.org/D39419 Files: lib/Parse/ParseExprCXX.cpp test/Parser/objcxx11-invalid-lambda.cpp Index: test/Parser/objcxx11-invalid-lambda.cpp === --- /dev/null +++ test/Parser/obj

r316903 - [clang-format] Format raw string literals

2017-10-30 Thread Krasimir Georgiev via cfe-commits
Author: krasimir Date: Mon Oct 30 07:01:50 2017 New Revision: 316903 URL: http://llvm.org/viewvc/llvm-project?rev=316903&view=rev Log: [clang-format] Format raw string literals Summary: This patch adds raw string literal formatting. Reviewers: djasper, klimek Reviewed By: klimek Subscribers: k

r316906 - Keep MSVC2015 happy after r316903

2017-10-30 Thread Krasimir Georgiev via cfe-commits
Author: krasimir Date: Mon Oct 30 07:30:14 2017 New Revision: 316906 URL: http://llvm.org/viewvc/llvm-project?rev=316906&view=rev Log: Keep MSVC2015 happy after r316903 Modified: cfe/trunk/lib/Format/Format.cpp Modified: cfe/trunk/lib/Format/Format.cpp URL: http://llvm.org/viewvc/llvm-proje

[PATCH] D38688: [clang-tidy] Misc redundant expressions checker updated for macros

2017-10-30 Thread Barancsuk Lilla via Phabricator via cfe-commits
barancsuk updated this revision to Diff 120820. barancsuk marked 17 inline comments as done. barancsuk added a comment. Address review comments, discard ambiguously redundant macro expressions https://reviews.llvm.org/D38688 Files: clang-tidy/misc/RedundantExpressionCheck.cpp clang-tidy/mis

[PATCH] D38688: [clang-tidy] Misc redundant expressions checker updated for macros

2017-10-30 Thread Barancsuk Lilla via Phabricator via cfe-commits
barancsuk added inline comments. Comment at: clang-tidy/misc/RedundantExpressionCheck.cpp:633-635 +// The function discards (X < M1 && X <= M2), because it can always be +// simplified to X < M, where M is the smaller one of the two macro +// values. aaron.ballm

r316909 - CodeGen: Fix insertion position of addrspace cast for alloca

2017-10-30 Thread Yaxun Liu via cfe-commits
Author: yaxunl Date: Mon Oct 30 07:38:30 2017 New Revision: 316909 URL: http://llvm.org/viewvc/llvm-project?rev=316909&view=rev Log: CodeGen: Fix insertion position of addrspace cast for alloca For non-zero alloca addr space, alloca is usually casted to default addr space immediately. For non-vl

[PATCH] D39374: CodeGen: Fix insertion position of addrspace cast for alloca

2017-10-30 Thread Yaxun Liu via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL316909: CodeGen: Fix insertion position of addrspace cast for alloca (authored by yaxunl). Changed prior to commit: https://reviews.llvm.org/D39374?vs=120609&id=120823#toc Repository: rL LLVM https:

r316910 - [clang-format] Handle CRLF correctly when formatting escaped newlines

2017-10-30 Thread Krasimir Georgiev via cfe-commits
Author: krasimir Date: Mon Oct 30 07:41:34 2017 New Revision: 316910 URL: http://llvm.org/viewvc/llvm-project?rev=316910&view=rev Log: [clang-format] Handle CRLF correctly when formatting escaped newlines Subscribers: klimek Differential Revision: https://reviews.llvm.org/D39420 Contributed by

[PATCH] D37897: [StaticAnalyzer] Fix ProgramState for static variables that are not written

2017-10-30 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added a comment. > however as far as I see this will mean the LoopUnroller AST matchers can't be > reused unless I change them. Hmm. What is the problem here? I'm expecting library linkage issues (i.e. libAnalysis is not linked to libASTMatchers directly), but i guess it'd better to have t

[PATCH] D39365: [libunwind] Change unw_word_t to always have the same size as the pointer size

2017-10-30 Thread David Chisnall via Phabricator via cfe-commits
theraven added a comment. In https://reviews.llvm.org/D39365#910622, @mstorsjo wrote: > In https://reviews.llvm.org/D39365#910590, @theraven wrote: > > > This makes things worse for us. On CHERI, `[u]intptr_t` is a (`typedef` > > for a) built-in type that can hold a capability. Having `unw_wor

[PATCH] D39121: [clang-tidy] Misplaced Operator in Strlen in Alloc

2017-10-30 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In https://reviews.llvm.org/D39121#910440, @baloghadamsoftware wrote: > In https://reviews.llvm.org/D39121#909255, @aaron.ballman wrote: > > > My only remaining concern is with the diagnostic message/fixit interaction > > itself. Let's see if @alexfh has any sugges

[PATCH] D39008: [CodeGen] Propagate may-alias'ness of lvalues with TBAA info

2017-10-30 Thread Ivan Kosarev via Phabricator via cfe-commits
kosarev updated this revision to Diff 120828. kosarev added a comment. - Fixed comparing and hashing of TBAA access descriptors. - Rebased on top of https://reviews.llvm.org/D39177. Thanks John! https://reviews.llvm.org/D39008 Files: lib/CodeGen/CGExpr.cpp lib/CodeGen/CGObjCRuntime.cpp l

Re: r316403 - [Analyzer] Fix for the memory leak: fix typo in if-statement.

2017-10-30 Thread David Blaikie via cfe-commits
I realize this was changed in a follow-up commit anyway, but for future reference: There's no need (& best to avoid - simpler to read, avoids bugs like this, etc) to conditionalize delete like this. Delete is a no-op on null pointers anyway, so this dtor should just contain an unconditional "delete

Re: r316536 - [Analyzer] Store BodyFarm in std::unique_ptr

2017-10-30 Thread David Blaikie via cfe-commits
Could this be a value rather than indirected through a unique_ptr? Simply: BodyFarm BdyFrm; & initialized in the ctors init list? On Tue, Oct 24, 2017 at 4:53 PM George Karpenkov via cfe-commits < cfe-commits@lists.llvm.org> wrote: > Author: george.karpenkov > Date: Tue Oct 24 16:53:19 2017 >

Re: [PATCH] D39208: [Analyzer] Do not use static storage to for implementations created in BodyFarm.cpp

2017-10-30 Thread David Blaikie via cfe-commits
On Mon, Oct 23, 2017 at 5:01 PM George Karpenkov via Phabricator via cfe-commits wrote: > george.karpenkov added a comment. > > @dcoughlin the context I was thinking about is that if everyone > consistently runs `clang-format` (if we want that), then we never would > have discussion. > The altern

[PATCH] D39121: [clang-tidy] Misplaced Operator in Strlen in Alloc

2017-10-30 Thread Balogh , Ádám via Phabricator via cfe-commits
baloghadamsoftware added a comment. In https://reviews.llvm.org/D39121#910715, @aaron.ballman wrote: > The diagnostic tells the user that you surround the arg to strlen with parens > to silence the diagnostic, but the fixit doesn't do that -- it moves the > addition to the result. That's confus

[libcxx] r316914 - Fix PR#35119 : set_union misbehaves with move_iterators. Thanks to Denis Yaroshevskiy for both the bug report and the fix.

2017-10-30 Thread Marshall Clow via cfe-commits
Author: marshall Date: Mon Oct 30 08:50:00 2017 New Revision: 316914 URL: http://llvm.org/viewvc/llvm-project?rev=316914&view=rev Log: Fix PR#35119 : set_union misbehaves with move_iterators. Thanks to Denis Yaroshevskiy for both the bug report and the fix. Added: libcxx/trunk/test/std/algo

[PATCH] D39405: std::set_union accesses values after move.

2017-10-30 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. Committed as revision 316914. Thanks! https://reviews.llvm.org/D39405 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://li

[PATCH] D39365: [libunwind] Change unw_word_t to always have the same size as the pointer size

2017-10-30 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo added a comment. In https://reviews.llvm.org/D39365#910713, @theraven wrote: > Sorry - it looks as if I read the diff back to front. I seem to be less > awake than I thought today... > > Reading the diff the correct way around, this seems like a definite > improvement. Ok, thanks! T

[PATCH] D39396: Fix for PR33930. Short-circuit metadata mapping when cloning a varargs thunk.

2017-10-30 Thread Adrian Prantl via Phabricator via cfe-commits
aprantl added a comment. > The only drawback is that the cloned function's (the thunk's) > DILocalVariableNodes will not appear in the newly cloned DISubprogram's node > variable list. Instead, the new node points to the original function's > variable list. However, since the only difference be

[PATCH] D39396: Fix for PR33930. Short-circuit metadata mapping when cloning a varargs thunk.

2017-10-30 Thread Adrian Prantl via Phabricator via cfe-commits
aprantl added inline comments. Comment at: include/llvm/IR/Metadata.h:961 + /// \brief Resolve a unique, unresolved node. + void resolve(); The `\brief ` is redundant and can be dropped. https://reviews.llvm.org/D39396 ___

[libcxx] r316917 - Mark test as unsupported on C++98/03, since it uses move_iterator

2017-10-30 Thread Marshall Clow via cfe-commits
Author: marshall Date: Mon Oct 30 09:07:59 2017 New Revision: 316917 URL: http://llvm.org/viewvc/llvm-project?rev=316917&view=rev Log: Mark test as unsupported on C++98/03, since it uses move_iterator Modified: libcxx/trunk/test/std/algorithms/alg.sorting/alg.set.operations/set.union/set_uni

[PATCH] D39422: [analyzer] pr34779: CStringChecker: Don't get crashed by non-standard standard library function definitions.

2017-10-30 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ created this revision. An assertion failure was triggered in pr34779 by defining `strcpy` as `void (unsigned char *, unsigned char *)`, while normally it is `char *(char *, char *)`. The assertion is removed because normally we try not to crash in such cases, but simply refuse to model. For

[PATCH] D39423: [analyzer] Left shifting a negative value is undefined

2017-10-30 Thread Gábor Horváth via Phabricator via cfe-commits
xazax.hun created this revision. Herald added subscribers: szepet, baloghadamsoftware, whisperity. The analyzer did not return an UndefVal in case a negative value was left shifted. I also added altered the UndefResultChecker to emit a clear warning in this case. Repository: rL LLVM https:/

[PATCH] D39239: [AST] Incorrectly qualified unscoped enumeration as template actual parameter.

2017-10-30 Thread Carlos Alberto Enciso via Phabricator via cfe-commits
CarlosAlbertoEnciso added a reviewer: tberghammer. CarlosAlbertoEnciso added a comment. Hi Tamas, I have added you to this review, as I think I have found something odd with the LLDB. Basically after this intended patch to the compiler (to emit scoped information only for scoped enums) the fol

[PATCH] D39121: [clang-tidy] Misplaced Operator in Strlen in Alloc

2017-10-30 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In https://reviews.llvm.org/D39121#910735, @baloghadamsoftware wrote: > In https://reviews.llvm.org/D39121#910715, @aaron.ballman wrote: > > > The diagnostic tells the user that you surround the arg to strlen with > > parens to silence the diagnostic, but the fixit

[PATCH] D39422: [analyzer] pr34779: CStringChecker: Don't get crashed by non-standard standard library function definitions.

2017-10-30 Thread Gábor Horváth via Phabricator via cfe-commits
xazax.hun accepted this revision. xazax.hun added a comment. This revision is now accepted and ready to land. This patch looks good to me. I am wondering whether it would make sense to have some kind of warning (even in the frontend if not in the analyzer) for using standard functions with non-s

[PATCH] D39370: [clang-tidy] Detect bugs in bugprone-misplaced-operator-in-strlen-in-alloc even in the case the allocation function is called using a constant function pointer

2017-10-30 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 FYI: it's been difficult to perform this review because all of these reviews are touching the same chunk of code for something that's not been committed yet. It would be ea

Re: [PATCH] D24886: Add [[clang::suppress(rule, ...)]] attribute

2017-10-30 Thread Aaron Ballman via cfe-commits
On Sun, Oct 29, 2017 at 4:42 AM, Hristo Hristov via Phabricator wrote: > roccoor added a comment. > > Microsoft supports: > > [[gsl::suppress(bounds.3)]] > > Clang requires: > > [[gsl::suppress("bounds.3")]] > > Why is this inconsistency? I believe that when we added this attribute, MSVC did

[PATCH] D38688: [clang-tidy] Misc redundant expressions checker updated for macros

2017-10-30 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang-tidy/misc/RedundantExpressionCheck.cpp:633-635 +// The function discards (X < M1 && X <= M2), because it can always be +// simplified to X < M, where M is the smaller one of the two macro +// values. barancs

[PATCH] D39239: [AST] Incorrectly qualified unscoped enumeration as template actual parameter.

2017-10-30 Thread Tamas Berghammer via Phabricator via cfe-commits
tberghammer added a comment. 2 fairly random ideas without looking into it too much: - Can you do a diff of the debug_info dump before and after your change? Understanding what have changed should give us a pretty good clue about the issue. - My first guess is that after your change we emit DW_

[PATCH] D39367: [clang-tidy] Add support for operator new[] in check bugprone-misplaced-operator-in-strlen-in-alloc

2017-10-30 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 https://reviews.llvm.org/D39367 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/

[PATCH] D39370: [clang-tidy] Detect bugs in bugprone-misplaced-operator-in-strlen-in-alloc even in the case the allocation function is called using a constant function pointer

2017-10-30 Thread Balogh , Ádám via Phabricator via cfe-commits
baloghadamsoftware added a comment. In https://reviews.llvm.org/D39370#910791, @aaron.ballman wrote: > LGTM > > FYI: it's been difficult to perform this review because all of these reviews > are touching the same chunk of code for something that's not been committed > yet. It would be easier to

[PATCH] D39370: [clang-tidy] Detect bugs in bugprone-misplaced-operator-in-strlen-in-alloc even in the case the allocation function is called using a constant function pointer

2017-10-30 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In https://reviews.llvm.org/D39370#910803, @baloghadamsoftware wrote: > In https://reviews.llvm.org/D39370#910791, @aaron.ballman wrote: > > > LGTM > > > > FYI: it's been difficult to perform this review because all of these > > reviews are touching the same chunk

[PATCH] D39365: [libunwind] Change unw_word_t to always have the same size as the pointer size

2017-10-30 Thread Reid Kleckner via Phabricator via cfe-commits
rnk accepted this revision. rnk added a comment. This revision is now accepted and ready to land. In https://reviews.llvm.org/D39365#909912, @compnerd wrote: > @rnk given that the remote unwinder is completely unimplemented ATM, I think > that this isn't a big concern. I'm not sure that this ma

[PATCH] D39149: [libc++] Prevent tautological comparisons

2017-10-30 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists added a comment. I dislike this change fairly strongly. I would much rather pursue a clang-based solution (since clang is being unhelpful here) Don't know if we can get one, though. https://reviews.llvm.org/D39149 ___ cfe-commits mailin

r316924 - [analyzer] Left shifting a negative value is undefined

2017-10-30 Thread Gabor Horvath via cfe-commits
Author: xazax Date: Mon Oct 30 10:06:42 2017 New Revision: 316924 URL: http://llvm.org/viewvc/llvm-project?rev=316924&view=rev Log: [analyzer] Left shifting a negative value is undefined The analyzer did not return an UndefVal in case a negative value was left shifted. I also altered the UndefRes

[PATCH] D39423: [analyzer] Left shifting a negative value is undefined

2017-10-30 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL316924: [analyzer] Left shifting a negative value is undefined (authored by xazax). Changed prior to commit: https://reviews.llvm.org/D39423?vs=120837&id=120841#toc Repository: rL LLVM https://revie

[PATCH] D38844: [analyzer] Make issue hash related tests more concise

2017-10-30 Thread Anna Zaks via Phabricator via cfe-commits
zaks.anna added a comment. I'd also include some info on how it's now possible to dump the issue hash. You introduce a new debugging function here "clang_analyzer_hashDump" but it's not mentioned in the commit message. Thanks! Comment at: lib/StaticAnalyzer/Checkers/ExprInsp

[PATCH] D39149: [libc++] Prevent tautological comparisons

2017-10-30 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added a subscriber: thakis. lebedev.ri added a comment. That is my diagnostic, so i guess this is the time to reply :) In https://reviews.llvm.org/D39149#910825, @mclow.lists wrote: > I dislike this change fairly strongly. > I would much rather pursue a clang-based solution (since cl

[PATCH] D35780: Introduce -nostdlib++ flag to disable linking the C++ standard library.

2017-10-30 Thread Nico Weber via Phabricator via cfe-commits
thakis added a comment. Sounds like this ended up being useful for Android too: https://github.com/android-ndk/ndk/issues/105#issuecomment-324179958 https://reviews.llvm.org/D35780 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://list

[PATCH] D39149: [libc++] Prevent tautological comparisons

2017-10-30 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists added a comment. If we have to go down this road, I'd prefer the approach used in http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/experimental/filesystem/fs.op.funcs/fs.op.last_write_time/last_write_time.pass.cpp?r1=315874&r2=315873&pathrev=315874 https://reviews.llvm.org/

[PATCH] D39149: [libc++] Prevent tautological comparisons

2017-10-30 Thread Shoaib Meenai via Phabricator via cfe-commits
smeenai planned changes to this revision. smeenai added a comment. In https://reviews.llvm.org/D39149#910858, @mclow.lists wrote: > If we have to go down this road, I'd prefer the approach used in > http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/experimental/filesystem/fs.op.funcs/fs.

[PATCH] D39149: [libc++] Prevent tautological comparisons

2017-10-30 Thread Shoaib Meenai via Phabricator via cfe-commits
smeenai added a comment. In https://reviews.llvm.org/D39149#910825, @mclow.lists wrote: > I dislike this change fairly strongly. Agreed. Would you be happier with just disabling the diagnostics around the problematic parts? In https://reviews.llvm.org/D39149#910845, @lebedev.ri wrote: > 1. D

[PATCH] D39149: [libc++] Prevent tautological comparisons

2017-10-30 Thread Brian Cain via Phabricator via cfe-commits
bcain added a comment. In https://reviews.llvm.org/D39149#910845, @lebedev.ri wrote: > That is my diagnostic, so i guess this is the time to reply :) ... > 3. In `-Wtautological-constant-compare`, ignore any comparisons that compare > with `std::numeric_limits`. Not a fan of this solution. <-

[PATCH] D39008: [CodeGen] Propagate may-alias'ness of lvalues with TBAA info

2017-10-30 Thread John McCall via Phabricator via cfe-commits
rjmccall accepted this revision. rjmccall added a comment. This revision is now accepted and ready to land. LGTM. https://reviews.llvm.org/D39008 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/

[PATCH] D39405: std::set_union accesses values after move.

2017-10-30 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF added a comment. We should backport this, right @mclow.lists? https://reviews.llvm.org/D39405 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

r316935 - Add a test to make sure that -Wdeprecated doesn't warn on use of 'throw()' in system headers (deprecated in C++17).

2017-10-30 Thread Richard Smith via cfe-commits
Author: rsmith Date: Mon Oct 30 11:05:10 2017 New Revision: 316935 URL: http://llvm.org/viewvc/llvm-project?rev=316935&view=rev Log: Add a test to make sure that -Wdeprecated doesn't warn on use of 'throw()' in system headers (deprecated in C++17). Modified: cfe/trunk/test/SemaCXX/cxx1z-noex

r316936 - Undo accidental language mode change in this test.

2017-10-30 Thread Richard Smith via cfe-commits
Author: rsmith Date: Mon Oct 30 11:06:18 2017 New Revision: 316936 URL: http://llvm.org/viewvc/llvm-project?rev=316936&view=rev Log: Undo accidental language mode change in this test. Modified: cfe/trunk/test/SemaCXX/cxx1z-noexcept-function-type.cpp Modified: cfe/trunk/test/SemaCXX/cxx1z-noe

Re: [PATCH] D39208: [Analyzer] Do not use static storage to for implementations created in BodyFarm.cpp

2017-10-30 Thread George Karpenkov via cfe-commits
> On Oct 30, 2017, at 8:40 AM, David Blaikie wrote: > > > > On Mon, Oct 23, 2017 at 5:01 PM George Karpenkov via Phabricator via > cfe-commits mailto:cfe-commits@lists.llvm.org>> > wrote: > george.karpenkov added a comment. > > @dcoughlin the context I was thinking about is that if everyon

[PATCH] D39149: [libc++] Prevent tautological comparisons

2017-10-30 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added a comment. In https://reviews.llvm.org/D39149#910891, @bcain wrote: > In https://reviews.llvm.org/D39149#910845, @lebedev.ri wrote: > > > That is my diagnostic, so i guess this is the time to reply :) > > > ... > > > 3. In `-Wtautological-constant-compare`, ignore any comparisons

[PATCH] D39284: [c++2a] Decomposed _condition_

2017-10-30 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added inline comments. Comment at: include/clang/Sema/DeclSpec.h:2015 case ConditionContext: + return Lang.CPlusPlus2a; case MemberContext: If there's no grammar ambiguities here (and I don't think there are), please accept this uncondition

[PATCH] D39149: [libc++] Prevent tautological comparisons

2017-10-30 Thread Shoaib Meenai via Phabricator via cfe-commits
smeenai added a comment. I'm thinking you could account for all possible type sizes in the existing (enabled by default) warning, and have a different warning for possibly tautological comparisons. E.g. if a `long` is being compared against `INT_MAX`, you know that's only tautological on some p

[PATCH] D39332: [clang-refactor] Introduce "local-qualified-rename" action.

2017-10-30 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman added inline comments. Comment at: lib/Tooling/Refactoring/Rename/RenamingAction.cpp:101 + std::string NewQualifiedName) { + return QualifiedRenameRule(std::move(OldQualifiedName), + std::move(NewQualifiedName));

[PATCH] D39149: [libc++] Prevent tautological comparisons

2017-10-30 Thread Shoaib Meenai via Phabricator via cfe-commits
smeenai added a comment. In https://reviews.llvm.org/D39149#910931, @lebedev.ri wrote: > - The fact that under *different* circumstances the comparison is not > tautological is not a false-positive. It's not technically a false positive, but my suspicion is that it'll make the warning a lot l

[libcxx] r316939 - Fix PR35078 - recursive directory iterator's increment method throws incorrectly.

2017-10-30 Thread Eric Fiselier via cfe-commits
Author: ericwf Date: Mon Oct 30 11:43:21 2017 New Revision: 316939 URL: http://llvm.org/viewvc/llvm-project?rev=316939&view=rev Log: Fix PR35078 - recursive directory iterator's increment method throws incorrectly. The guts of the increment method for recursive_directory_iterator was failing to

[PATCH] D39428: [Analyzer] As suggested, use value storage for BodyFarm

2017-10-30 Thread George Karpenkov via Phabricator via cfe-commits
george.karpenkov created this revision. Herald added subscribers: szepet, kristof.beyls, xazax.hun, javed.absar, aemerson. I've also removed copy constructor to help clients not to shoot themselves in the foot with `BodyFarm stored = Manager.getBodyFarm()`. https://reviews.llvm.org/D39428 Fil

[PATCH] D39428: [Analyzer] As suggested, use value storage for BodyFarm

2017-10-30 Thread David Blaikie via Phabricator via cfe-commits
dblaikie accepted this revision. dblaikie added a comment. This revision is now accepted and ready to land. Looks good - thanks! https://reviews.llvm.org/D39428 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/ma

[PATCH] D39149: [libc++] Prevent tautological comparisons

2017-10-30 Thread Brian Cain via Phabricator via cfe-commits
bcain added a comment. In https://reviews.llvm.org/D39149#910931, @lebedev.ri wrote: > In https://reviews.llvm.org/D39149#910891, @bcain wrote: > > > In https://reviews.llvm.org/D39149#910845, @lebedev.ri wrote: > > > > > That is my diagnostic, so i guess this is the time to reply :) > > > > > >

[libcxx] r316941 - Implement LWG 3013 - some filesystem members should not be noexcept.

2017-10-30 Thread Eric Fiselier via cfe-commits
Author: ericwf Date: Mon Oct 30 11:59:59 2017 New Revision: 316941 URL: http://llvm.org/viewvc/llvm-project?rev=316941&view=rev Log: Implement LWG 3013 - some filesystem members should not be noexcept. LWG 3013 points out that the constructors and increment members of the directory iterators need

[libunwind] r316942 - Change unw_word_t to always have the same size as the pointer size

2017-10-30 Thread Martin Storsjo via cfe-commits
Author: mstorsjo Date: Mon Oct 30 12:06:34 2017 New Revision: 316942 URL: http://llvm.org/viewvc/llvm-project?rev=316942&view=rev Log: Change unw_word_t to always have the same size as the pointer size This matches the original libunwind API. This also unifies the type between ARM EHABI and the o

[PATCH] D39365: [libunwind] Change unw_word_t to always have the same size as the pointer size

2017-10-30 Thread Martin Storsjö via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL316942: Change unw_word_t to always have the same size as the pointer size (authored by mstorsjo). Changed prior to commit: https://reviews.llvm.org/D39365?vs=120562&id=120860#toc Repository: rL LLVM

[PATCH] D39280: [libunwind] Use uint64_t for unw_word_t in ARM EHABI

2017-10-30 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo abandoned this revision. mstorsjo added a comment. This was made obsolete by https://reviews.llvm.org/D39365. https://reviews.llvm.org/D39280 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/list

[PATCH] D39428: [Analyzer] As suggested, use value storage for BodyFarm

2017-10-30 Thread George Karpenkov via Phabricator via cfe-commits
george.karpenkov updated this revision to Diff 120861. https://reviews.llvm.org/D39428 Files: include/clang/Analysis/AnalysisDeclContext.h include/clang/Analysis/BodyFarm.h lib/Analysis/AnalysisDeclContext.cpp Index: lib/Analysis/AnalysisDeclContext.cpp ===

[PATCH] D39251: [libunwind] Fix building for ARM with dwarf exception handling

2017-10-30 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo updated this revision to Diff 120863. mstorsjo edited the summary of this revision. mstorsjo added a comment. Avoiding duplicating the highest register number, avoiding any further casts in log lines. https://reviews.llvm.org/D39251 Files: include/__libunwind_config.h include/libu

r316948 - [analyzer] [tests] Remove empty folders in reference results, do not store diffs.txt

2017-10-30 Thread George Karpenkov via cfe-commits
Author: george.karpenkov Date: Mon Oct 30 12:40:33 2017 New Revision: 316948 URL: http://llvm.org/viewvc/llvm-project?rev=316948&view=rev Log: [analyzer] [tests] Remove empty folders in reference results, do not store diffs.txt Storing diffs.txt is now redundant, as we simply dump the CmpRuns ou

[libcxx] r316951 - Add more fuzzing bits: partial_sort_copy, partition_copy, unique, unique_copy. No functional change to libc++; this is all test infastructure

2017-10-30 Thread Marshall Clow via cfe-commits
Author: marshall Date: Mon Oct 30 12:51:58 2017 New Revision: 316951 URL: http://llvm.org/viewvc/llvm-project?rev=316951&view=rev Log: Add more fuzzing bits: partial_sort_copy, partition_copy, unique, unique_copy. No functional change to libc++; this is all test infastructure Added: libcxx/t

[PATCH] D39149: [libc++] Prevent tautological comparisons

2017-10-30 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added a comment. In https://reviews.llvm.org/D39149#910936, @smeenai wrote: > I'm thinking you could account for all possible type sizes in the existing > (enabled by default) warning, and have a different warning for possibly > tautological comparisons. E.g. if a `long` is being compare

[PATCH] D39149: [libc++] Prevent tautological comparisons

2017-10-30 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added a comment. In https://reviews.llvm.org/D39149#911024, @rsmith wrote: > In https://reviews.llvm.org/D39149#910936, @smeenai wrote: > > > I'm thinking you could account for all possible type sizes in the existing > > (enabled by default) warning, and have a different warning for p

[PATCH] D39149: [libc++] Prevent tautological comparisons

2017-10-30 Thread Shoaib Meenai via Phabricator via cfe-commits
smeenai added a comment. In https://reviews.llvm.org/D39149#911024, @rsmith wrote: > In https://reviews.llvm.org/D39149#910936, @smeenai wrote: > > > I'm thinking you could account for all possible type sizes in the existing > > (enabled by default) warning, and have a different warning for poss

[PATCH] D36101: Fix usage of right shift operator in fold expressions

2017-10-30 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith accepted this revision. rsmith added a comment. This revision is now accepted and ready to land. Thanks! Comment at: lib/Parse/ParseExpr.cpp:273 static bool isFoldOperator(tok::TokenKind Kind) { - return isFoldOperator(getBinOpPrecedence(Kind, false, true)); + return

[PATCH] D39430: [clangd] formatting: don't ignore style

2017-10-30 Thread Raoul Wols via Phabricator via cfe-commits
rwols created this revision. Look up in parent directories for a .clang-format file. Use "LLVM" as fallback style. https://reviews.llvm.org/D39430 Files: clangd/ClangdLSPServer.cpp clangd/ClangdLSPServer.h clangd/ClangdServer.cpp clangd/ClangdServer.h Index: clangd/ClangdServer.h

[PATCH] D39430: [clangd] formatting: don't ignore style

2017-10-30 Thread Raoul Wols via Phabricator via cfe-commits
rwols added a comment. Does anyone have an idea how I would write a test for this? Also, I should have commit access after approval now. So that's less work for you guys ;) https://reviews.llvm.org/D39430 ___ cfe-commits mailing list cfe-commits@l

  1   2   >