r285047 - Fix handling of %% format specifier in os_log builtins.

2016-10-24 Thread Mehdi Amini via cfe-commits
Author: mehdi_amini Date: Mon Oct 24 19:48:48 2016 New Revision: 285047 URL: http://llvm.org/viewvc/llvm-project?rev=285047=rev Log: Fix handling of %% format specifier in os_log builtins. Returning `false` was stopping the parsing of further arguments, which wasn't intended. Modified:

[PATCH] D25731: [analyzer] NumberObjectConversion: Support OSNumber and CFNumberRef.

2016-10-24 Thread Anna Zaks via cfe-commits
zaks.anna accepted this revision. zaks.anna added a comment. This revision is now accepted and ready to land. Minor nit below. Thanks for iterating so much on this! Anna. Comment at: test/Analysis/number-object-conversion.cpp:46 +#ifdef PEDANTIC + if (p) {} //

[PATCH] D25909: [analyzer] MacOSXApiChecker: Disallow dispatch_once predicates on heap and in ivars.

2016-10-24 Thread Anna Zaks via cfe-commits
zaks.anna added a comment. Looks good overall! https://reviews.llvm.org/D25909 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D21508: Make friend function template definition available if class is instantiated.

2016-10-24 Thread Richard Smith via cfe-commits
rsmith added a comment. The model that the C++ standard seems to have settled on is that a friend function declaration that's instantiated from a definition is considered to be a definition, even if we've not instantiated its body yet. I think we should try to directly implement that rule.

Re: [libcxx] r249738 - Split out of .

2016-10-24 Thread Bruno Cardoso Lopes via cfe-commits
On Mon, Oct 24, 2016 at 4:17 PM, Richard Smith wrote: > On Mon, Oct 24, 2016 at 3:30 PM, Bruno Cardoso Lopes > wrote: >> >> > Sure, go ahead. >> >> I committed in r284797 and r284801 (libcxx). There's one minor issue >> I've found: the changes for

r285041 - test/CodeGen/builtins.c: reinstate #ifdef __x86_64__ around __builtin_longjmp

2016-10-24 Thread Mehdi Amini via cfe-commits
Author: mehdi_amini Date: Mon Oct 24 18:38:24 2016 New Revision: 285041 URL: http://llvm.org/viewvc/llvm-project?rev=285041=rev Log: test/CodeGen/builtins.c: reinstate #ifdef __x86_64__ around __builtin_longjmp Unadvertently removed in r285019 Modified: cfe/trunk/test/CodeGen/builtins.c

r285042 - Add dependency from clangCodeGen to clangAnalysis

2016-10-24 Thread Mehdi Amini via cfe-commits
Author: mehdi_amini Date: Mon Oct 24 18:38:32 2016 New Revision: 285042 URL: http://llvm.org/viewvc/llvm-project?rev=285042=rev Log: Add dependency from clangCodeGen to clangAnalysis This is unbreaking the build with shared library after r285019. Modified:

[PATCH] D25817: [Sema] Improve the error diagnostic for dot destructor calls on pointer objects

2016-10-24 Thread Richard Smith via cfe-commits
rsmith added a comment. In https://reviews.llvm.org/D25817#576276, @arphaman wrote: > This code does perform recovery, but the constructed AST for the destructor > calls is different from the AST that would have been constructed if the code > was correct: we still end up building the pseudo

Re: r285027 - Fix test on non-X86 platforms

2016-10-24 Thread Renato Golin via cfe-commits
Hi Mehdi, it's also failing on aarch64: http://lab.llvm.org:8011/builders/clang-cmake-aarch64-42vma/builds/47 And current build was still red. Not to mention all arm bots. Maybe reverting and trying offline next time. I can help you with arm environments, if you need. Cheers, Renato On 24 Oct

[PATCH] D25928: [cfi] Enable cfi-icall on ARM and AArch64.

2016-10-24 Thread Evgeniy Stepanov via cfe-commits
eugenis created this revision. eugenis added a reviewer: pcc. eugenis added a subscriber: cfe-commits. eugenis set the repository for this revision to rL LLVM. Herald added subscribers: srhines, danalbert, tberghammer, rengolin, aemerson. Backend support added in https://reviews.llvm.org/D25927

Re: [libcxx] r249738 - Split out of .

2016-10-24 Thread Richard Smith via cfe-commits
On Mon, Oct 24, 2016 at 3:30 PM, Bruno Cardoso Lopes < bruno.card...@gmail.com> wrote: > > Sure, go ahead. > > I committed in r284797 and r284801 (libcxx). There's one minor issue > I've found: the changes for the builtins affecting non submodule local > visibility broke current users of plain

[PATCH] D25838: [Basic] Support 32-bit x86 and ARM targets for Fuchsia

2016-10-24 Thread Petr Hosek via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL285038: [Basic] Support 32-bit x86 and ARM targets for Fuchsia (authored by phosek). Changed prior to commit: https://reviews.llvm.org/D25838?vs=75496=75656#toc Repository: rL LLVM

r285038 - [Basic] Support 32-bit x86 and ARM targets for Fuchsia

2016-10-24 Thread Petr Hosek via cfe-commits
Author: phosek Date: Mon Oct 24 17:55:57 2016 New Revision: 285038 URL: http://llvm.org/viewvc/llvm-project?rev=285038=rev Log: [Basic] Support 32-bit x86 and ARM targets for Fuchsia Fuchsia has experimental support for 32-bit x86 and ARM targets, add them to the list of supported targets.

[PATCH] D25888: Add support for __builtin_os_log_format[_buffer_size]

2016-10-24 Thread Mehdi AMINI via cfe-commits
mehdi_amini added a comment. @bkramer : is it an OK dependency to add from a clang point of view? Or should I refactor the patch to avoid introducing it? Repository: rL LLVM https://reviews.llvm.org/D25888 ___ cfe-commits mailing list

[PATCH] D25888: Add support for __builtin_os_log_format[_buffer_size]

2016-10-24 Thread Artem Belevich via cfe-commits
tra added a comment. CodeGen's CMakeLists.txt needs to be updated to link with clangAnalysis now, otherwise it breaks builds that use shared libraries. Fixed in r285037. diff --git a/lib/CodeGen/CMakeLists.txt b/lib/CodeGen/CMakeLists.txt index f5d5d69..9cf34f6 100644 ---

r285037 - Link clangCodeGen with clangAnalysis required after r284990.

2016-10-24 Thread Artem Belevich via cfe-commits
Author: tra Date: Mon Oct 24 17:52:39 2016 New Revision: 285037 URL: http://llvm.org/viewvc/llvm-project?rev=285037=rev Log: Link clangCodeGen with clangAnalysis required after r284990. Fixes build break for configurations that use shared libraries. Modified:

Re: r285027 - Fix test on non-X86 platforms

2016-10-24 Thread Mehdi Amini via cfe-commits
The test is validating pointer size as well, so it is failing on 32 bits right now. I could try to differentiate some of the check and have them work on both size, but I can’t verify that the runtime works (I don’t have a 32 bits runtime). — Mehdi > On Oct 24, 2016, at 2:48 PM, Craig Topper

[PATCH] D25838: [Basic] Support 32-bit x86 and ARM targets for Fuchsia

2016-10-24 Thread Richard Smith via cfe-commits
rsmith accepted this revision. rsmith added a comment. "Instantiate all the templates" all_the_things "with all the types" Repository: rL LLVM https://reviews.llvm.org/D25838

Re: [libcxx] r249738 - Split out of .

2016-10-24 Thread Bruno Cardoso Lopes via cfe-commits
> Sure, go ahead. I committed in r284797 and r284801 (libcxx). There's one minor issue I've found: the changes for the builtins affecting non submodule local visibility broke current users of plain "-fmodules" against our frameworks in public SDKs, in 10.11 & 10.12. I've attached a patch to work

[PATCH] D25809: [CUDA] Improved target attribute-based overloading.

2016-10-24 Thread Artem Belevich via cfe-commits
tra added inline comments. Comment at: lib/Sema/SemaCUDA.cpp:791 + CUDAFunctionTarget NewTarget = IdentifyCUDATarget(NewFD); + for (auto OldND : Previous) { +FunctionDecl *OldFD = OldND->getAsFunction(); jlebar wrote: > tra wrote: > > jlebar wrote: > > >

[PATCH] D25809: [CUDA] Improved target attribute-based overloading.

2016-10-24 Thread Artem Belevich via cfe-commits
tra updated this revision to Diff 75652. tra marked an inline comment as done. tra added a comment. Addressed remaining nits. https://reviews.llvm.org/D25809 Files: include/clang/Basic/DiagnosticSemaKinds.td include/clang/Sema/Sema.h lib/Sema/SemaCUDA.cpp lib/Sema/SemaDecl.cpp

[PATCH] D25844: [Sema][ObjC] Warn about implicitly autoreleasing indirect parameters that are captured by blocks

2016-10-24 Thread Akira Hatanaka via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL285031: [Sema][ObjC] Warn about implicitly autoreleasing out-parameters captured (authored by ahatanak). Changed prior to commit: https://reviews.llvm.org/D25844?vs=75442=75650#toc Repository: rL

r285031 - [Sema][ObjC] Warn about implicitly autoreleasing out-parameters captured

2016-10-24 Thread Akira Hatanaka via cfe-commits
Author: ahatanak Date: Mon Oct 24 16:45:54 2016 New Revision: 285031 URL: http://llvm.org/viewvc/llvm-project?rev=285031=rev Log: [Sema][ObjC] Warn about implicitly autoreleasing out-parameters captured by blocks. Add a new warning "-Wblock-capture-autoreleasing". The warning warns about

Re: r285027 - Fix test on non-X86 platforms

2016-10-24 Thread Craig Topper via cfe-commits
Doesn't this exclude 32-bit x86? ~Craig On Mon, Oct 24, 2016 at 2:22 PM, Mehdi Amini via cfe-commits < cfe-commits@lists.llvm.org> wrote: > Author: mehdi_amini > Date: Mon Oct 24 16:22:01 2016 > New Revision: 285027 > > URL: http://llvm.org/viewvc/llvm-project?rev=285027=rev > Log: > Fix test

Re: [PATCH] D24010: [ReachableCode] Skip over ExprWithCleanups in isConfigurationValue

2016-10-24 Thread David Blaikie via cfe-commits
Ah, right - thanks for reminding/explaining! On Mon, Oct 24, 2016 at 2:42 PM Tim Shen wrote: > On Mon, Oct 24, 2016 at 2:38 PM David Blaikie wrote: > > Simplify it further by replacing A() with just a function instead of a > class? Or does that break the

Re: [PATCH] D24010: [ReachableCode] Skip over ExprWithCleanups in isConfigurationValue

2016-10-24 Thread Tim Shen via cfe-commits
On Mon, Oct 24, 2016 at 2:38 PM David Blaikie wrote: > Simplify it further by replacing A() with just a function instead of a > class? Or does that break the repro? > > bool Foo(); > void Bar(); > void Baz() { > if (False && Foo()) > Bar(); > } > This actually breaks

Re: [PATCH] D24010: [ReachableCode] Skip over ExprWithCleanups in isConfigurationValue

2016-10-24 Thread David Blaikie via cfe-commits
Simplify it further by replacing A() with just a function instead of a class? Or does that break the repro? bool Foo(); void Bar(); void Baz() { if (False && Foo()) Bar(); } On Mon, Oct 24, 2016 at 1:38 PM Tim Shen wrote: > On Mon, Oct 24, 2016 at 10:33 AM David

[PATCH] D25838: [Basic] Support 32-bit x86 and ARM targets for Fuchsia

2016-10-24 Thread Benjamin Kramer via cfe-commits
bkramer accepted this revision. bkramer added a reviewer: bkramer. bkramer added a comment. This revision is now accepted and ready to land. lg Repository: rL LLVM https://reviews.llvm.org/D25838 ___ cfe-commits mailing list

r285028 - CodeGen: remove incorrect temporary Twine

2016-10-24 Thread Saleem Abdulrasool via cfe-commits
Author: compnerd Date: Mon Oct 24 16:25:57 2016 New Revision: 285028 URL: http://llvm.org/viewvc/llvm-project?rev=285028=rev Log: CodeGen: remove incorrect temporary Twine Twines should not be stack allocated. This somehow managed to get past me. Modified:

[PATCH] D24954: [Driver] Disable OpenSUSE rules for OpenSUSE/SLES 10 and older

2016-10-24 Thread Bruno Cardoso Lopes via cfe-commits
bruno added inline comments. Comment at: lib/Driver/ToolChains.cpp:3942 + int Version; + if (SplitLine.first.trim() != "VERSION") +continue; mgorny wrote: > bruno wrote: > > You can check `Line.trim() != VERSION` before the `split` as to do not

r285027 - Fix test on non-X86 platforms

2016-10-24 Thread Mehdi Amini via cfe-commits
Author: mehdi_amini Date: Mon Oct 24 16:22:01 2016 New Revision: 285027 URL: http://llvm.org/viewvc/llvm-project?rev=285027=rev Log: Fix test on non-X86 platforms This is a fixup for r285019, adding an `#ifdef __x86_64__` since the os_log builtin is platform specific. Modified:

[PATCH] D24954: [Driver] Disable OpenSUSE rules for OpenSUSE/SLES 10 and older

2016-10-24 Thread Michał Górny via cfe-commits
mgorny added inline comments. Comment at: lib/Driver/ToolChains.cpp:3942 + int Version; + if (SplitLine.first.trim() != "VERSION") +continue; bruno wrote: > You can check `Line.trim() != VERSION` before the `split` as to do not try to > split

[PATCH] D25925: [clang-tidy] Update cert-err58-cpp to match its new generalised form.

2016-10-24 Thread Aaron Ballman via cfe-commits
aaron.ballman added a comment. Thank you for working on this! I have a few more test cases to try, but I think you're already handling them properly. Comment at: test/clang-tidy/cert-static-object-exception.cpp:29 + X(S = {}) noexcept; +}; + We should also

r285023 - CodeGen: centralise label construction for method lists

2016-10-24 Thread Saleem Abdulrasool via cfe-commits
Author: compnerd Date: Mon Oct 24 15:47:58 2016 New Revision: 285023 URL: http://llvm.org/viewvc/llvm-project?rev=285023=rev Log: CodeGen: centralise label construction for method lists Move all the label construction for the various method list emission into EmitMethodList. Rather than have

r285022 - Fix bug where one of the cases where we mangle a failed

2016-10-24 Thread Richard Smith via cfe-commits
Author: rsmith Date: Mon Oct 24 15:47:04 2016 New Revision: 285022 URL: http://llvm.org/viewvc/llvm-project?rev=285022=rev Log: Fix bug where one of the cases where we mangle a failed to emit the portion. Refactor so that mangleUnresolvedName actually emits the entire , so this mistake is

[libcxx] r285020 - Fix non-portable tests for temp_directory_path(...)

2016-10-24 Thread Eric Fiselier via cfe-commits
Author: ericwf Date: Mon Oct 24 15:40:35 2016 New Revision: 285020 URL: http://llvm.org/viewvc/llvm-project?rev=285020=rev Log: Fix non-portable tests for temp_directory_path(...) Modified:

r285019 - Add support for __builtin_os_log_format[_buffer_size]

2016-10-24 Thread Mehdi Amini via cfe-commits
Author: mehdi_amini Date: Mon Oct 24 15:39:34 2016 New Revision: 285019 URL: http://llvm.org/viewvc/llvm-project?rev=285019=rev Log: Add support for __builtin_os_log_format[_buffer_size] This reverts commit r285007 and reapply r284990, with a fix for the opencl test that I broke. Original commit

[PATCH] D25925: [clang-tidy] Update cert-err58-cpp to match its new generalised form.

2016-10-24 Thread Malcolm Parsons via cfe-commits
malcolm.parsons created this revision. malcolm.parsons added a reviewer: aaron.ballman. malcolm.parsons added a subscriber: cfe-commits. Aaron modified cert-err58-cpp to include all exceptions thrown before main() Update the check to match. https://reviews.llvm.org/D25925 Files:

Re: [PATCH] D24010: [ReachableCode] Skip over ExprWithCleanups in isConfigurationValue

2016-10-24 Thread Tim Shen via cfe-commits
On Mon, Oct 24, 2016 at 10:33 AM David Blaikie wrote: > On Mon, Aug 29, 2016 at 3:45 PM Tim Shen via cfe-commits < > cfe-commits@lists.llvm.org> wrote: > > timshen created this revision. > timshen added reviewers: rsmith, pirama. > timshen added a subscriber: cfe-commits. > >

r285015 - Fix mangling of implicit calls to operator-> to only include a single "pt",

2016-10-24 Thread Richard Smith via cfe-commits
Author: rsmith Date: Mon Oct 24 15:29:40 2016 New Revision: 285015 URL: http://llvm.org/viewvc/llvm-project?rev=285015=rev Log: Fix mangling of implicit calls to operator-> to only include a single "pt", rather than including an extra one for each level of 'operator->()' invoked. Modified:

[PATCH] D24010: [ReachableCode] Skip over ExprWithCleanups in isConfigurationValue

2016-10-24 Thread Tim Shen via cfe-commits
timshen updated this revision to Diff 75644. timshen added a comment. Simplified the test. https://reviews.llvm.org/D24010 Files: clang/include/clang/AST/Stmt.h clang/lib/Analysis/ReachableCode.cpp clang/test/SemaCXX/PR29152.cpp Index: clang/test/SemaCXX/PR29152.cpp

[PATCH] D25531: [libcxx] [test] Include in string_view::copy test

2016-10-24 Thread Eric Fiselier via cfe-commits
EricWF closed this revision. EricWF added a comment. r285012. https://reviews.llvm.org/D25531 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D25492: [libcxx] [test] Fix shadowing in string.assign and string.append

2016-10-24 Thread Eric Fiselier via cfe-commits
EricWF closed this revision. EricWF added a comment. r285011. https://reviews.llvm.org/D25492 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[libcxx] r285012 - Add missing include in string_view tests. Patch from Billy ONeil @ microsoft

2016-10-24 Thread Eric Fiselier via cfe-commits
Author: ericwf Date: Mon Oct 24 15:11:17 2016 New Revision: 285012 URL: http://llvm.org/viewvc/llvm-project?rev=285012=rev Log: Add missing include in string_view tests. Patch from Billy ONeil @ microsoft Modified: libcxx/trunk/test/std/strings/string.view/string.view.ops/copy.pass.cpp

[libcxx] r285011 - Fix shadow warnings in string_view tests. Patch from s...@microsoft.com

2016-10-24 Thread Eric Fiselier via cfe-commits
Author: ericwf Date: Mon Oct 24 15:10:00 2016 New Revision: 285011 URL: http://llvm.org/viewvc/llvm-project?rev=285011=rev Log: Fix shadow warnings in string_view tests. Patch from s...@microsoft.com Modified:

[PATCH] D25439: Fixed column shift when formatting line containing bit shift operators

2016-10-24 Thread Daniel Jasper via cfe-commits
djasper accepted this revision. djasper added a comment. This revision is now accepted and ready to land. Looks good. Thank you! https://reviews.llvm.org/D25439 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D25439: Fixed column shift when formatting line containing bit shift operators

2016-10-24 Thread Paweł Żukowski via cfe-commits
idlecode updated this revision to Diff 75635. https://reviews.llvm.org/D25439 Files: lib/Format/FormatTokenLexer.cpp unittests/Format/FormatTest.cpp Index: unittests/Format/FormatTest.cpp === ---

[PATCH] D25439: Fixed column shift when formatting line containing bit shift operators

2016-10-24 Thread Paweł Żukowski via cfe-commits
idlecode added a comment. Thanks for pointing it out, just a minute ago I found a proper document mentioning it (I have no idea how I could miss it). I hope to be more use in future :) Comment at: unittests/Format/FormatTest.cpp:11365

RE: [PATCH] D25343: [OpenCL] Mark group functions as convergent in opencl-c.h

2016-10-24 Thread Liu, Yaxun (Sam) via cfe-commits
Just my two cents. Let's consider a simple example: for (int I = 0; I < 2; I++) { A = Compute(); barrier(); Use(A); } This does not mean Compute() needs to be executed for all the loop iterations before barrier() being executed. This only means that during each loop iteration, Compute()

r285007 - Revert "Add support for __builtin_os_log_format[_buffer_size]"

2016-10-24 Thread Mehdi Amini via cfe-commits
Author: mehdi_amini Date: Mon Oct 24 14:41:36 2016 New Revision: 285007 URL: http://llvm.org/viewvc/llvm-project?rev=285007=rev Log: Revert "Add support for __builtin_os_log_format[_buffer_size]" This reverts commit r284990, two opencl test are broken Removed:

[PATCH] D25920: AMDGPU: Add missing ISA versions gfx7.x.x and 8.x.x.

2016-10-24 Thread Yaxun Liu via cfe-commits
yaxunl created this revision. yaxunl added reviewers: tstellarAMD, arsenm. yaxunl added a subscriber: cfe-commits. Herald added subscribers: tony-tye, wdng, kzhuravl. Patch by Laurent Morichetti. https://reviews.llvm.org/D25920 Files: lib/Basic/Targets.cpp Index: lib/Basic/Targets.cpp

[PATCH] D25063: [x86][inline-asm][AVX512][clang][PART-1] Introducing "k" and "Yk" constraints for extended inline assembly, enabling use of AVX512 masked vectorized instructions.

2016-10-24 Thread Reid Kleckner via cfe-commits
rnk accepted this revision. rnk added a comment. This revision is now accepted and ready to land. lgtm Repository: rL LLVM https://reviews.llvm.org/D25063 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D25895: [MS ABI] Reuse getVFPtrOffsets instead of using getClassAtVTableLocation

2016-10-24 Thread Reid Kleckner via cfe-commits
rnk accepted this revision. rnk added a comment. This revision is now accepted and ready to land. lgtm Comment at: lib/CodeGen/MicrosoftCXXABI.cpp:1779-1780 + MicrosoftVTableContext = CGM.getMicrosoftVTableContext(); MicrosoftVTableContext::MethodVFTableLocation ML = -

Re: [PATCH] D25817: [Sema] Improve the error diagnostic for dot destructor calls on pointer objects

2016-10-24 Thread David Blaikie via cfe-commits
On Fri, Oct 21, 2016 at 3:16 AM Alex Lorenz wrote: > arphaman updated this revision to Diff 75403. > arphaman added a comment. > > The updated patch improves error handling and adds a test for the fixit. > > > If we issue a fixit we should recover as-if the code was written

[PATCH] D25902: [AVX-512] Fix the operand order for all calls to __builtin_ia32_vfmaddss3_mask.

2016-10-24 Thread Craig Topper via cfe-commits
craig.topper added inline comments. Comment at: lib/Headers/avx512fintrin.h:8394 _MM_FROUND_CUR_DIRECTION); } delena wrote: > Using vfmaddss3_mask is wrong in this case. > It will propagate -B to lower bits if mask==0. I dont' understand this. The

r285001 - [clang] Remove redundant --check-prefix=CHECK from tests

2016-10-24 Thread Mandeep Singh Grang via cfe-commits
Author: mgrang Date: Mon Oct 24 13:53:43 2016 New Revision: 285001 URL: http://llvm.org/viewvc/llvm-project?rev=285001=rev Log: [clang] Remove redundant --check-prefix=CHECK from tests Reviewers: mkuper, rengolin, hans Subscribers: cfe-commits Tags: #clang-c Differential Revision:

[PATCH] D25893: [clang] Remove redundant --check-prefix=CHECK from tests

2016-10-24 Thread Mandeep Singh Grang via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL285001: [clang] Remove redundant --check-prefix=CHECK from tests (authored by mgrang). Changed prior to commit: https://reviews.llvm.org/D25893?vs=75521=75620#toc Repository: rL LLVM

Re: r284960 - [analyzer] Add StdLibraryFunctions checker.

2016-10-24 Thread Artem Dergachev via cfe-commits
Thanks! Should get better with r285000. On 10/24/16 9:34 PM, Evgenii Stepanov wrote: This code also fails with UBSan: tools/clang/lib/StaticAnalyzer/Checkers/StdLibraryFunctionsChecker.cpp:285:62: runtime error: signed integer overflow: 9223372036854775807 + 1 cannot be represented in type

r285000 - [analyzer] Use unsigned integers to rely on well-defined overflow semantics.

2016-10-24 Thread Artem Dergachev via cfe-commits
Author: dergachev Date: Mon Oct 24 13:49:04 2016 New Revision: 285000 URL: http://llvm.org/viewvc/llvm-project?rev=285000=rev Log: [analyzer] Use unsigned integers to rely on well-defined overflow semantics. Found by the UBSan buildbot. Modified:

r284999 - Fix crash if StmtProfile finds a type-dependent member access for which we have

2016-10-24 Thread Richard Smith via cfe-commits
Author: rsmith Date: Mon Oct 24 13:47:04 2016 New Revision: 284999 URL: http://llvm.org/viewvc/llvm-project?rev=284999=rev Log: Fix crash if StmtProfile finds a type-dependent member access for which we have resolved the -> to a call to a specific operator-> function. The particular test case

[PATCH] D25916: Modules: emit an error instead of a random crash (or a misleading error) due to use-after-free.

2016-10-24 Thread Manman Ren via cfe-commits
manmanren added a comment. In this testing case, the first clang invocation builds a system module X and a non-system module Y (X imports Y). At the second clang invocation, the parent thread validates the existing module X and module Y. Because X is a system module, we don't diagnose the

Re: r284960 - [analyzer] Add StdLibraryFunctions checker.

2016-10-24 Thread Evgenii Stepanov via cfe-commits
This code also fails with UBSan: tools/clang/lib/StaticAnalyzer/Checkers/StdLibraryFunctionsChecker.cpp:285:62: runtime error: signed integer overflow: 9223372036854775807 + 1 cannot be represented in type 'long' #0 0x5e1642f in (anonymous

[PATCH] D24954: [Driver] Disable OpenSUSE rules for OpenSUSE/SLES 10 and older

2016-10-24 Thread Bruno Cardoso Lopes via cfe-commits
bruno added inline comments. Comment at: lib/Driver/ToolChains.cpp:3942 + int Version; + if (SplitLine.first.trim() != "VERSION") +continue; You can check `Line.trim() != VERSION` before the `split` as to do not try to split unnecessary lines.

[PATCH] D25916: Modules: emit an error instead of a random crash (or a misleading error) due to use-after-free.

2016-10-24 Thread Manman Ren via cfe-commits
manmanren created this revision. manmanren added reviewers: benlangmuir, rsmith. manmanren added a subscriber: cfe-commits. With implicit modules, it is hard to debug issues that depend on state of the module cache before the clang invocation. The state of the module cache can be changed by

[PATCH] D25902: [AVX-512] Fix the operand order for all calls to __builtin_ia32_vfmaddss3_mask.

2016-10-24 Thread Elena Demikhovsky via cfe-commits
delena added inline comments. Comment at: lib/Headers/avx512fintrin.h:8394 _MM_FROUND_CUR_DIRECTION); } Using vfmaddss3_mask is wrong in this case. It will propagate -B to lower bits if mask==0. Comment at:

[PATCH] D25674: [Concepts] Class template associated constraints

2016-10-24 Thread Hubert Tong via cfe-commits
hubert.reinterpretcast added a comment. Friendly ping... https://reviews.llvm.org/D25674 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D24954: [Driver] Disable OpenSUSE rules for OpenSUSE/SLES 10 and older

2016-10-24 Thread Michał Górny via cfe-commits
mgorny updated this revision to Diff 75615. mgorny added a comment. Refactored the code as requested. Also I've noticed that if VERSION had invalid value, the code continued reading the file — now it immediately returns UnknownDistro in that case. https://reviews.llvm.org/D24954 Files:

Re: [PATCH] D21508: Make friend function template definition available if class is instantiated.

2016-10-24 Thread Serge Pavlov via cfe-commits
Ping. Thanks, --Serge 2016-10-18 0:09 GMT+07:00 Serge Pavlov : > Ping. > > Thanks, > --Serge > > 2016-10-13 11:51 GMT+07:00 Serge Pavlov : > >> sepavloff updated the summary for this revision. >> >> https://reviews.llvm.org/D21508 >> >> >> >> >

[PATCH] D24954: [Driver] Disable OpenSUSE rules for OpenSUSE/SLES 10 and older

2016-10-24 Thread Bruno Cardoso Lopes via cfe-commits
bruno added inline comments. Comment at: lib/Driver/ToolChains.cpp:3937 +StringRef Data = File.get()->getBuffer(); +SmallVector Lines; +Data.split(Lines, "\n"); This file usually has 5-6 lines, can you use 8 instead?

Re: [PATCH] D24010: [ReachableCode] Skip over ExprWithCleanups in isConfigurationValue

2016-10-24 Thread David Blaikie via cfe-commits
On Mon, Aug 29, 2016 at 3:45 PM Tim Shen via cfe-commits < cfe-commits@lists.llvm.org> wrote: > timshen created this revision. > timshen added reviewers: rsmith, pirama. > timshen added a subscriber: cfe-commits. > > https://reviews.llvm.org/D24010 > > Files: > clang/include/clang/AST/Stmt.h >

[PATCH] D25731: [analyzer] NumberObjectConversion: Support OSNumber and CFNumberRef.

2016-10-24 Thread Artem Dergachev via cfe-commits
NoQ updated this revision to Diff 75612. NoQ added a comment. Do not suggest any API when we're not sure (was already advised by Anna but i missed it somehow). https://reviews.llvm.org/D25731 Files: lib/StaticAnalyzer/Checkers/NumberObjectConversionChecker.cpp

[PATCH] D25450: [clang-tidy] Fix identifier naming in macro args.

2016-10-24 Thread Jason Henline via cfe-commits
This revision was automatically updated to reflect the committed changes. jhen marked an inline comment as done. Closed by commit rL284992: [clang-tidy] Fix identifier naming in macro args. (authored by jhen). Changed prior to commit: https://reviews.llvm.org/D25450?vs=75430=75610#toc

[PATCH] D25450: [clang-tidy] Fix identifier naming in macro args.

2016-10-24 Thread Jason Henline via cfe-commits
jhen added a comment. Thanks for the review! Repository: rL LLVM https://reviews.llvm.org/D25450 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] r284992 - [clang-tidy] Fix identifier naming in macro args.

2016-10-24 Thread Jason Henline via cfe-commits
Author: jhen Date: Mon Oct 24 12:20:32 2016 New Revision: 284992 URL: http://llvm.org/viewvc/llvm-project?rev=284992=rev Log: [clang-tidy] Fix identifier naming in macro args. Summary: clang-tidy should fix identifier naming even when the identifier is referenced inside a macro expansion,

[PATCH] D25909: [analyzer] MacOSXApiChecker: Disallow dispatch_once predicates on heap and in ivars.

2016-10-24 Thread Artem Dergachev via cfe-commits
NoQ added inline comments. Comment at: lib/StaticAnalyzer/Checkers/MacOSXAPIChecker.cpp:94 + else if (isa(RS)) { +// FIXME: Presence of an IVar region has priority over this branch, because +// ObjC objects are on the heap even if the core doesn't realize this.

[PATCH] D25305: [OpenCL] Setting constant address space for array initializers

2016-10-24 Thread Anastasia Stulova via cfe-commits
Anastasia added inline comments. Comment at: lib/CodeGen/CGDecl.cpp:1272 +if (getLangOpts().OpenCL) { + UA = llvm::GlobalValue::UnnamedAddr::None; + AS = CGM.getContext().getTargetAddressSpace(LangAS::opencl_constant); bader wrote: > AlexeySotkin

[PATCH] D25343: [OpenCL] Mark group functions as convergent in opencl-c.h

2016-10-24 Thread Anastasia Stulova via cfe-commits
Anastasia added a comment. In https://reviews.llvm.org/D25343#567374, @tstellarAMD wrote: > In https://reviews.llvm.org/D25343#565288, @Anastasia wrote: > > > Do you have any code example where Clang/LLVM performs wrong optimizations > > with respect to the control flow of SPMD execution? > > >

Re: [clang-tools-extra] r284888 - Remove 'misc-pointer-and-integral-operation' clang-tidy check. The only cases

2016-10-24 Thread Richard Smith via cfe-commits
On Mon, Oct 24, 2016 at 8:31 AM, Alexander Kornienko wrote: > Wait, I thought the check was mostly useful for C code, where it detects > real issues? Etienne, can you comment? > See below. This is only checking for cases that are already ill-formed, some of which we accept as

r284990 - Add support for __builtin_os_log_format[_buffer_size]

2016-10-24 Thread Mehdi Amini via cfe-commits
Author: mehdi_amini Date: Mon Oct 24 11:56:23 2016 New Revision: 284990 URL: http://llvm.org/viewvc/llvm-project?rev=284990=rev Log: Add support for __builtin_os_log_format[_buffer_size] These new builtins support a mechanism for logging OS events, using a printf-like format string to specify

[PATCH] D25888: Add support for __builtin_os_log_format[_buffer_size]

2016-10-24 Thread Mehdi AMINI via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL284990: Add support for __builtin_os_log_format[_buffer_size] (authored by mehdi_amini). Changed prior to commit: https://reviews.llvm.org/D25888?vs=75552=75608#toc Repository: rL LLVM

[PATCH] D25909: [analyzer] MacOSXApiChecker: Disallow dispatch_once predicates on heap and in ivars.

2016-10-24 Thread Devin Coughlin via cfe-commits
dcoughlin added inline comments. Comment at: lib/StaticAnalyzer/Checkers/MacOSXAPIChecker.cpp:92 + else if (isa(RS)) +os << " heap allocated memory"; + else if (isa(RS)) { "heap allocated" --> "heap-allocated" Comment at:

RE: [PATCH] D25343: [OpenCL] Mark group functions as convergent in opencl-c.h

2016-10-24 Thread Anastasia Stulova via cfe-commits
Hi Ettore, As far as I understand the whole problem is that the optimized functions are marked by __attribute__((pure)). If the attribute is removed from your example, we get LLVM dump preserving correctness: define i32 @bar(i32 %x) local_unnamed_addr #0 { entry: %call = tail call i32 @foo()

r284988 - Fix clang-format vim integration issue with non-ascii characters

2016-10-24 Thread Alexander Kornienko via cfe-commits
Author: alexfh Date: Mon Oct 24 11:31:26 2016 New Revision: 284988 URL: http://llvm.org/viewvc/llvm-project?rev=284988=rev Log: Fix clang-format vim integration issue with non-ascii characters clang-format.py currently seems to treat vim.current.buf as ascii-encoded data, which leads to an

[PATCH] D25475: [analyzer] Add a new SVal to support pointer-to-member operations.

2016-10-24 Thread Devin Coughlin via cfe-commits
dcoughlin added inline comments. Comment at: lib/StaticAnalyzer/Core/ExprEngineC.cpp:462 + case CK_ReinterpretMemberPointer: { +const Expr *UOExpr = CastE->getSubExpr()->IgnoreParenCasts(); +assert(isa(UOExpr) && kromanenkov wrote: >

[PATCH] D25911: [clang-move] Support moving template class forward declarations.

2016-10-24 Thread Haojian Wu via cfe-commits
hokein updated this revision to Diff 75595. hokein added a comment. Don't mess up with other patches. https://reviews.llvm.org/D25911 Files: clang-tidy/performance/UnnecessaryCopyInitialization.cpp test/clang-tidy/performance-unnecessary-copy-initialization.cpp Index:

[PATCH] D25911: [clang-move] Support moving template class forward declarations.

2016-10-24 Thread Haojian Wu via cfe-commits
hokein created this revision. hokein added a reviewer: alexfh. hokein added a subscriber: cfe-commits. [clang-tidy] Don't warn implicit variables in peformance-unnecessary-copy-initialization. This will prevent the check warning the variables which have been implicitly added by compiler, like

[PATCH] D25888: Add support for __builtin_os_log_format[_buffer_size]

2016-10-24 Thread Mehdi AMINI via cfe-commits
mehdi_amini added a comment. Thanks! For the API part, this is already in production ( https://github.com/apple/swift-clang/blob/stable/lib/CodeGen/CGBuiltin.cpp#L2071 ), so it should be OK! https://reviews.llvm.org/D25888 ___ cfe-commits mailing

[PATCH] D25909: [analyzer] MacOSXApiChecker: Disallow dispatch_once predicates on heap and in ivars.

2016-10-24 Thread Artem Dergachev via cfe-commits
NoQ updated this revision to Diff 75589. NoQ added a comment. Hotfix code duplication i just noticed. https://reviews.llvm.org/D25909 Files: lib/StaticAnalyzer/Checkers/MacOSXAPIChecker.cpp test/Analysis/dispatch-once.m Index: test/Analysis/dispatch-once.m

[PATCH] D25909: [analyzer] MacOSXApiChecker: Disallow dispatch_once predicates on heap and in ivars.

2016-10-24 Thread Artem Dergachev via cfe-commits
NoQ created this revision. NoQ added reviewers: zaks.anna, dcoughlin. NoQ added a subscriber: cfe-commits. As documentation in https://developer.apple.com/reference/dispatch/dispatch_once_t says, only global or static variables should have type `dispatch_once_t`, otherwise the magic with fast

[PATCH] D25893: [clang] Remove redundant --check-prefix=CHECK from tests

2016-10-24 Thread Hans Wennborg via cfe-commits
hans accepted this revision. hans added a comment. This revision is now accepted and ready to land. Looks good to me. https://reviews.llvm.org/D25893 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D25731: [analyzer] NumberObjectConversion: Support OSNumber and CFNumberRef.

2016-10-24 Thread Artem Dergachev via cfe-commits
NoQ updated this revision to Diff 75586. NoQ marked an inline comment as done. NoQ added a comment. - Update warning messages. I think it's better to pattern-match for integer sizes after all when we're suggesting API, this especially looks ugly for OSNumber (which is rare). - Add tests for

Re: [clang-tools-extra] r284888 - Remove 'misc-pointer-and-integral-operation' clang-tidy check. The only cases

2016-10-24 Thread Alexander Kornienko via cfe-commits
Wait, I thought the check was mostly useful for C code, where it detects real issues? Etienne, can you comment? On Fri, Oct 21, 2016 at 11:50 PM, Richard Smith via cfe-commits < cfe-commits@lists.llvm.org> wrote: > Author: rsmith > Date: Fri Oct 21 16:50:28 2016 > New Revision: 284888 > > URL:

[PATCH] D25008: [cmake] Split linked libraries into private & public, for linker script

2016-10-24 Thread Joerg Sonnenberger via cfe-commits
joerg added a comment. So the historical reason for the libgcc_s dance for glibc was the use of unwinding for thread cancellation. With all the glibc versions I can find, going back to SLES11 SP1, this is no longer the case. To check for yourself, look for _Unwind* symbols in libc.so and

[PATCH] D25402: [Driver] Pass -lunwind when using libc++ + compiler-rt on Linux

2016-10-24 Thread Jonas Hahnfeld via cfe-commits
Hahnfeld added inline comments. Comment at: lib/Driver/ToolChains.cpp:4704 + GetRuntimeLibType(Args) == ToolChain::RLT_CompilerRT) +CmdArgs.push_back("-lunwind"); +} mgorny wrote: > Hahnfeld wrote: > > mgorny wrote: > > > Hahnfeld wrote: > > > > As just

[PATCH] D25475: [analyzer] Add a new SVal to support pointer-to-member operations.

2016-10-24 Thread Kirill Romanenkov via cfe-commits
kromanenkov added inline comments. Comment at: lib/StaticAnalyzer/Core/ExprEngineC.cpp:462 + case CK_ReinterpretMemberPointer: { +const Expr *UOExpr = CastE->getSubExpr()->IgnoreParenCasts(); +assert(isa(UOExpr) && dcoughlin wrote: >

Re: r284960 - [analyzer] Add StdLibraryFunctions checker.

2016-10-24 Thread Renato Golin via cfe-commits
On 24 October 2016 at 14:09, Artem Dergachev wrote: > Strange, i'm not receiving any buildbot emails again. Will look through bots > manually next time, that doesn't sound too hard. Pushed a hotfix in r284969. The buildmaster was restarted this weekend and got all old builds

[PATCH] D25008: [cmake] Split linked libraries into private & public, for linker script

2016-10-24 Thread Jonas Hahnfeld via cfe-commits
Hahnfeld added a comment. `LIBCXXABI_USE_LLVM_UNWINDER` implies to me: "Use LLVM's `libunwind` whenever you use `libc++abi`". This has worked until now and I would vote for this to be the right thing to do. Repository: rL LLVM https://reviews.llvm.org/D25008

[PATCH] D25402: [Driver] Pass -lunwind when using libc++ + compiler-rt on Linux

2016-10-24 Thread Michał Górny via cfe-commits
mgorny added inline comments. Comment at: lib/Driver/ToolChains.cpp:4704 + GetRuntimeLibType(Args) == ToolChain::RLT_CompilerRT) +CmdArgs.push_back("-lunwind"); +} Hahnfeld wrote: > mgorny wrote: > > Hahnfeld wrote: > > > As just written in D25008: This

[PATCH] D25008: [cmake] Split linked libraries into private & public, for linker script

2016-10-24 Thread Michał Górny via cfe-commits
mgorny added a comment. I think it'd be technically possible to force a specific SONAME in the linker script but I don't think that's a good idea. Clang should be able to use any libunwind implementation, and libc++ shouldn't really be encoding internal implementation details to the point of

Re: r284960 - [analyzer] Add StdLibraryFunctions checker.

2016-10-24 Thread Artem Dergachev via cfe-commits
Strange, i'm not receiving any buildbot emails again. Will look through bots manually next time, that doesn't sound too hard. Pushed a hotfix in r284969. On 10/24/16 3:08 PM, Renato Golin wrote: On 24 October 2016 at 10:41, Artem Dergachev via cfe-commits wrote:

  1   2   >