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

2017-10-31 Thread Nicolas Lesser via Phabricator via cfe-commits
Rakete updated this revision to Diff 120966. Rakete added a comment. Used Parser's `GreaterThanIsOperator` just to be sure. :) https://reviews.llvm.org/D36101 Files: include/clang/Parse/Parser.h lib/Parse/ParseExpr.cpp test/Parser/cxx1z-fold-expressions.cpp Index:

[PATCH] D37437: [analyzer] Fix some checker's output plist not containing the checker name

2017-10-31 Thread Gábor Horváth via Phabricator via cfe-commits
xazax.hun added a comment. In https://reviews.llvm.org/D37437#909537, @zaks.anna wrote: > Just to be clear, since this leads to regression to the checker API, I am > asking to look into other ways of solving this problem. For example, is there > a way to ensure that the checker names are set

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

2017-10-31 Thread Vassil Vassilev via Phabricator via cfe-commits
v.g.vassilev accepted this revision. v.g.vassilev added a comment. This revision is now accepted and ready to land. LGTM! https://reviews.llvm.org/D39416 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

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

2017-10-31 Thread Nicolas Lesser via Phabricator via cfe-commits
Rakete updated this revision to Diff 120977. Rakete added a comment. Added some more tests. If this patch is still ok can you please commit it @rsmith ? Thanks! https://reviews.llvm.org/D36101 Files: include/clang/Parse/Parser.h lib/Parse/ParseExpr.cpp

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

2017-10-31 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added a comment. Hey, i just recalled that we have documentation for `ExprInspection` functions in `docs/analyzer/DebugChecks.rst`, you may want to add your function there as well :) Repository: rL LLVM https://reviews.llvm.org/D38844 ___

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

2017-10-31 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In https://reviews.llvm.org/D39121#910802, @baloghadamsoftware wrote: > 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

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

2017-10-31 Thread Balogh , Ádám via Phabricator via cfe-commits
baloghadamsoftware added a comment. Can you give me please an example where `malloc(strlen(s+1))` is intentional. It allocates `2` byte less than needed to store `s`. If it is really the goal (e.g. `s` has a `2` character prefix which we do not want to copy) then the correct solution is to use

[PATCH] D33620: [CodeGenCXX] do not default to dllimport storage for mingw-w64

2017-10-31 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo added a comment. After trying to build a bit more code with clang and a static libcxx, I agree with this change, so +1 from me. @compnerd ? Repository: rL LLVM https://reviews.llvm.org/D33620 ___ cfe-commits mailing list

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

2017-10-31 Thread Carlos Alberto Enciso via Phabricator via cfe-commits
CarlosAlbertoEnciso added a comment. Hi Tamas, Thanks very much for your message. In https://reviews.llvm.org/D39239#910797, @tberghammer wrote: > - 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

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

2017-10-31 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In https://reviews.llvm.org/D39121#911736, @baloghadamsoftware wrote: > Can you give me please an example where `malloc(strlen(s+1))` is intentional. > It allocates `2` byte less than needed to store `s`. If it is really the goal > (e.g. `s` has a `2` character

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

2017-10-31 Thread Bob Wilson via Phabricator via cfe-commits
bob.wilson added a comment. I'm excited to see some progress on this, but since there is overhead to adding a new hashing scheme, I think we should do more before introducing a new scheme. One of the problems with the previous scheme is that is did not take into account nesting. Distinguishing

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

2017-10-31 Thread Vedant Kumar via Phabricator via cfe-commits
vsk planned changes to this revision. vsk added a comment. Apart from Alex's point, this patch is missing a compatibility test for v5 of the profile format, and is missing coverage for the new entries in `HashType`. Comment at: lib/CodeGen/CodeGenPGO.cpp:186 +if

[PATCH] D39457: [OPENMP] Current status of OpenMP support.

2017-10-31 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev created this revision. Some info about supported features of OpenMP 4.5-5.0. https://reviews.llvm.org/D39457 Files: docs/OpenMPSupport.rst docs/index.rst Index: docs/index.rst === --- docs/index.rst +++

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

2017-10-31 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added a comment. 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 clang is being > unhelpful here) > Don't know if we can get one, though. @smeenai

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

2017-10-31 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman added inline comments. Comment at: lib/CodeGen/CodeGenPGO.cpp:186 +if (Hash.getHashVersion() != PGO_HASH_V1) + Type = getHashType(Hash.getHashVersion(), S); + Am I missing something or will this call always return the same type as before since

[PATCH] D39457: [OPENMP] Current status of OpenMP support.

2017-10-31 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added a comment. In https://reviews.llvm.org/D39457#911950, @Hahnfeld wrote: > Do we want to add documentation about which target devices Clang can generate > code for? Ok Comment at: docs/OpenMPSupport.rst:46 + +* #pragma omp distribute parallel for [simd]:

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

2017-10-31 Thread Sanjay Patel via Phabricator via cfe-commits
spatel added a comment. In https://reviews.llvm.org/D39204#911316, @efriedma wrote: > > 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? Yes - at

[PATCH] D35295: [docs] Add section 'Half-Precision Floating Point'

2017-10-31 Thread Sjoerd Meijer via Phabricator via cfe-commits
SjoerdMeijer updated this revision to Diff 121003. SjoerdMeijer added a comment. Addressed the comments about portability, and added a note that Float16 is available in both C and C++ mode. https://reviews.llvm.org/D35295 Files: docs/LanguageExtensions.rst Index:

[PATCH] D37808: [clang-tidy] Add new hicpp-multiway-paths-covered check for missing branches

2017-10-31 Thread Jonas Toth via Phabricator via cfe-commits
JonasToth updated this revision to Diff 121011. JonasToth added a comment. - fix rebasing issues in docs https://reviews.llvm.org/D37808 Files: clang-tidy/hicpp/CMakeLists.txt clang-tidy/hicpp/HICPPTidyModule.cpp clang-tidy/hicpp/MultiwayPathsCoveredCheck.cpp

Fwd: [PATCH] D39462: [Sema] Implement -Wmaybe-tautological-constant-compare for when the tautologicalness is data model dependent

2017-10-31 Thread Roman Lebedev via cfe-commits
And i have again forgot to add the appropriate -commits list from the start. Is there any reason at all why phab does not/should not do that automatically? -- Forwarded message -- From: Roman Lebedev via Phabricator Date: Tue, Oct 31, 2017 at 8:44 PM

[PATCH] D39457: [OPENMP] Current status of OpenMP support.

2017-10-31 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev updated this revision to Diff 121018. ABataev added a comment. Added info about supported devices. https://reviews.llvm.org/D39457 Files: docs/OpenMPSupport.rst docs/index.rst Index: docs/index.rst === ---

[PATCH] D37808: [clang-tidy] Add new hicpp-multiway-paths-covered check for missing branches

2017-10-31 Thread Jonas Toth via Phabricator via cfe-commits
JonasToth updated this revision to Diff 121009. JonasToth added a comment. - improved docs and comments - remove some newlines - use ternary operator instead of smallvec https://reviews.llvm.org/D37808 Files: clang-tidy/hicpp/CMakeLists.txt clang-tidy/hicpp/HICPPTidyModule.cpp

[PATCH] D37808: [clang-tidy] Add new hicpp-multiway-paths-covered check for missing branches

2017-10-31 Thread Jonas Toth via Phabricator via cfe-commits
JonasToth added a comment. @aaron.ballman could you take a (i think) finishing look on the check? Most issues should be resolved and i think its ready for the finishing line :) https://reviews.llvm.org/D37808 ___ cfe-commits mailing list

[PATCH] D39457: [OPENMP] Current status of OpenMP support.

2017-10-31 Thread Jonas Hahnfeld via Phabricator via cfe-commits
Hahnfeld added a comment. Do we want to add documentation about which target devices Clang can generate code for? Comment at: docs/OpenMPSupport.rst:46 + +* #pragma omp distribute parallel for [simd]: :partial:`Partial`. No full codegen support. + I think

[PATCH] D39462: [Sema] Implement -Wmaybe-tautological-constant-compare for when the tautologicalness is data model dependent

2017-10-31 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. The actual choice of integer type is not stable across targets any more than the size is. In practice, people often don't use int and long, they use standard typedefs like size_t and uint64_t, but the actual type chosen for size_t is arbitrary when there are multiple

[PATCH] D39079: New clang option -fno-plt to avoid PLT for external calls

2017-10-31 Thread Sriraman Tallam via Phabricator via cfe-commits
tmsriram added a comment. Ping. How do we take this forward? https://reviews.llvm.org/D39079 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2017-10-31 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added inline comments. Comment at: lib/StaticAnalyzer/Checkers/StackAddrEscapeChecker.cpp:128 + !Call.isGlobalCFunction("dispatch_async") && + !Call.isGlobalCFunction("dispatch_once")) +return; `dispatch_once` isn't really asynchronous; i think

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

2017-10-31 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In https://reviews.llvm.org/D39121#911745, @aaron.ballman wrote: > Hmm, this is a good point -- I was thinking of the generic +N case with the > original example, but with an explicit +1, you can't run into that situation > with Win32 APIs. I will think on this a

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

2017-10-31 Thread Matt Morehouse via Phabricator via cfe-commits
morehouse accepted this revision. morehouse added a comment. This revision is now accepted and ready to land. LGTM. https://reviews.llvm.org/D39445 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D39455: [CodeGen] Add initial support for union members in TBAA

2017-10-31 Thread Ivan Kosarev via Phabricator via cfe-commits
kosarev created this revision. kosarev added a project: clang. The basic idea behind this patch is that since in strict aliasing mode all accesses to union members require their outermost enclosing union objects to be specified explicitly, then for a couple given accesses to union members of

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

2017-10-31 Thread Balogh , Ádám via Phabricator via cfe-commits
baloghadamsoftware added a comment. In https://reviews.llvm.org/D39121#911741, @aaron.ballman wrote: > As I pointed out earlier in the thread, it is common to have > double-null-terminated strings in Win32 APIs. This is a case where strlen(s + > N) is valid. Since 1-byte strings would also be

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

2017-10-31 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added a comment. What i was trying to say is - Hey this check looks useful!~ Great idea. Repository: rL LLVM https://reviews.llvm.org/D39438 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

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

2017-10-31 Thread Alexander Shaposhnikov via Phabricator via cfe-commits
alexshap added inline comments. Comment at: lib/StaticAnalyzer/Checkers/StackAddrEscapeChecker.cpp:144 +return; + if (dyn_cast_or_null(Region->getMemorySpace())) { +ExplodedNode *N = C.generateErrorNode(); NoQ wrote: > `getMemorySpace()` is

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

2017-10-31 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In https://reviews.llvm.org/D39121#911744, @baloghadamsoftware wrote: > In https://reviews.llvm.org/D39121#911741, @aaron.ballman wrote: > > > As I pointed out earlier in the thread, it is common to have > > double-null-terminated strings in Win32 APIs. This is a

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

2017-10-31 Thread Eli Friedman via Phabricator via cfe-commits
efriedma accepted this revision. efriedma added a comment. This revision is now accepted and ready to land. Let's do this one step at a time; first this patch, then fix the __builtin_* functions to use "e", then add all the missing cases CodeGenFunction::EmitBuiltinExpr. This patch LGTM,

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

2017-10-31 Thread George Karpenkov via Phabricator via cfe-commits
george.karpenkov added a comment. @xazax.hun I'm really not convinced: george@/Volumes/Transcend/code/llvm (master)≻ rg "\w+\&" tools/clang/include/clang/StaticAnalyzer tools/clang/include/clang/StaticAnalyzer/Core/Checker.h 31: static void _checkDecl(void *checker, const Decl *D,

[PATCH] D35109: [Analyzer] SValBuilder Comparison Rearrangement

2017-10-31 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added a comment. In https://reviews.llvm.org/D35109#837723, @NoQ wrote: > It's something similar to assuming that the string length is within range [0, > INT_MAX/4] in CStringChecker: we can easily assume that no overflow is > happening in computations involving string lengths or iterator

r317031 - [CodeGen] map sqrt libcalls to llvm.sqrt when errno is not set

2017-10-31 Thread Sanjay Patel via cfe-commits
Author: spatel Date: Tue Oct 31 13:19:39 2017 New Revision: 317031 URL: http://llvm.org/viewvc/llvm-project?rev=317031=rev Log: [CodeGen] map sqrt libcalls to llvm.sqrt when errno is not set The LLVM sqrt intrinsic definition changed with: D28797 ...so we don't have to use any relaxed FP

[PATCH] D39204: [CodeGen] map sqrt libcalls to llvm.sqrt when errno is not set

2017-10-31 Thread Sanjay Patel via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL317031: [CodeGen] map sqrt libcalls to llvm.sqrt when errno is not set (authored by spatel). Changed prior to commit: https://reviews.llvm.org/D39204?vs=120902=121042#toc Repository: rL LLVM

[PATCH] D39079: New clang option -fno-plt to avoid PLT for external calls

2017-10-31 Thread Reid Kleckner via Phabricator via cfe-commits
rnk added a comment. I'd also like to highlight that LLVM has many users with different needs. Sometimes we need to "disagree and commit". Flags are one of the primary ways that we have to do that. https://reviews.llvm.org/D39079 ___ cfe-commits

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

2017-10-31 Thread Sanjay Patel via Phabricator via cfe-commits
spatel added a comment. In https://reviews.llvm.org/D39204#912084, @efriedma wrote: > Let's do this one step at a time; first this patch, then fix the __builtin_* > functions to use "e", then add all the missing cases > CodeGenFunction::EmitBuiltinExpr. Sounds good. > This patch LGTM,

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

2017-10-31 Thread Gábor Horváth via Phabricator via cfe-commits
xazax.hun added a comment. In https://reviews.llvm.org/D39428#912126, @george.karpenkov wrote: > @xazax.hun I'm really not convinced: Unfortunately, the LLVM codebase right now does not strictly follow the style guide. But clang-format puts the references next to the variable (or function in

r317032 - Fix usage of right shift operator in fold expressions

2017-10-31 Thread Richard Smith via cfe-commits
Author: rsmith Date: Tue Oct 31 13:29:22 2017 New Revision: 317032 URL: http://llvm.org/viewvc/llvm-project?rev=317032=rev Log: Fix usage of right shift operator in fold expressions The right shift operator was not seen as a valid operator in a fold expression, which is PR32563. Patch by

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

2017-10-31 Thread Shoaib Meenai via Phabricator via cfe-commits
smeenai abandoned this revision. smeenai added a comment. I confirmed that these warnings go away with https://reviews.llvm.org/D39462 applied, and they reappear if I manually specify `-Wmaybe-tautological-constant-compare`. Thank you! https://reviews.llvm.org/D39149

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

2017-10-31 Thread Alexander Shaposhnikov via Phabricator via cfe-commits
alexshap added inline comments. Comment at: test/Analysis/stack-async-leak.m:60 + void (^b)(void) = ^void(void) { +*p = 1; + }; NoQ wrote: > You may enjoy adding an extra note piece (as in D24278) to the offending > statement within the block. It might

[PATCH] D39481: [CodeGen] fix const-ness of builtin equivalents of and functions that might set errno

2017-10-31 Thread Sanjay Patel via Phabricator via cfe-commits
spatel created this revision. Herald added a subscriber: mcrosier. As the description in Builtins.def says: "e = const, but only when -fmath-errno=0". This is step 2 of 3 to fix builtins and math calls as discussed in https://reviews.llvm.org/D39204. I went through the lists at:

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

2017-10-31 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith closed this revision. rsmith added a comment. Committed as r317032, thanks! https://reviews.llvm.org/D36101 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2017-10-31 Thread Anna Zaks via Phabricator via cfe-commits
zaks.anna added a comment. > Also if you check the code snippets in the coding standard: > https://llvm.org/docs/CodingStandards.html#beware-unnecessary-copies-with-auto > you can see that where we officially put the references. Correct! The reference should not go with the type name. George,

[PATCH] D39462: [Sema] Implement -Wmaybe-tautological-constant-compare for when the tautologicalness is data model dependent

2017-10-31 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri updated this revision to Diff 121044. lebedev.ri added a comment. In https://reviews.llvm.org/D39462#912011, @rjmccall wrote: > The actual choice of integer type is not stable across targets any more than > the size is. In practice, people often don't use int and long, they use >

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

2017-10-31 Thread Vitaly Buka via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL317035: [clang-fuzzer] Fix incremental builds of the fuzzer (authored by vitalybuka). Changed prior to commit: https://reviews.llvm.org/D39445?vs=120926=121045#toc Repository: rL LLVM

[PATCH] D39478: [clang-format] Handle leading comments in using declaration

2017-10-31 Thread Igor Sugak via Phabricator via cfe-commits
sugak created this revision. This fixes clang-format internal assertion for the following code: /* override */ using std::string; Added add a unit test. https://reviews.llvm.org/D39478 Files: lib/Format/UsingDeclarationsSorter.cpp unittests/Format/UsingDeclarationsSorterTest.cpp

[PATCH] D39478: [clang-format] Handle leading comments in using declaration

2017-10-31 Thread Igor Sugak via Phabricator via cfe-commits
sugak added inline comments. Comment at: lib/Format/UsingDeclarationsSorter.cpp:50 std::string computeUsingDeclarationLabel(const FormatToken *UsingTok) { assert(UsingTok && UsingTok->is(tok::kw_using) && "Expecting a using token"); std::string Label; and

r317035 - [clang-fuzzer] Fix incremental builds of the fuzzer

2017-10-31 Thread Vitaly Buka via cfe-commits
Author: vitalybuka Date: Tue Oct 31 13:49:57 2017 New Revision: 317035 URL: http://llvm.org/viewvc/llvm-project?rev=317035=rev Log: [clang-fuzzer] Fix incremental builds of the fuzzer Summary: Don't use BUILD_IN_SOURCE keep git checkout clean Don't forward CMAKE_GENERATOR as ExternalProject_Add

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

2017-10-31 Thread Alexander Shaposhnikov via Phabricator via cfe-commits
alexshap updated this revision to Diff 121055. alexshap added a comment. Address the comments, add more tests https://reviews.llvm.org/D39438 Files: lib/StaticAnalyzer/Checkers/StackAddrEscapeChecker.cpp test/Analysis/stack-async-leak.m Index: test/Analysis/stack-async-leak.m

[PATCH] D39462: [Sema] Implement -Wmaybe-tautological-constant-compare for when the tautologicalness is data model dependent

2017-10-31 Thread Shoaib Meenai via Phabricator via cfe-commits
smeenai added a comment. This solves the issue in https://reviews.llvm.org/D39149, at least. Repository: rL LLVM https://reviews.llvm.org/D39462 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

r317044 - [CFI] Add CFI-icall pointer type generalization

2017-10-31 Thread Vlad Tsyrklevich via cfe-commits
Author: vlad.tsyrklevich Date: Tue Oct 31 15:39:44 2017 New Revision: 317044 URL: http://llvm.org/viewvc/llvm-project?rev=317044=rev Log: [CFI] Add CFI-icall pointer type generalization Summary: This change allows generalizing pointers in type signatures used for cfi-icall by enabling the

r317047 - Fix for PR33930. Short-circuit metadata mapping when cloning a varargs thunk.

2017-10-31 Thread Wolfgang Pieb via cfe-commits
Author: wolfgangp Date: Tue Oct 31 15:49:48 2017 New Revision: 317047 URL: http://llvm.org/viewvc/llvm-project?rev=317047=rev Log: Fix for PR33930. Short-circuit metadata mapping when cloning a varargs thunk. The cloning happens before all metadata nodes are resolved. Prevent the value mapper

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

2017-10-31 Thread Wolfgang Pieb via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL317047: Fix for PR33930. Short-circuit metadata mapping when cloning a varargs thunk. (authored by wolfgangp). Changed prior to commit: https://reviews.llvm.org/D39396?vs=120876=121078#toc Repository:

[PATCH] D39050: Add index-while-building support to Clang

2017-10-31 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman added inline comments. Comment at: include/clang/Index/IndexDataStoreSymbolUtils.h:13 + +#include "indexstore/indexstore.h" +#include "clang/Index/IndexSymbol.h" It looks to me like this header, `"indexstore/indexstore.h"`, and

[PATCH] D39481: [CodeGen] fix const-ness of builtin equivalents of and functions that might set errno

2017-10-31 Thread Eli Friedman via Phabricator via cfe-commits
efriedma added a comment. Please make these consistent with the non-__builtin versions. Granted, I'm not sure all of those are right... I'm pretty sure, for example, cbrt can't set errno, and carg can. But I'd prefer to deal with that in a separate patch. https://reviews.llvm.org/D39481

r317052 - Make helper function static. NFC.

2017-10-31 Thread Benjamin Kramer via cfe-commits
Author: d0k Date: Tue Oct 31 16:23:36 2017 New Revision: 317052 URL: http://llvm.org/viewvc/llvm-project?rev=317052=rev Log: Make helper function static. NFC. Modified: cfe/trunk/lib/AST/Type.cpp Modified: cfe/trunk/lib/AST/Type.cpp URL:

[PATCH] D39462: [Sema] Implement -Wmaybe-tautological-constant-compare for when the tautologicalness is data model dependent

2017-10-31 Thread Eli Friedman via Phabricator via cfe-commits
efriedma added a comment. > The internal canonical types are compared, so all this typedef sugar will be > silently ignored. Yes, and that's precisely the problem. On many 32-bit platforms, both "size_t" and "uint32_t" are typedefs for "unsigned int"; on some 32-bit platforms, "size_t" is an

[PATCH] D39050: Add index-while-building support to Clang

2017-10-31 Thread Nathan Hawes via Phabricator via cfe-commits
nathawes planned changes to this revision. nathawes added a comment. Thanks @arphaman! I'll work through your comments and update. Comment at: include/clang/Index/IndexDataStoreSymbolUtils.h:13 + +#include "indexstore/indexstore.h" +#include "clang/Index/IndexSymbol.h"

[PATCH] D39451: P0620 follow-up: deducing `auto` from braced-init-list in new expr

2017-10-31 Thread Zhihao Yuan via Phabricator via cfe-commits
lichray created this revision. This is a side-effect brought in by p0620r0, which allows other placeholder types (derived from `auto` and `decltype(auto)`) to be usable in a `new` expression with a single-clause //braced-init-list// as its initializer (8.3.4 [expr.new]/2). N3922 defined its

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

2017-10-31 Thread Gábor Horváth via Phabricator via cfe-commits
xazax.hun added inline comments. Comment at: lib/StaticAnalyzer/Checkers/StackAddrEscapeChecker.cpp:145 + if (dyn_cast_or_null(Region->getMemorySpace())) { +ExplodedNode *N = C.generateErrorNode(); +if (!N) This will stop the analysis on

[PATCH] D39452: [LibCrossTU] Adding code ownership

2017-10-31 Thread Gábor Horváth via Phabricator via cfe-commits
xazax.hun created this revision. In order to reduce the load on the other code owners, I would like to step up as an owner of the new library. https://reviews.llvm.org/D39452 Files: CODE_OWNERS.TXT Index: CODE_OWNERS.TXT ===

[PATCH] D30946: [ScopePrinting] Added support to print full scopes of types and declarations.

2017-10-31 Thread Simon Schroeder via Phabricator via cfe-commits
schroedersi added a comment. Ping https://reviews.llvm.org/D30946 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

r316988 - [CodeGen] Propagate may-alias'ness of lvalues with TBAA info

2017-10-31 Thread Ivan A. Kosarev via cfe-commits
Author: kosarev Date: Tue Oct 31 04:05:34 2017 New Revision: 316988 URL: http://llvm.org/viewvc/llvm-project?rev=316988=rev Log: [CodeGen] Propagate may-alias'ness of lvalues with TBAA info This patch fixes various places in clang to propagate may-alias TBAA access descriptors during

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

2017-10-31 Thread Ivan Kosarev via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL316988: [CodeGen] Propagate may-alias'ness of lvalues with TBAA info (authored by kosarev). Changed prior to commit: https://reviews.llvm.org/D39008?vs=120828=120958#toc Repository: rL LLVM

[PATCH] D32642: [Analyzer] Iterator Checker - Part 2: Increment, decrement operators and ahead-of-begin checks

2017-10-31 Thread Balogh , Ádám via Phabricator via cfe-commits
baloghadamsoftware added a comment. It seems that review on https://reviews.llvm.org/D35109 is stuck forever. So maybe we should forget about this simplification and return to the local solution I tried to use here originally. It is Part2, and we need to go through all parts as soon as

[PATCH] D35109: [Analyzer] SValBuilder Comparison Rearrangement

2017-10-31 Thread Balogh , Ádám via Phabricator via cfe-commits
baloghadamsoftware added a comment. Any progress reviewing this? Iterator checkers are pending for more than half a year because of this. An alternative solution is to always extend the type and change `ProgramState::assumeInbound()` so it does not move everything to the bottom of the range,

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

2017-10-31 Thread Gábor Horváth via Phabricator via cfe-commits
xazax.hun accepted this revision. xazax.hun added a comment. Some minor nits otherwise LGTM! Comment at: include/clang/Analysis/AnalysisDeclContext.h:479 + /// Get a reference to {@code BodyFarm} instance. + BodyFarm& getBodyFarm(); The reference is on the

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

2017-10-31 Thread Gábor Horváth via Phabricator via cfe-commits
xazax.hun added inline comments. Comment at: lib/StaticAnalyzer/Checkers/ExprInspectionChecker.cpp:68 // (globals should not be invalidated, etc), hence the use of evalCall. - FnCheck Handler = llvm::StringSwitch(C.getCalleeName(CE)) -.Case("clang_analyzer_eval",

[PATCH] D22374: [analyzer] Copy and move constructors - ExprEngine extended for "almost trivial" copy and move constructors

2017-10-31 Thread Balogh , Ádám via Phabricator via cfe-commits
baloghadamsoftware updated this revision to Diff 120954. baloghadamsoftware added a comment. Herald added subscribers: szepet, whisperity. Tests updated. https://reviews.llvm.org/D22374 Files: lib/StaticAnalyzer/Core/ExprEngineCXX.cpp test/Analysis/ctor.mm Index: test/Analysis/ctor.mm

[PATCH] D35109: [Analyzer] SValBuilder Comparison Rearrangement

2017-10-31 Thread Balogh , Ádám via Phabricator via cfe-commits
baloghadamsoftware added inline comments. Comment at: lib/StaticAnalyzer/Core/SimpleSValBuilder.cpp:595 + + if (origWidth < 128) { +auto newWidth = std::max(2 * origWidth, (uint32_t) 8); danielmarjamaki wrote: > I would like that "128" is

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

2017-10-31 Thread Gábor Horváth via Phabricator via cfe-commits
xazax.hun 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 + NoQ wrote: > We do have a warning for

[libunwind] r316991 - Merge r311574: ARM: explicitly specify the 8-byte alignment

2017-10-31 Thread Renato Golin via cfe-commits
Author: rengolin Date: Tue Oct 31 05:21:32 2017 New Revision: 316991 URL: http://llvm.org/viewvc/llvm-project?rev=316991=rev Log: Merge r311574: ARM: explicitly specify the 8-byte alignment Fixing the last libunwind failure on ARM. Modified: libunwind/branches/release_50/include/unwind.h

r317054 - [refactor][selection] code ranges can be selected in objc methods

2017-10-31 Thread Alex Lorenz via cfe-commits
Author: arphaman Date: Tue Oct 31 17:07:12 2017 New Revision: 317054 URL: http://llvm.org/viewvc/llvm-project?rev=317054=rev Log: [refactor][selection] code ranges can be selected in objc methods Modified: cfe/trunk/lib/Tooling/Refactoring/ASTSelection.cpp

r317056 - [refactor][extract] prohibit extraction of ObjC property setters

2017-10-31 Thread Alex Lorenz via cfe-commits
Author: arphaman Date: Tue Oct 31 17:20:55 2017 New Revision: 317056 URL: http://llvm.org/viewvc/llvm-project?rev=317056=rev Log: [refactor][extract] prohibit extraction of ObjC property setters Added: cfe/trunk/test/Refactor/Extract/ObjCProperty.m Modified:

r317062 - [refactor][extract] code extracted from inline method should be placed

2017-10-31 Thread Alex Lorenz via cfe-commits
Author: arphaman Date: Tue Oct 31 18:12:56 2017 New Revision: 317062 URL: http://llvm.org/viewvc/llvm-project?rev=317062=rev Log: [refactor][extract] code extracted from inline method should be placed in a function defined before the outer class Added:

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

2017-10-31 Thread George Karpenkov via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL317065: [Analyzer] Use value storage for BodyFarm (authored by george.karpenkov). Changed prior to commit: https://reviews.llvm.org/D39428?vs=120861=121098#toc Repository: rL LLVM

r317065 - [Analyzer] Use value storage for BodyFarm

2017-10-31 Thread George Karpenkov via cfe-commits
Author: george.karpenkov Date: Tue Oct 31 18:36:01 2017 New Revision: 317065 URL: http://llvm.org/viewvc/llvm-project?rev=317065=rev Log: [Analyzer] Use value storage for BodyFarm Differential Revision: https://reviews.llvm.org/D39428 Modified:

r317066 - [c++17] Refine resolution of constructor / conversion function disambiguation.

2017-10-31 Thread Richard Smith via cfe-commits
Author: rsmith Date: Tue Oct 31 18:37:11 2017 New Revision: 317066 URL: http://llvm.org/viewvc/llvm-project?rev=317066=rev Log: [c++17] Refine resolution of constructor / conversion function disambiguation. Given a choice between a constructor call and a conversion function in C++17, we prefer

r317070 - [analyzer] Removing unused stored field.

2017-10-31 Thread George Karpenkov via cfe-commits
Author: george.karpenkov Date: Tue Oct 31 19:29:04 2017 New Revision: 317070 URL: http://llvm.org/viewvc/llvm-project?rev=317070=rev Log: [analyzer] Removing unused stored field. Modified: cfe/trunk/include/clang/Analysis/AnalysisDeclContext.h

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

2017-10-31 Thread Devin Coughlin via Phabricator via cfe-commits
dcoughlin added a reviewer: george.karpenkov. dcoughlin added a comment. I think this is a great idea, and I expect it to find some nasty bugs! However, I'm worried about false positives in the following not-too-uncommon idiom: dispatch_semaphore_t semaphore = dispatch_semaphore_create(0);

r317075 - clang/lib/Format/Format.cpp: Fix warnings introduced in rL316903. [-Wpedantic]

2017-10-31 Thread NAKAMURA Takumi via cfe-commits
Author: chapuni Date: Tue Oct 31 21:43:22 2017 New Revision: 317075 URL: http://llvm.org/viewvc/llvm-project?rev=317075=rev Log: clang/lib/Format/Format.cpp: Fix warnings introduced in rL316903. [-Wpedantic] Modified: cfe/trunk/lib/Format/Format.cpp Modified: cfe/trunk/lib/Format/Format.cpp

r317073 - Change assertion to quick exit from checking function.

2017-10-31 Thread Richard Trieu via cfe-commits
Author: rtrieu Date: Tue Oct 31 20:57:27 2017 New Revision: 317073 URL: http://llvm.org/viewvc/llvm-project?rev=317073=rev Log: Change assertion to quick exit from checking function. Remove the assertion that could be triggered by invalid code. Replace it with an early exit from the checking

r317076 - Fix -Wunused-private-field to fire regardless of which implicit special members have been implicitly declared.

2017-10-31 Thread Richard Smith via cfe-commits
Author: rsmith Date: Tue Oct 31 21:52:12 2017 New Revision: 317076 URL: http://llvm.org/viewvc/llvm-project?rev=317076=rev Log: Fix -Wunused-private-field to fire regardless of which implicit special members have been implicitly declared. Modified: cfe/trunk/lib/Sema/Sema.cpp

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

2017-10-31 Thread Devin Coughlin via Phabricator via cfe-commits
dcoughlin accepted this revision. dcoughlin added a comment. Looks good to me with the comments by Gabor addressed. In https://reviews.llvm.org/D39428#912126, @george.karpenkov wrote: > On top of that, reference is part of the type, not part of the variable name, The reference is parsed as

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

2017-10-31 Thread Alexander Shaposhnikov via Phabricator via cfe-commits
alexshap updated this revision to Diff 121099. alexshap added a comment. more 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

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

2017-10-31 Thread Alexander Shaposhnikov via Phabricator via cfe-commits
alexshap updated this revision to Diff 121100. alexshap added a comment. cleanup 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

[libcxx] r317063 - Update the synopsis to match the P/R of 2945. No code changes.

2017-10-31 Thread Marshall Clow via cfe-commits
Author: marshall Date: Tue Oct 31 18:27:25 2017 New Revision: 317063 URL: http://llvm.org/viewvc/llvm-project?rev=317063=rev Log: Update the synopsis to match the P/R of 2945. No code changes. Modified: libcxx/trunk/include/optional Modified: libcxx/trunk/include/optional URL:

[libcxx] r317074 - More statuses, a new patch, too

2017-10-31 Thread Marshall Clow via cfe-commits
Author: marshall Date: Tue Oct 31 21:03:35 2017 New Revision: 317074 URL: http://llvm.org/viewvc/llvm-project?rev=317074=rev Log: More statuses, a new patch, too Modified: libcxx/trunk/www/upcoming_meeting.html Modified: libcxx/trunk/www/upcoming_meeting.html URL: