[PATCH] D32341: Fix a bug that warnings generated with -M or -MM flags

2017-04-24 Thread Yuka Takahashi via Phabricator via cfe-commits
yamaguchi added a comment. Do you think it is not a good idea to change condition if -MD or -MMD exists? for example, if ( !A->getOption().matches(options::OPT_MD) && !A->getOption().matches(options::OPT_MQ)) CmdArgs.push_back("-w"); https://reviews.llvm.org/D32341 __

[PATCH] D32401: [Devirtualization] insert placement new barrier with -O0

2017-04-24 Thread Piotr Padlewski via Phabricator via cfe-commits
Prazek added a comment. In https://reviews.llvm.org/D32401#734921, @rjmccall wrote: > I continue to be really uncomfortable with the entire design of this > optimization, which appears to miscompile code by default, but as long as > nobody's suggesting that we actually turn it on by default, I

[PATCH] D32411: [libcxx] Provide #include_next alternative for MSVC

2017-04-24 Thread Andrey Khalyavin via Phabricator via cfe-commits
halyavin added a comment. BTW, the list of include files which are located in [PROGRAM_FILES]\Microsoft Visual Studio 14.0\VC\include directory is - stdbool.h - limits.h - stdint.h - setjmp.h The rest is in [PROGRAM_FILES]\Windows Kits\10\Include\10.0.whatever.0\ucrt directory. Which directory

[clang-tools-extra] r301167 - [clang-tidy] New check: modernize-replace-random-shuffle.

2017-04-24 Thread Mads Ravn via cfe-commits
Author: madsravn Date: Mon Apr 24 04:27:20 2017 New Revision: 301167 URL: http://llvm.org/viewvc/llvm-project?rev=301167&view=rev Log: [clang-tidy] New check: modernize-replace-random-shuffle. This check will find occurrences of ``std::random_shuffle`` and replace it with ``std::shuffle``. In C+

[PATCH] D30158: [clang-tidy] modernize: Find usage of random_shuffle and replace it with shuffle.

2017-04-24 Thread Mads Ravn via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL301167: [clang-tidy] New check: modernize-replace-random-shuffle. (authored by madsravn). Changed prior to commit: https://reviews.llvm.org/D30158?vs=96303&id=96362#toc Repository: rL LLVM https://r

[PATCH] D32424: Add a fix-it for -Wunguarded-availability

2017-04-24 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman created this revision. This patch adds a fix-it for the -Wunguarded-availability warning. This fix-it is similar to the Swift one: it suggests that you wrap the statement in an `if (@available)` check. The produced fixits are indented (just like the Swift ones) to make them look nice i

[PATCH] D32378: Insert invariant.group.barrier for pointers comparisons

2017-04-24 Thread Piotr Padlewski via Phabricator via cfe-commits
Prazek updated this revision to Diff 96371. Prazek added a comment. Don't add barrier if compared with nullptr. With this it reduces added barriers to compares by half. Note that we will transform barrier(null) -> barrier in llvm https://reviews.llvm.org/D32378 Files: lib/CodeGen/CGExprScal

[PATCH] D32395: [clang-tidy] modernize-use-emplace: remove unnecessary make_pair calls

2017-04-24 Thread Jakub Kuderski via Phabricator via cfe-commits
kuhar added inline comments. Comment at: test/clang-tidy/modernize-use-emplace.cpp:284 + // CHECK-FIXES: v.emplace_back(42LL, 13); + + v.push_back(std::make_pair(0, 3)); kuhar wrote: > Prazek wrote: > > I would add here test like: > > > > class X { > > X

[PATCH] D30691: [analyzer] Support for naive cross translational unit analysis

2017-04-24 Thread Gábor Horváth via Phabricator via cfe-commits
xazax.hun updated this revision to Diff 96377. xazax.hun marked an inline comment as done. xazax.hun added a comment. - Removed more unused code. - Remove the usages of posix API. - Changes according to some review comments. - Add a test to the clang-func-mapping tool. https://reviews.llvm.org/D

[PATCH] D32427: Fix float abi for SUSE ARM triples

2017-04-24 Thread İsmail Dönmez via Phabricator via cfe-commits
ismail created this revision. Herald added a subscriber: aemerson. SUSE's ARM triples always ends with -gnueabi but all the targets are hard-float https://reviews.llvm.org/D32427 Files: lib/Driver/ToolChains/Arch/ARM.cpp test/Driver/linux-as.c Index: test/Driver/linux-as.c ===

[PATCH] D32427: Fix float abi for SUSE ARM triples

2017-04-24 Thread İsmail Dönmez via Phabricator via cfe-commits
ismail updated this revision to Diff 96382. ismail added a comment. Fix typo https://reviews.llvm.org/D32427 Files: lib/Driver/ToolChains/Arch/ARM.cpp test/Driver/linux-as.c Index: test/Driver/linux-as.c === --- test/Driver/l

[PATCH] D32428: Fix for Itanium mangler issue with templates (bug: 31405)

2017-04-24 Thread Serge Preis via Phabricator via cfe-commits
Serge_Preis created this revision. Herald added subscribers: rengolin, aemerson. This fixes problem described as bug:31405 https://bugs.llvm.org//show_bug.cgi?id=31405 Itanium ABI: debug assertion in template mangling with declype return The problem is that FunctionTypeDepthState is not properly

[PATCH] D32395: [clang-tidy] modernize-use-emplace: remove unnecessary make_pair calls

2017-04-24 Thread Jakub Kuderski via Phabricator via cfe-commits
kuhar updated this revision to Diff 96384. kuhar added a comment. Don't remove make_pair calls when inserted type is different than std::pair. https://reviews.llvm.org/D32395 Files: clang-tidy/modernize/UseEmplaceCheck.cpp docs/ReleaseNotes.rst docs/clang-tidy/checks/modernize-use-emplace

[PATCH] D32427: Fix float abi for SUSE ARM triples

2017-04-24 Thread Renato Golin via Phabricator via cfe-commits
rengolin added reviewers: compnerd, rovka, joerg. rengolin added a comment. I'm not sure this will work at all. Not because it doesn't make sense (it does), but because of several bugs in the soft vs. hard float implementation in the Triple related classes all the way to the back-end. I'm addin

[PATCH] D32427: Fix float abi for SUSE ARM triples

2017-04-24 Thread Joerg Sonnenberger via Phabricator via cfe-commits
joerg added a comment. I'm not sure the results will really work that well either. https://reviews.llvm.org/D32427 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

r301178 - [Devirtualization] Emit invariant.group loads with empty group md

2017-04-24 Thread Piotr Padlewski via cfe-commits
Author: prazek Date: Mon Apr 24 07:58:43 2017 New Revision: 301178 URL: http://llvm.org/viewvc/llvm-project?rev=301178&view=rev Log: [Devirtualization] Emit invariant.group loads with empty group md Summary: As discussed here http://lists.llvm.org/pipermail/llvm-dev/2017-January/109332.html havin

[PATCH] D32110: Emit invariant.group loads with empty group md

2017-04-24 Thread Piotr Padlewski via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL301178: [Devirtualization] Emit invariant.group loads with empty group md (authored by Prazek). Changed prior to commit: https://reviews.llvm.org/D32110?vs=95378&id=96387#toc Repository: rL LLVM htt

[PATCH] D32348: [libclang] Check for a record declaration before a template specialization.

2017-04-24 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman accepted this revision. arphaman added a comment. This revision is now accepted and ready to land. I see, thanks for explaining. LGTM. Do you need someone to commit it? https://reviews.llvm.org/D32348 ___ cfe-commits mailing list cfe-commit

[PATCH] D32427: Fix float abi for SUSE ARM triples

2017-04-24 Thread İsmail Dönmez via Phabricator via cfe-commits
ismail added a comment. I am open to suggestions on how to do this correctly. The problem as stated is all SUSE ARM triples end with -gnueabi but they are all hard-float. Environment handling in LLVM seems to only check for the last part of the triple and not the whole string. https://reviews

[PATCH] D32389: [libclang] Expose some target information via the C API.

2017-04-24 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman added a comment. Maybe it would be better to introduce a `CXTargetInfo` type, and change the API to be: clang_getTranslationUnitTargetInfo clang_TargetInfo_getTriple clang_TargetInfo_getPointerWidth ? This way the `TargetInfo` functions will be cleanly separated, so we can extend

[PATCH] D32294: [clang-tidy] run-clang-tidy.py: check if clang-apply-replacements succeeds

2017-04-24 Thread Jakub Kuderski via Phabricator via cfe-commits
kuhar requested review of this revision. kuhar added a comment. Is the current patch OK? Do you have any other comments? https://reviews.llvm.org/D32294 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/li

[PATCH] D32294: [clang-tidy] run-clang-tidy.py: check if clang-apply-replacements succeeds

2017-04-24 Thread Piotr Padlewski via Phabricator via cfe-commits
Prazek accepted this revision. Prazek added a comment. This revision is now accepted and ready to land. LGTM after the fixes https://reviews.llvm.org/D32294 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailma

[PATCH] D32346: [clang-tidy] New readability check for strlen argument

2017-04-24 Thread Daniel Marjamäki via Phabricator via cfe-commits
danielmarjamaki added a comment. Thanks for all comments. I am working on fixing them. Updated patch will be uploaded soon. > Have you run it over a big codebase? What is the turnout? I did not see this warning yet. Maybe after fixing the comments (::strlen) there will be a difference. In htt

[PATCH] D32411: [libcxx] Provide #include_next alternative for MSVC

2017-04-24 Thread Ben Craig via Phabricator via cfe-commits
bcraig added a comment. In https://reviews.llvm.org/D32411#735128, @halyavin wrote: > BTW, the list of include files which are located in [PROGRAM_FILES]\Microsoft > Visual Studio 14.0\VC\include directory is > > - stdbool.h > - limits.h > - stdint.h > - setjmp.h > > The rest is in [PROGRAM_FI

[PATCH] D32346: [clang-tidy] New readability check for strlen argument

2017-04-24 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added a comment. > In https://reviews.llvm.org/D32346#733906, @Eugene.Zelenko wrote: > >> It may be good idea to add check for arguments which taken from C++ >> containers like std::string, std::string_view, etc. > > > Not sure how you want. Do you envision something like: > >

[PATCH] D32248: CodeGen: Cast alloca to expected address space

2017-04-24 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added inline comments. Comment at: lib/CodeGen/CGDecl.cpp:1105-1119 + // Alloca always returns a pointer in alloca address space, which may + // be different from the type defined by the language. For example, + // in C++ the auto variables are in the default address

[PATCH] D32346: [clang-tidy] New readability check for strlen argument

2017-04-24 Thread Stephan Bergmann via Phabricator via cfe-commits
sberg added inline comments. Comment at: test/clang-tidy/readability-strlen-argument.cpp:11 + X = strlen(Str + 10); + // CHECK-FIXES: {{^}} X = (strlen(Str) - 10);{{$}} + but if any of the first ten chars in Str can be NUL, then the change is bogus? (I guess

r301180 - [index] The relation between the declarations in template specializations

2017-04-24 Thread Alex Lorenz via cfe-commits
Author: arphaman Date: Mon Apr 24 09:04:58 2017 New Revision: 301180 URL: http://llvm.org/viewvc/llvm-project?rev=301180&view=rev Log: [index] The relation between the declarations in template specializations that 'override' declarations in the base template should be recorded This can be used fo

[PATCH] D32020: [indexer] The relationship between the declarations in template specializations that 'override' declarations in the base template should be recorded

2017-04-24 Thread Alex Lorenz via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL301180: [index] The relation between the declarations in template specializations (authored by arphaman). Changed prior to commit: https://reviews.llvm.org/D32020?vs=95940&id=96396#toc Repository: rL

[PATCH] D31646: [coroutines] Build GRO declaration and return GRO statement

2017-04-24 Thread Gor Nishanov via Phabricator via cfe-commits
GorNishanov added a comment. barely audible ping for coroutines https://reviews.llvm.org/D31646 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D31608: [coroutines] Add emission of initial and final suspends

2017-04-24 Thread Gor Nishanov via Phabricator via cfe-commits
GorNishanov added a comment. Tiny ping https://reviews.llvm.org/D31608 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D32428: Fix for Itanium mangler issue with templates (bug: 31405)

2017-04-24 Thread Dmitry Polukhin via Phabricator via cfe-commits
DmitryPolukhin added a comment. LGTM https://reviews.llvm.org/D32428 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D32248: CodeGen: Cast alloca to expected address space

2017-04-24 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added inline comments. Comment at: lib/CodeGen/CGDecl.cpp:1115 + if (AddrTy->getAddressSpace() != ExpectedAddrSpace && + Ty.getAddressSpace() != LangAS::opencl_constant) { +address = Address(Builder.CreateAddrSpaceCast(Addr, Do you need to che

[PATCH] D32346: [clang-tidy] New readability check for strlen argument

2017-04-24 Thread Jonas Toth via Phabricator via cfe-commits
JonasToth added inline comments. Comment at: test/clang-tidy/readability-strlen-argument.cpp:1 +// RUN: %check_clang_tidy %s readability-strlen-argument %t + danielmarjamaki wrote: > JonasToth wrote: > > Same as documentation, maybe a little more telling examples

r301182 - clang-format: Fix bad corner case in formatting of function types.

2017-04-24 Thread Daniel Jasper via cfe-commits
Author: djasper Date: Mon Apr 24 09:28:49 2017 New Revision: 301182 URL: http://llvm.org/viewvc/llvm-project?rev=301182&view=rev Log: clang-format: Fix bad corner case in formatting of function types. Before: std::function< LngTemplatedType*( Long

[PATCH] D31814: Add option to add command-line options and version info to output file

2017-04-24 Thread Roger Ferrer Ibanez via Phabricator via cfe-commits
rogfer01 added inline comments. Comment at: lib/CodeGen/CodeGenModule.cpp:4222 + std::string line; + while (std::getline(iss, s, ';')) { +if ((s.length() + line.length()) < 80) { I wonder if this also works if the original compiler invokation included a ";"

[PATCH] D31542: [clang-tidy] Extend readability-container-size-empty to add comparisons to newly-constructed objects

2017-04-24 Thread Josh Zimmerman via Phabricator via cfe-commits
joshz added a comment. In https://reviews.llvm.org/D31542#734809, @aaron.ballman wrote: > In https://reviews.llvm.org/D31542#734455, @joshz wrote: > > > Are there any further changes I should make, or is this good to submit now? > > > > Thanks! > > > This still LGTM, so it's good to submit. Do yo

[PATCH] D32435: clang-cl: Add support for /permissive-

2017-04-24 Thread Nico Weber via Phabricator via cfe-commits
thakis created this revision. https://blogs.msdn.microsoft.com/vcblog/2016/11/16/permissive-switch/ makes it sound like this is similar to -pedantic, which we currently don't expose from clang-cl. So map it to that for now and see how that feels in practice. Looks like cl.exe only has a flag fo

r301183 - [index] If the 'external_source_symbol' attribute indicates 'Swift' as the language then report it accordingly

2017-04-24 Thread Argyrios Kyrtzidis via cfe-commits
Author: akirtzidis Date: Mon Apr 24 09:52:00 2017 New Revision: 301183 URL: http://llvm.org/viewvc/llvm-project?rev=301183&view=rev Log: [index] If the 'external_source_symbol' attribute indicates 'Swift' as the language then report it accordingly Modified: cfe/trunk/include/clang-c/Index.h

[clang-tools-extra] r301185 - Extend readability-container-size-empty to add comparisons to empty-state objects.

2017-04-24 Thread Aaron Ballman via cfe-commits
Author: aaronballman Date: Mon Apr 24 09:57:09 2017 New Revision: 301185 URL: http://llvm.org/viewvc/llvm-project?rev=301185&view=rev Log: Extend readability-container-size-empty to add comparisons to empty-state objects. Patch by Josh Zimmerman. Modified: clang-tools-extra/trunk/clang-tidy

[PATCH] D31542: [clang-tidy] Extend readability-container-size-empty to add comparisons to newly-constructed objects

2017-04-24 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman closed this revision. aaron.ballman added a comment. I've commit in r301185, thank you! Repository: rL LLVM https://reviews.llvm.org/D31542 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailma

[PATCH] D32436: [clang-tidy] Support detecting for-range loop in inefficient-vector-operation check.

2017-04-24 Thread Haojian Wu via Phabricator via cfe-commits
hokein created this revision. Also add an option "VectorLikeClasses" allowing user specify customized vectors. https://reviews.llvm.org/D32436 Files: clang-tidy/performance/InefficientVectorOperationCheck.cpp clang-tidy/performance/InefficientVectorOperationCheck.h docs/clang-tidy/checks/

[PATCH] D32437: [analyzer] Nullability: fix a crash when adding notes inside a synthesized property accessor.

2017-04-24 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ created this revision. In this test case, the body of a property is autosynthesized, and its source locations are invalid. Path diagnostic locations must refer to valid source locations, hence we're hitting an assertion. This patch disables the bugvisitor's note, however we'd need to figure

[PATCH] D32435: clang-cl: Add support for /permissive-

2017-04-24 Thread Hans Wennborg via Phabricator via cfe-commits
hans accepted this revision. hans added a comment. This revision is now accepted and ready to land. lgtm https://reviews.llvm.org/D32435 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commi

Re: r300523 - Debug Info: Remove special-casing of indirect function argument handling.

2017-04-24 Thread David Blaikie via cfe-commits
\o/ awesome! (I added that "indirect" hack ages ago, unfortunately - one consolation is that it was worse before: Clang would describe the parameter's type as "T&" in the DWARF, instead of as "T"... ) On Mon, Apr 17, 2017 at 6:34 PM Adrian Prantl via cfe-commits < cfe-commits@lists.llvm.org> wrote

[PATCH] D32435: clang-cl: Add support for /permissive-

2017-04-24 Thread David Majnemer via Phabricator via cfe-commits
majnemer requested changes to this revision. majnemer added a comment. This revision now requires changes to proceed. I don't think this is correct. GDR (of Microsoft) says the behavior is different: https://www.reddit.com/r/cpp/comments/5dh7j5/visual_c_introduces_permissive_for_conformance/da5f

[PATCH] D32439: Fix for incorrect source position of dependent c'tor initializer (bug:26195)

2017-04-24 Thread Serge Preis via Phabricator via cfe-commits
Serge_Preis created this revision. This patch fixes incorrect source positions of dependent c'tor initializers like in the following code: template struct Derived: MyBase::InnerIterator { Derived() : MyBase::InnerIterator() {} /// This line is problematic: all positions point to InnerItera

[clang-tools-extra] r301188 - [clang-tidy] Some Cleanups for performance-faster-string-find check.

2017-04-24 Thread Haojian Wu via cfe-commits
Author: hokein Date: Mon Apr 24 11:41:00 2017 New Revision: 301188 URL: http://llvm.org/viewvc/llvm-project?rev=301188&view=rev Log: [clang-tidy] Some Cleanups for performance-faster-string-find check. NFC Modified: clang-tools-extra/trunk/clang-tidy/performance/FasterStringFindCheck.cpp Mo

r301202 - [Docs] Correct the path to the clang-format-diff.py script to include the clang-format directory.

2017-04-24 Thread Craig Topper via cfe-commits
Author: ctopper Date: Mon Apr 24 12:39:35 2017 New Revision: 301202 URL: http://llvm.org/viewvc/llvm-project?rev=301202&view=rev Log: [Docs] Correct the path to the clang-format-diff.py script to include the clang-format directory. Modified: cfe/trunk/docs/ClangFormat.rst Modified: cfe/trun

Re: [PATCH] D32435: clang-cl: Add support for /permissive-

2017-04-24 Thread Nico Weber via cfe-commits
It does sound pretty similar to me from the blog post. I think this is a decent place to start from. On Apr 24, 2017 11:55 AM, "David Majnemer via Phabricator via cfe-commits" < cfe-commits@lists.llvm.org> wrote: > majnemer requested changes to this revision. > majnemer added a comment. > This re

Re: [PATCH] D32435: clang-cl: Add support for /permissive-

2017-04-24 Thread David Majnemer via cfe-commits
-pedantic means "Issue all the warnings demanded by strict ISO C and ISO C++; reject all programs that use forbidden extensions, and some other programs that do not follow ISO C and ISO C++." I believe it is more akin to -fno-ms-compatibility as it disables compatibility hacks. On Mon, Apr 24, 201

[PATCH] D32406: [Coverage][Windows] Null pointer dereference in CodeGenPGO::skipRegionMappingForDecl (fixes PR32761)

2017-04-24 Thread Vedant Kumar via Phabricator via cfe-commits
vsk added a comment. Thanks for your patch! I have a few requests. First, please split off the SkipCoverageMapping change from this patch. If you don't have commit access yet, let me know and I can commit it for you. You can also ping Chris L for commit access. Second, the test can be minimize

[PATCH] D32248: CodeGen: Cast alloca to expected address space

2017-04-24 Thread John McCall via Phabricator via cfe-commits
rjmccall added inline comments. Comment at: lib/CodeGen/CGDecl.cpp:1105-1119 + // Alloca always returns a pointer in alloca address space, which may + // be different from the type defined by the language. For example, + // in C++ the auto variables are in the default address

r301212 - Flag -fsanitize=fuzzer to enable libfuzzer

2017-04-24 Thread George Karpenkov via cfe-commits
Author: george.karpenkov Date: Mon Apr 24 13:23:24 2017 New Revision: 301212 URL: http://llvm.org/viewvc/llvm-project?rev=301212&view=rev Log: Flag -fsanitize=fuzzer to enable libfuzzer Previously, adding libfuzzer to a project was a multi-step procedure, involving libfuzzer compilation, linking

r301216 - Remove erroneous driver test for -fsanitize=fuzzer flag

2017-04-24 Thread George Karpenkov via cfe-commits
Author: george.karpenkov Date: Mon Apr 24 13:36:31 2017 New Revision: 301216 URL: http://llvm.org/viewvc/llvm-project?rev=301216&view=rev Log: Remove erroneous driver test for -fsanitize=fuzzer flag libfuzzer is not available on all platforms, and hence we can not always rely that it was compiled

r301218 - Pragma: Fix DebugOverflowStack() resulting in endless loop.

2017-04-24 Thread Matthias Braun via cfe-commits
Author: matze Date: Mon Apr 24 13:41:00 2017 New Revision: 301218 URL: http://llvm.org/viewvc/llvm-project?rev=301218&view=rev Log: Pragma: Fix DebugOverflowStack() resulting in endless loop. Drive-by fix (noticed while working on https://reviews.llvm.org/D32205): DebugOverflowStack() is supposed

Re: [PATCH] D32435: clang-cl: Add support for /permissive-

2017-04-24 Thread Nico Weber via cfe-commits
"Opting into the conforming mode, /permissive-, during the series of VS 2017 update is a commitment to keeping your code base clean and to fixing non-conforming constructs we fix conformance issues in Visual C++." [...] "By contrast /permissive- offers a useful conformance mode where input C++ code

[PATCH] D32449: Modifying PthreadLockChecker.cpp to reduce false positives.

2017-04-24 Thread Malhar Thakkar via Phabricator via cfe-commits
malhar1995 created this revision. I am currently working on to avoid false positives which currently occur as the return values of mutex functions like pthread_mutex_destroy() are not taken into consideration. The precise description of the bug can be found here: https://bugs.llvm.org/show_bug

[PATCH] D23796: [libcxx] Make it possible to test static builds of libc++ on OSX

2017-04-24 Thread Asiri Rathnayake via Phabricator via cfe-commits
rmaprath abandoned this revision. rmaprath added a comment. Looks like I'm the only one interested in this - abandoning. https://reviews.llvm.org/D23796 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/li

[PATCH] D32406: [Coverage][Windows] Null pointer dereference in CodeGenPGO::skipRegionMappingForDecl (fixes PR32761)

2017-04-24 Thread Reid Kleckner via Phabricator via cfe-commits
rnk added a comment. In https://reviews.llvm.org/D32406#735725, @vsk wrote: > // RUN: %clang_cc1 -cc1 -triple i686-pc-windows-msvc19.0.0 -emit-obj > -fprofile-instrument=clang -fdelayed-template-parsing -fcoverage-mapping > -dump-coverage-mapping -emit-llvm-only -main-file-name empty-destructor

[PATCH] D31856: Headers: Make the type of SIZE_MAX the same as size_t

2017-04-24 Thread Eli Friedman via Phabricator via cfe-commits
efriedma accepted this revision. efriedma added a comment. This revision now requires changes to proceed. LGTM. https://reviews.llvm.org/D31856 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cf

cfe-commits@lists.llvm.org

2017-04-24 Thread Artem Dergachev via cfe-commits
Author: dergachev Date: Mon Apr 24 14:30:33 2017 New Revision: 301224 URL: http://llvm.org/viewvc/llvm-project?rev=301224&view=rev Log: [analyzer] Improve suppression for inlined defensive checks before operator &. Null dereferences are suppressed if the lvalue was constrained to 0 for the first

[PATCH] D31982: [analyzer] Improve suppression for inlined defensive checks when operator& is involved.

2017-04-24 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL301224: [analyzer] Improve suppression for inlined defensive checks before operator &. (authored by dergachev). Changed prior to commit: https://reviews.llvm.org/D31982?vs=95890&id=96446#toc Repository

r301225 - [asan] Disable ASan global-GC depending on the target and compiler flags.

2017-04-24 Thread Evgeniy Stepanov via cfe-commits
Author: eugenis Date: Mon Apr 24 14:34:12 2017 New Revision: 301225 URL: http://llvm.org/viewvc/llvm-project?rev=301225&view=rev Log: [asan] Disable ASan global-GC depending on the target and compiler flags. Added: cfe/trunk/test/CodeGen/asan-globals-gc.cpp Modified: cfe/trunk/lib/CodeGen

[PATCH] D32406: [Coverage][Windows] Null pointer dereference in CodeGenPGO::skipRegionMappingForDecl (fixes PR32761)

2017-04-24 Thread Reid Kleckner via Phabricator via cfe-commits
rnk added a comment. In https://reviews.llvm.org/D32406#735725, @vsk wrote: > First, please split off the SkipCoverageMapping change from this patch. If > you don't have commit access yet, let me know and I can commit it for you. > You can also ping Chris L for commit access. Are you sure you

[PATCH] D32406: [Coverage][Windows] Null pointer dereference in CodeGenPGO::skipRegionMappingForDecl (fixes PR32761)

2017-04-24 Thread Adam Folwarczny via Phabricator via cfe-commits
adamf updated this revision to Diff 96454. adamf added a comment. Thanks for your comments! Updated test case according to @vsk comment about test case reduction. @rnk, your compilation command probably exposes another issue (with your compilation command the test still failure). I don't have t

[PATCH] D31777: [ASTImporter] Move structural equivalence context to its own file. NFCI

2017-04-24 Thread Sean Callanan via Phabricator via cfe-commits
spyffe accepted this revision. spyffe added a comment. This revision is now accepted and ready to land. Looks good to me. This is a good step toward simplifying the ASTImporter and breaking out its parts to be useful on their own. Obviously make sure the tests pass :) https://reviews.llvm.org/

[PATCH] D32043: [Driver] Load all necessary default sanitizer blacklists

2017-04-24 Thread Evgeniy Stepanov via Phabricator via cfe-commits
eugenis added a comment. We definitely want different blacklists for ASan and MSan. https://reviews.llvm.org/D32043 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D32043: [Driver] Load all necessary default sanitizer blacklists

2017-04-24 Thread Vedant Kumar via Phabricator via cfe-commits
vsk added a comment. Ok. I will take a step back and see what it will take to implement per-sanitizer blacklists. https://reviews.llvm.org/D32043 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo

r301246 - Specify a target explicitly in libfuzzer driver flag test

2017-04-24 Thread George Karpenkov via cfe-commits
Author: george.karpenkov Date: Mon Apr 24 15:38:56 2017 New Revision: 301246 URL: http://llvm.org/viewvc/llvm-project?rev=301246&view=rev Log: Specify a target explicitly in libfuzzer driver flag test Modified: cfe/trunk/test/Driver/fuzzer.c Modified: cfe/trunk/test/Driver/fuzzer.c URL: htt

[PATCH] D32406: [Coverage][Windows] Null pointer dereference in CodeGenPGO::skipRegionMappingForDecl (fixes PR32761)

2017-04-24 Thread Vedant Kumar via Phabricator via cfe-commits
vsk added a comment. > Are you sure you want to do that? This is the only use of this boolean. IMO removing 'SkipCoverageMapping' isn't related to fixing the original bug. Since it's simple enough to make it a separate change, I thought it'd be best. In https://reviews.llvm.org/D32406#735847, @

[PATCH] D32424: Add a fix-it for -Wunguarded-availability

2017-04-24 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak added a comment. Do we want to enclose declaration statements in "if (@available)" too? I think doing so can cause compilation errors. int x = function(); ++x; // if declaration is wrapped, this is an error because x is undeclared in this scope. Also, when function is used in

r301249 - [Coverage] Avoid null deref in skipRegionMappingForDecl (fixes PR32761)

2017-04-24 Thread Vedant Kumar via cfe-commits
Author: vedantk Date: Mon Apr 24 15:52:04 2017 New Revision: 301249 URL: http://llvm.org/viewvc/llvm-project?rev=301249&view=rev Log: [Coverage] Avoid null deref in skipRegionMappingForDecl (fixes PR32761) Patch by Adam Folwarczny! Differential Revision: https://reviews.llvm.org/D32406 Added:

[PATCH] D32406: [Coverage][Windows] Null pointer dereference in CodeGenPGO::skipRegionMappingForDecl (fixes PR32761)

2017-04-24 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL301249: [Coverage] Avoid null deref in skipRegionMappingForDecl (fixes PR32761) (authored by vedantk). Changed prior to commit: https://reviews.llvm.org/D32406?vs=96454&id=96467#toc Repository: rL LL

r301250 - Remove a dead field. NFC.

2017-04-24 Thread Vedant Kumar via cfe-commits
Author: vedantk Date: Mon Apr 24 15:54:36 2017 New Revision: 301250 URL: http://llvm.org/viewvc/llvm-project?rev=301250&view=rev Log: Remove a dead field. NFC. Suggested by Adam Folwarczny! Modified: cfe/trunk/lib/CodeGen/CodeGenPGO.cpp cfe/trunk/lib/CodeGen/CodeGenPGO.h Modified: cfe/t

r301251 - [analyzer] Improve subscripting null arrays for catching null dereferences.

2017-04-24 Thread Artem Dergachev via cfe-commits
Author: dergachev Date: Mon Apr 24 15:55:07 2017 New Revision: 301251 URL: http://llvm.org/viewvc/llvm-project?rev=301251&view=rev Log: [analyzer] Improve subscripting null arrays for catching null dereferences. Array-to-pointer cast now works correctly when the pointer to the array is concrete,

[PATCH] D32291: [analyzer] Implement handling array subscript into null pointer, improve null dereference checks for array subscripts

2017-04-24 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL301251: [analyzer] Improve subscripting null arrays for catching null dereferences. (authored by dergachev). Changed prior to commit: https://reviews.llvm.org/D32291?vs=95943&id=96468#toc Repository:

[PATCH] D32455: detect integer overflow inside arms of conditional operator with non-constant expression

2017-04-24 Thread Nick Lewycky via Phabricator via cfe-commits
nlewycky created this revision. Herald added subscribers: rengolin, aemerson. Descend into both the true and false expressions of a ConditionalOperator when the condition can't be evaluated and we're in an evaluation-mode that says we should continue evaluating. https://reviews.llvm.org/D32455

Re: [libcxx] r300140 - [libcxx] Fix __compressed_pair so it doesn't copy the argument multiple times, and add constexpr.

2017-04-24 Thread Lang Hames via cfe-commits
Hi Eric, Renaming __compressed_pair_elem's member from __first_ to __value_ has broken a lot of LLDB's data formatters. Would it be possible to rename it back for consistency? If it's just a rename it would be preferable to the alternative, which would be to add some clumsy fallback logic in LLDB:

[PATCH] D32436: [clang-tidy] Support detecting for-range loop in inefficient-vector-operation check.

2017-04-24 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: docs/clang-tidy/checks/performance-inefficient-vector-operation.rst:6 Finds possible inefficient `std::vector` operations (e.g. `push_back`) that may cause unnecessary memory reallocations. Please use `` to h

r301261 - [Modules] Fix test to wipe out the cache before using it

2017-04-24 Thread Bruno Cardoso Lopes via cfe-commits
Author: bruno Date: Mon Apr 24 16:58:13 2017 New Revision: 301261 URL: http://llvm.org/viewvc/llvm-project?rev=301261&view=rev Log: [Modules] Fix test to wipe out the cache before using it This should appease bots: http://green.lab.llvm.org/green/job/clang-stage1-cmake-RA-incremental_check/35914

[PATCH] D31269: [Modules] Allow modules specified by -fmodule-map-file to shadow implicitly found ones

2017-04-24 Thread Bruno Cardoso Lopes via Phabricator via cfe-commits
bruno added a comment. Ping! https://reviews.llvm.org/D31269 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D28832: Improve redefinition errors pointing to the same header.

2017-04-24 Thread Bruno Cardoso Lopes via Phabricator via cfe-commits
bruno added a comment. Ping https://reviews.llvm.org/D28832 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D32456: [ubsan] Make the alignment check work with some extern decls (PR32630)

2017-04-24 Thread Vedant Kumar via Phabricator via cfe-commits
vsk created this revision. UBSan's alignment check does not detect unaligned loads and stores from extern struct declarations. Example: struct S { int i; }; extern struct S g_S; // &g_S may not be aligned properly. int main() { return g_S.i; // No alignment check for &g_S.i is emitte

Re: [libcxx] r300140 - [libcxx] Fix __compressed_pair so it doesn't copy the argument multiple times, and add constexpr.

2017-04-24 Thread Eric Fiselier via cfe-commits
There is no easy way to change their names back. The same class is used to store the first and second element, both have the name `__value_` now. Sorry /Eric On Mon, Apr 24, 2017 at 4:02 PM, Lang Hames wrote: > Hi Eric, > > Renaming __compressed_pair_elem's member from __first_ to __value_ has

r301271 - [modules ts] Diagnose 'export' declarations outside of a module interface.

2017-04-24 Thread Richard Smith via cfe-commits
Author: rsmith Date: Mon Apr 24 18:12:30 2017 New Revision: 301271 URL: http://llvm.org/viewvc/llvm-project?rev=301271&view=rev Log: [modules ts] Diagnose 'export' declarations outside of a module interface. Added: cfe/trunk/test/CXX/modules-ts/dcl.dcl/dcl.module/dcl.module.interface/p1.cpp M

[PATCH] D32456: [ubsan] Make the alignment check work with some extern decls (PR32630)

2017-04-24 Thread Eli Friedman via Phabricator via cfe-commits
efriedma added a comment. > Note: it would still not be able to catch the following case -- Do you know why? Comment at: lib/CodeGen/CodeGenModule.cpp:2319 + // The alignment sanitizer can catch more bugs if we don't attach + // alignment info to extern globals. +

[PATCH] D32427: Fix float abi for SUSE ARM triples

2017-04-24 Thread Saleem Abdulrasool via Phabricator via cfe-commits
compnerd added a comment. I think that you should mutate the environment in the canonicalisation phase of the triple. That will allow you to use `armv7-suse-linux-gnueabi` and `armv7-suse-linux-gnueabihf` in the frontend, but have the backend always get `armv7-suse-linux-gnueabihf`. https://

[PATCH] D32269: [Driver] Add iSOFTLinux to GNU ToolChains X86Triple

2017-04-24 Thread Saleem Abdulrasool via Phabricator via cfe-commits
compnerd requested changes to this revision. compnerd added a comment. This revision now requires changes to proceed. Is this to actually get the correct GCC search dir? Your test doesnt really test anything AFAICT, as it is just invoking clang with a target that it would accept anyways. Repo

[PATCH] D32109: [Driver] Limit .exe extension addition to Windows hosts

2017-04-24 Thread Saleem Abdulrasool via Phabricator via cfe-commits
compnerd requested changes to this revision. compnerd added a comment. Why not always replace the extension? Windows doesnt require the .exe suffix IIRC. https://reviews.llvm.org/D32109 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http:

[PATCH] D28832: Improve redefinition errors pointing to the same header.

2017-04-24 Thread Richard Smith via Phabricator via cfe-commits
rsmith accepted this revision. rsmith added a comment. This revision is now accepted and ready to land. LGTM. I'd like to make sure we try to use something better than the first import location for a module (that location is especially meaningless under `-fmodules-local-submodule-visibility`), b

[PATCH] D32109: [Driver] Limit .exe extension addition to Windows hosts

2017-04-24 Thread Shoaib Meenai via Phabricator via cfe-commits
smeenai added a comment. > Why not always replace the extension? Windows doesnt require the .exe suffix > IIRC. CreateProcess documentation says "This parameter must include the file name extension; no default extension is assumed.". That's kinda surprising to me, since LoadLibrary assumes a `

r301285 - Placate MSVC's narrowing conversion unhappiness.

2017-04-24 Thread Richard Smith via cfe-commits
Author: rsmith Date: Mon Apr 24 19:40:40 2017 New Revision: 301285 URL: http://llvm.org/viewvc/llvm-project?rev=301285&view=rev Log: Placate MSVC's narrowing conversion unhappiness. Modified: cfe/trunk/lib/Serialization/ASTWriter.cpp Modified: cfe/trunk/lib/Serialization/ASTWriter.cpp URL:

Re: [PATCH] D32435: clang-cl: Add support for /permissive-

2017-04-24 Thread Nico Weber via cfe-commits
majnemer: opinion on the above? On Apr 24, 2017 2:56 PM, "Nico Weber" wrote: > "Opting into the conforming mode, /permissive-, during the series of VS > 2017 update is a commitment to keeping your code base clean and to fixing > non-conforming constructs we fix conformance issues in Visual C++."

[PATCH] D32269: [Driver] Add iSOFTLinux to GNU ToolChains X86Triple

2017-04-24 Thread Leslie Zhai via Phabricator via cfe-commits
xiangzhai added a comment. Hi Saleem, Thanks for pointing out my fault, I will update my patch to add, for example: -L[[SYSROOT]]/usr/lib/gcc/x86_64-isoft-linux/6.3.1 to the testcase. Regards, Leslie Zhai Repository: rL LLVM https://reviews.llvm.org/D32269 ___

Re: [PATCH] D32435: clang-cl: Add support for /permissive-

2017-04-24 Thread David Majnemer via cfe-commits
On Mon, Apr 24, 2017 at 11:56 AM, Nico Weber wrote: > "Opting into the conforming mode, /permissive-, during the series of VS > 2017 update is a commitment to keeping your code base clean and to fixing > non-conforming constructs we fix conformance issues in Visual C++." [...] > "By contrast /per

[PATCH] D32269: [Driver] Add iSOFTLinux to GNU ToolChains X86Triple

2017-04-24 Thread Leslie Zhai via Phabricator via cfe-commits
xiangzhai updated this revision to Diff 96497. xiangzhai added a comment. Hi Saleem, Please check whether or not "the correct GCC search dir" for x86_64-isoft-linux firstly, please point out my fault, thanks! And sysroot structure shown as: $ tree clang/test/Driver/Inputs/isoft_linux_4_tree

[PATCH] D32248: CodeGen: Cast alloca to expected address space

2017-04-24 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added inline comments. Comment at: lib/CodeGen/CGDecl.cpp:1105-1119 + // Alloca always returns a pointer in alloca address space, which may + // be different from the type defined by the language. For example, + // in C++ the auto variables are in the default address sp

[PATCH] D32248: CodeGen: Cast alloca to expected address space

2017-04-24 Thread John McCall via Phabricator via cfe-commits
rjmccall added inline comments. Comment at: lib/CodeGen/CGDecl.cpp:1105-1119 + // Alloca always returns a pointer in alloca address space, which may + // be different from the type defined by the language. For example, + // in C++ the auto variables are in the default address

[PATCH] D32456: [ubsan] Make the alignment check work with some extern decls (PR32630)

2017-04-24 Thread Vedant Kumar via Phabricator via cfe-commits
vsk added a comment. In https://reviews.llvm.org/D32456#736120, @efriedma wrote: > > Note: it would still not be able to catch the following case -- > > Do you know why? As-written, the alignment check doesn't apply to loads and stores on non-pointer POD types. The reason why is probably that

  1   2   >