[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. I see. Then it makes sense to do it this way. Thanks for clarifying! https://reviews.llvm.org/D39396 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D39446: [PGO] Detect more structural changes with the stable hash

2017-10-30 Thread Vedant Kumar via Phabricator via cfe-commits
vsk created this revision. Lifting from Bob Wilson's notes: The hash value that we compute and store in PGO profile data to detect out-of-date profiles does not include enough information. This means that many significant changes to the source will not cause compiler warnings about the profile bei

[PATCH] D39445: [clang-fuzzer] Fix incremental builds of the fuzzer

2017-10-30 Thread Vitaly Buka via Phabricator via cfe-commits
vitalybuka created this revision. Herald added a subscriber: mgorny. Don't use BUILD_IN_SOURCE keep git checkout clean Don't forward CMAKE_GENERATOR as ExternalProject_Add should do it already Reset UPDATE_COMMAND to avoid git checkout updates on each build https://reviews.llvm.org/D39445 Files

[PATCH] D39284: Allow conditions to be decomposed with structured bindings

2017-10-30 Thread Zhihao Yuan via Phabricator via cfe-commits
lichray updated this revision to Diff 120922. lichray marked an inline comment as done. lichray added a comment. Tweak coding style https://reviews.llvm.org/D39284 Files: include/clang/Basic/DiagnosticSemaKinds.td include/clang/Sema/DeclSpec.h lib/Parse/ParseExprCXX.cpp lib/Sema/SemaDec

[PATCH] D39441: [refactor][extract] insert semicolons into extracted/inserted code when needed

2017-10-30 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman created this revision. Herald added a subscriber: mgorny. This patch implements the semicolon insertion logic into the extract refactoring. The following rules are taken: - extracting expression: add terminating ';' to the extracted function. - extracting statements that don't require t

r316971 - [refactor] select the entire DeclStmt if one ifs decls is selected

2017-10-30 Thread Alex Lorenz via cfe-commits
Author: arphaman Date: Mon Oct 30 18:28:17 2017 New Revision: 316971 URL: http://llvm.org/viewvc/llvm-project?rev=316971&view=rev Log: [refactor] select the entire DeclStmt if one ifs decls is selected Modified: cfe/trunk/lib/Tooling/Refactoring/ASTSelection.cpp cfe/trunk/unittests/Toolin

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

2017-10-30 Thread Wolfgang Pieb via Phabricator via cfe-commits
wolfgangp marked an inline comment as done. wolfgangp added a comment. In https://reviews.llvm.org/D39396#911306, @aprantl wrote: > This works for me, but as I said previously, perhaps we can get by with just > not having any variables described in the thunk to further simplify the code. I rem

[PATCH] D39204: [CodeGen] __builtin_sqrt should map to the compiler's intrinsic sqrt function

2017-10-30 Thread Eli Friedman via Phabricator via cfe-commits
efriedma added a comment. > I was going to include the builtins too, but that exposes another bug (marked > here with FIXME) - the builtins are all defined 'const'. Probably just need to change c->e in Builtins.def? > This does make me curious about the use-case of libm-equivalent builtins. If

[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 added inline comments. Comment at: test/Analysis/string-with-signedness.c:1 +// RUN: %clang_analyze_cc1 -Wno-incompatible-library-redeclaration -analyzer-checker=core,unix.cstring,alpha.unix.cstring -verify %s + We do have a warning for this. https://revie

[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. I thought on something like this, but I still do not like my phrasing: "Addition operator is applied to the argument of strlen(). instead of its result; move the '+ 1' outside of the call. (Or, if it is intentional then surround the addition subexpression wit

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

2017-10-30 Thread Wolfgang Pieb via Phabricator via cfe-commits
wolfgangp marked 5 inline comments as done. wolfgangp added inline comments. Comment at: lib/CodeGen/CGVTables.cpp:143 + for (llvm::Function::iterator BB = Fn->begin(), E = Fn->end(); BB != E; + ++BB) { +for (llvm::Instruction &I : *BB) { aprantl wrote

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

2017-10-30 Thread Wolfgang Pieb via Phabricator via cfe-commits
wolfgangp updated this revision to Diff 120876. wolfgangp added a comment. Incorporated review comments. https://reviews.llvm.org/D39396 Files: include/llvm/IR/Metadata.h lib/CodeGen/CGVTables.cpp test/CodeGenCXX/tmp-md-nodes1.cpp test/CodeGenCXX/tmp-md-nodes2.cpp Index: test/CodeGenCX

[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 accepted this revision. aprantl added a comment. This revision is now accepted and ready to land. This works for me, but as I said previously, perhaps we can get by with just not having any variables described in the thunk to further simplify the code. https://reviews.llvm.org/D39396

[libcxx] r316970 - Fix broken links; update more issues.

2017-10-30 Thread Marshall Clow via cfe-commits
Author: marshall Date: Mon Oct 30 17:19:47 2017 New Revision: 316970 URL: http://llvm.org/viewvc/llvm-project?rev=316970&view=rev Log: Fix broken links; update more issues. Modified: libcxx/trunk/www/upcoming_meeting.html Modified: libcxx/trunk/www/upcoming_meeting.html URL: http://llvm.or

[PATCH] D39284: Allow conditions to be decomposed with structured bindings

2017-10-30 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added inline comments. Comment at: lib/Sema/SemaDeclCXX.cpp:696-698 + // a for-range-declaration, or a condition in C++2a, but we parse it in more + // cases than that. + if (!D.mayHaveDecompositionDeclarator(getLangOpts())) { lichray wrote: > rsmith wr

[libcxx] r316969 - Add a fail test for aligned_union of an incomplete type. See LWG#2979. NFC

2017-10-30 Thread Marshall Clow via cfe-commits
Author: marshall Date: Mon Oct 30 17:05:17 2017 New Revision: 316969 URL: http://llvm.org/viewvc/llvm-project?rev=316969&view=rev Log: Add a fail test for aligned_union of an incomplete type. See LWG#2979. NFC Added: libcxx/trunk/test/std/utilities/meta/meta.trans/meta.trans.other/aligned_un

[PATCH] D39284: Allow conditions to be decomposed with structured bindings

2017-10-30 Thread Zhihao Yuan via Phabricator via cfe-commits
lichray marked 3 inline comments as done. lichray added inline comments. Comment at: lib/Sema/SemaDeclCXX.cpp:696-698 + // a for-range-declaration, or a condition in C++2a, but we parse it in more + // cases than that. + if (!D.mayHaveDecompositionDeclarator(getLangOpts())) {

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

2017-10-30 Thread Zhihao Yuan via Phabricator via cfe-commits
lichray updated this revision to Diff 120913. lichray added a comment. Make the feature unconditional with an `ExtWarn` https://reviews.llvm.org/D39284 Files: include/clang/Basic/DiagnosticSemaKinds.td include/clang/Sema/DeclSpec.h lib/Parse/ParseExprCXX.cpp lib/Sema/SemaDeclCXX.cpp t

r316966 - Typo correct the condition of 'do-while' before exiting its scope

2017-10-30 Thread Alex Lorenz via cfe-commits
Author: arphaman Date: Mon Oct 30 15:55:11 2017 New Revision: 316966 URL: http://llvm.org/viewvc/llvm-project?rev=316966&view=rev Log: Typo correct the condition of 'do-while' before exiting its scope rdar://35172419 Modified: cfe/trunk/lib/Parse/ParseStmt.cpp cfe/trunk/test/SemaObjCXX/t

[PATCH] D39438: [analyzer] Diagnose stack leaks via block captures

2017-10-30 Thread Alexander Shaposhnikov via Phabricator via cfe-commits
alexshap updated this revision to Diff 120908. alexshap added a comment. Add positive tests Repository: rL LLVM https://reviews.llvm.org/D39438 Files: lib/StaticAnalyzer/Checkers/StackAddrEscapeChecker.cpp test/Analysis/stack-async-leak.m Index: test/Analysis/stack-async-leak.m

Re: r315402 - [modules] Only take visible using-directives into account during name lookup.

2017-10-30 Thread Vassil Vassilev via cfe-commits
On 30/10/17 23:40, Richard Smith wrote: On 30 October 2017 at 15:12, Vassil Vassilev via cfe-commits mailto:cfe-commits@lists.llvm.org>> wrote: On 11/10/17 03:19, Richard Smith via cfe-commits wrote: Author: rsmith Date: Tue Oct 10 18:19:11 2017 New Revision: 315402

[PATCH] D39438: [analyzer] Diagnose stack leaks via block captures

2017-10-30 Thread Alexander Shaposhnikov via Phabricator via cfe-commits
alexshap created this revision. Herald added subscribers: szepet, xazax.hun. This diff extends StackAddrEscapeChecker to catch stack addr leaks via block captures if the block is executed asynchronously. Test plan: make check-all Repository: rL LLVM https://reviews.llvm.org/D39438 Files:

Re: r315402 - [modules] Only take visible using-directives into account during name lookup.

2017-10-30 Thread Richard Smith via cfe-commits
On 30 October 2017 at 15:12, Vassil Vassilev via cfe-commits < cfe-commits@lists.llvm.org> wrote: > On 11/10/17 03:19, Richard Smith via cfe-commits wrote: > >> Author: rsmith >> Date: Tue Oct 10 18:19:11 2017 >> New Revision: 315402 >> >> URL: http://llvm.org/viewvc/llvm-project?rev=315402&view=r

Re: r316965 - [modules] Retain multiple using-directives in the same scope even if they name the same namespace.

2017-10-30 Thread Richard Smith via cfe-commits
I should add: the test is courtesy of Vassil Vassilev. Thanks! On 30 October 2017 at 15:38, Richard Smith via cfe-commits < cfe-commits@lists.llvm.org> wrote: > Author: rsmith > Date: Mon Oct 30 15:38:20 2017 > New Revision: 316965 > > URL: http://llvm.org/viewvc/llvm-project?rev=316965&view=rev

r316965 - [modules] Retain multiple using-directives in the same scope even if they name the same namespace.

2017-10-30 Thread Richard Smith via cfe-commits
Author: rsmith Date: Mon Oct 30 15:38:20 2017 New Revision: 316965 URL: http://llvm.org/viewvc/llvm-project?rev=316965&view=rev Log: [modules] Retain multiple using-directives in the same scope even if they name the same namespace. They might have different visibility, and thus discarding all bu

[PATCH] D39204: [CodeGen] __builtin_sqrt should map to the compiler's intrinsic sqrt function

2017-10-30 Thread Sanjay Patel via Phabricator via cfe-commits
spatel updated this revision to Diff 120902. spatel added a comment. Patch updated: As suggested, I've morphed this patch to just handle sqrt libcalls based on the updated LLVM intrinsic definition. I was going to include the builtins too, but that exposes another bug (marked here with FIXME) -

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

2017-10-30 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir added a comment. For testing you could do something similar to how clang-format does it . https://reviews.llvm.org/D39430 ___ cfe-commits mailing list

r316963 - [analyzer] Use the same filename for the header and the implementation of BugReporterVisitor

2017-10-30 Thread George Karpenkov via cfe-commits
Author: george.karpenkov Date: Mon Oct 30 15:31:57 2017 New Revision: 316963 URL: http://llvm.org/viewvc/llvm-project?rev=316963&view=rev Log: [analyzer] Use the same filename for the header and the implementation of BugReporterVisitor Differential Revision: https://reviews.llvm.org/D37935 Adde

Re: r315402 - [modules] Only take visible using-directives into account during name lookup.

2017-10-30 Thread Vassil Vassilev via cfe-commits
On 11/10/17 03:19, Richard Smith via cfe-commits wrote: Author: rsmith Date: Tue Oct 10 18:19:11 2017 New Revision: 315402 URL: http://llvm.org/viewvc/llvm-project?rev=315402&view=rev Log: [modules] Only take visible using-directives into account during name lookup. Added: cfe/trunk/test/M

[PATCH] D35894: [clangd] Code hover for Clangd

2017-10-30 Thread William Enright via Phabricator via cfe-commits
Nebiroth added a comment. I also have a quick patch that supports displaying comments preceding the declaration of a function. Once the review comments have been addressed for this revision I will submit it. https://reviews.llvm.org/D35894 ___ cfe

[PATCH] D36836: [clang-tidy] Implement readability-function-cognitive-complexity check

2017-10-30 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri updated this revision to Diff 120890. lebedev.ri marked 2 inline comments as done. lebedev.ri added a comment. Ping. Rebased. Silenced (via the `-w` flag in the `RUN` line) the `Fix conflicts with existing fix!` assertion since this differential does not actually cause it, but the te

[PATCH] D39269: [Analyzer] [Tests] Do not discard output from CmpRuns.py when running integration tests

2017-10-30 Thread George Karpenkov via Phabricator via cfe-commits
george.karpenkov added a comment. @zaks.anna prints "XXX added / XXX removed" for every report which has appeared or disappeared. https://reviews.llvm.org/D39269 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/

[PATCH] D35894: [clangd] Code hover for Clangd

2017-10-30 Thread William Enright via Phabricator via cfe-commits
Nebiroth updated this revision to Diff 120894. Nebiroth added a comment. Code hover now displays declaration of symbol instead of source code by default. Code hover now displays context information such as namespace and class name. Array of MarkedString objects is now sent as response in JSON. 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

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

[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

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

[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

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

[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

[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

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

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

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

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

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

[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

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

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

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

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

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

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

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

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

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

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

[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

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

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

  1   2   >