[PATCH] D26691: [analyzer] Run clang-format and fix style

2016-12-09 Thread Anna Zaks via Phabricator via cfe-commits
zaks.anna accepted this revision. zaks.anna added a comment. This revision is now accepted and ready to land. Thank you! Comment at: lib/StaticAnalyzer/Core/RangeConstraintManager.cpp:459 // Notice that the lower bound is greater than the upper bound. - RangeSet New =

[PATCH] D27600: [analyzer] Refine the diagnostics in the nullability checker to differentiate between nil and null

2016-12-09 Thread Gábor Horváth via Phabricator via cfe-commits
xazax.hun added a comment. LGTM! https://reviews.llvm.org/D27600 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D27091: Add the way to extract SVals of arguments used in a call for a given StackFrameCtx

2016-12-09 Thread Anna Zaks via Phabricator via cfe-commits
zaks.anna added a comment. Update: Adding support for top frame to the CallEvent is difficult, so let's just use CallEvent API in the checkers for all frames but the top one and have custom top frame handling in the Recursion checker itself. The top frame handling does not need to be complete

[PATCH] D27202: [analyzer] Do not conjure a symbol for return value of a conservatively evaluated function

2016-12-09 Thread Anna Zaks via Phabricator via cfe-commits
zaks.anna added a comment. > Could you please remove the IteratorPastEndChecker file differences from this > patch and make https://reviews.llvm.org/D25660 > dependent on this one? Since this has not been reviewed yet while the IteratorPastEndChecker has been, I do not think we should block

[PATCH] D27535: [analyzer] Add ObjCPropertyChecker - check for autosynthesized copy-properties of mutable types.

2016-12-09 Thread Anna Zaks via Phabricator via cfe-commits
zaks.anna added inline comments. Comment at: include/clang/StaticAnalyzer/Checkers/Checkers.td:494 +def ObjCPropertyChecker : Checker<"ObjCProperty">, + HelpText<"Find various issues with Objective-C properties">, + DescFile<"ObjCPropertyChecker.cpp">; Nit:

[PATCH] D25435: Add -femit-accurate-debug-info to emit more debug info for sample pgo profile collection

2016-12-09 Thread Dehao Chen via Phabricator via cfe-commits
danielcdh added inline comments. Comment at: lib/CodeGen/CGDebugInfo.cpp:2743-2745 if (LinkageName == Name || (!CGM.getCodeGenOpts().EmitGcovArcs && !CGM.getCodeGenOpts().EmitGcovNotes && +

[PATCH] D25435: Add -femit-accurate-debug-info to emit more debug info for sample pgo profile collection

2016-12-09 Thread Eric Christopher via Phabricator via cfe-commits
echristo added inline comments. Comment at: lib/CodeGen/CGDebugInfo.cpp:2743-2745 if (LinkageName == Name || (!CGM.getCodeGenOpts().EmitGcovArcs && !CGM.getCodeGenOpts().EmitGcovNotes && +

[PATCH] D21453: Add support for attribute "overallocated"

2016-12-09 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak added inline comments. Comment at: include/clang/AST/Decl.h:3250 + /// This is true if this struct ends with an array marked 'flexible_array'. + bool HasFlexibleArrayAttr : 1; + ahatanak wrote: > rsmith wrote: > > How is this different from

[PATCH] D27429: [Chrono][Darwin] On Darwin use CLOCK_UPTIME_RAW instead of CLOCK_MONOTONIC

2016-12-09 Thread Howard Hinnant via Phabricator via cfe-commits
howard.hinnant added a comment. I would like to offer two thoughts: 1. Timing with `steady_clock` is often used to time very short events. It should be respected as the "high_resolution_clock". This means that two consecutive calls to `steady_clock::now()` should return nanoseconds

r289309 - [analyzer] Improve VirtualCallChecker diagnostics and move into optin package.

2016-12-09 Thread Devin Coughlin via cfe-commits
Author: dcoughlin Date: Fri Dec 9 19:16:09 2016 New Revision: 289309 URL: http://llvm.org/viewvc/llvm-project?rev=289309=rev Log: [analyzer] Improve VirtualCallChecker diagnostics and move into optin package. The VirtualCallChecker is in alpha because its interprocedural diagnostics represent

[PATCH] D26768: [analyzer] Improve VirtualCallChecker diagnostics and move to optin package.

2016-12-09 Thread Devin Coughlin via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL289309: [analyzer] Improve VirtualCallChecker diagnostics and move into optin package. (authored by dcoughlin). Changed prior to commit: https://reviews.llvm.org/D26768?vs=80979=80984#toc Repository:

Re: r285301 - Attempt to make clang-format.py python 3 - compatible.

2016-12-09 Thread Vedant Kumar via cfe-commits
I confirmed that this works with :pyf and :py3f. Committed in r289308. thanks, vedant > On Dec 8, 2016, at 6:51 AM, Alexander Kornienko wrote: > > If this fixes the problem on python 3 (and it leaves the current behavior on > python 2), then it looks good. Can you submit

r289308 - [clang-format] Another attempt at python 3 compatibility

2016-12-09 Thread Vedant Kumar via cfe-commits
Author: vedantk Date: Fri Dec 9 18:54:13 2016 New Revision: 289308 URL: http://llvm.org/viewvc/llvm-project?rev=289308=rev Log: [clang-format] Another attempt at python 3 compatibility The entries in vim.current.buffer appear to be decoded strings, which means that python3 won't allow invoking

[PATCH] D26768: [analyzer] Improve VirtualCallChecker diagnostics and move to optin package.

2016-12-09 Thread Devin Coughlin via Phabricator via cfe-commits
dcoughlin retitled this revision from "[analyzer] Improve VirtualCallChecker diagnostics" to "[analyzer] Improve VirtualCallChecker diagnostics and move to optin package.". dcoughlin updated the summary for this revision. dcoughlin updated this revision to Diff 80979. dcoughlin added a comment.

[PATCH] D27604: [Driver] Add compiler option to generate a reproducer

2016-12-09 Thread Bruno Cardoso Lopes via Phabricator via cfe-commits
bruno updated this revision to Diff 80981. bruno added a comment. Update after Mehdi's review! https://reviews.llvm.org/D27604 Files: docs/UsersManual.rst include/clang/Basic/DiagnosticDriverKinds.td include/clang/Driver/Driver.h include/clang/Driver/Options.td lib/Driver/Driver.cpp

[PATCH] D27604: [Driver] Add compiler option to generate a reproducer

2016-12-09 Thread Bruno Cardoso Lopes via Phabricator via cfe-commits
bruno added a comment. > I am wondering if there is clearer name than `-gen-reproducer`. Probably, I'm open to suggestions :-) > IIUC, the goal is to extract all environment (system) dependent pieces, > copying them to a folder where the compiler can be chroot-ed (via > `-isysroot`). It

[PATCH] D27641: DebugInfo: Added support for Checksum debug info feature (Clang part)

2016-12-09 Thread Amjad Aboud via Phabricator via cfe-commits
aaboud created this revision. aaboud added reviewers: rnk, probinson, rsmith. aaboud added a subscriber: cfe-commits. Resolve Bug 30978 . This patch contains changes in Clang to support Checksum debug info feature. https://reviews.llvm.org/D27641

[libcxx] r289298 - Creating release candidate rc3 from release_391 branch

2016-12-09 Thread Tom Stellard via cfe-commits
Author: tstellar Date: Fri Dec 9 18:34:56 2016 New Revision: 289298 URL: http://llvm.org/viewvc/llvm-project?rev=289298=rev Log: Creating release candidate rc3 from release_391 branch Added: libcxx/tags/RELEASE_391/rc3/ (props changed) - copied from r289297,

[libunwind] r289305 - Creating release candidate rc3 from release_391 branch

2016-12-09 Thread Tom Stellard via cfe-commits
Author: tstellar Date: Fri Dec 9 18:35:05 2016 New Revision: 289305 URL: http://llvm.org/viewvc/llvm-project?rev=289305=rev Log: Creating release candidate rc3 from release_391 branch Added: libunwind/tags/RELEASE_391/rc3/ (props changed) - copied from r289304,

[libcxxabi] r289299 - Creating release candidate rc3 from release_391 branch

2016-12-09 Thread Tom Stellard via cfe-commits
Author: tstellar Date: Fri Dec 9 18:34:57 2016 New Revision: 289299 URL: http://llvm.org/viewvc/llvm-project?rev=289299=rev Log: Creating release candidate rc3 from release_391 branch Added: libcxxabi/tags/RELEASE_391/rc3/ (props changed) - copied from r289298,

Re: [PATCH] D27429: [Chrono][Darwin] On Darwin use CLOCK_UPTIME_RAW instead of CLOCK_MONOTONIC

2016-12-09 Thread Duncan P. N. Exon Smith via cfe-commits
Two points to make here: 1. CLOCK_UPTIME_RAW exactly matches the previous behaviour, so even if it's wrong, it's not a regression. See the next sentence from the one Eric quoted: CLOCK_UPTIME_RAW clock that increments monotonically, in the same manner as

r289290 - [ubsan] Treat ObjC's BOOL as if its range is always {0, 1}

2016-12-09 Thread Vedant Kumar via cfe-commits
Author: vedantk Date: Fri Dec 9 17:48:18 2016 New Revision: 289290 URL: http://llvm.org/viewvc/llvm-project?rev=289290=rev Log: [ubsan] Treat ObjC's BOOL as if its range is always {0, 1} On some Apple platforms, the ObjC BOOL type is defined as a signed char. When performing instrumentation for

[PATCH] D27607: [ubsan] Treat ObjC's BOOL as if its range is always {0, 1}

2016-12-09 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL289290: [ubsan] Treat ObjC's BOOL as if its range is always {0, 1} (authored by vedantk). Changed prior to commit: https://reviews.llvm.org/D27607?vs=80960=80969#toc Repository: rL LLVM

[PATCH] D27607: [ubsan] Treat ObjC's BOOL as if its range is always {0, 1}

2016-12-09 Thread Anna Zaks via Phabricator via cfe-commits
zaks.anna accepted this revision. zaks.anna added a reviewer: zaks.anna. zaks.anna added a comment. This revision is now accepted and ready to land. LGTM! https://reviews.llvm.org/D27607 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D27631: [CUDA,Driver] Added --no-cuda-gpu-arch= option.

2016-12-09 Thread Artem Belevich via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL289287: [CUDA,Driver] Added --no-cuda-gpu-arch= option. (authored by tra). Changed prior to commit: https://reviews.llvm.org/D27631?vs=80950=80961#toc Repository: rL LLVM

r289287 - [CUDA,Driver] Added --no-cuda-gpu-arch= option.

2016-12-09 Thread Artem Belevich via cfe-commits
Author: tra Date: Fri Dec 9 16:59:17 2016 New Revision: 289287 URL: http://llvm.org/viewvc/llvm-project?rev=289287=rev Log: [CUDA,Driver] Added --no-cuda-gpu-arch= option. This allows us to negate preceding --cuda-gpu-arch=X. This comes handy when user needs to override default flags set for

r289286 - [c++17] P0490R0, NB comment FI 20: allow direct-initialization of decomposition declarations.

2016-12-09 Thread Richard Smith via cfe-commits
Author: rsmith Date: Fri Dec 9 16:56:20 2016 New Revision: 289286 URL: http://llvm.org/viewvc/llvm-project?rev=289286=rev Log: [c++17] P0490R0, NB comment FI 20: allow direct-initialization of decomposition declarations. Modified: cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td

[PATCH] D27607: [ubsan] Treat ObjC's BOOL as if its range is always {0, 1}

2016-12-09 Thread Vedant Kumar via Phabricator via cfe-commits
vsk updated this revision to Diff 80960. vsk marked 3 inline comments as done. vsk added a comment. - Use NSAPI's 'is-BOOL' predicate. - Simplify test. https://reviews.llvm.org/D27607 Files: lib/CodeGen/CGExpr.cpp test/CodeGenObjC/ubsan-bool.m Index: test/CodeGenObjC/ubsan-bool.m

[PATCH] D27607: [ubsan] Treat ObjC's BOOL as if its range is always {0, 1}

2016-12-09 Thread Vedant Kumar via Phabricator via cfe-commits
vsk marked 3 inline comments as done. vsk added a comment. Thanks for your feedback. I will updated the patch shortly. Comment at: lib/CodeGen/CGExpr.cpp:1221 +/// Check if \p Ty is defined as BOOL in a system header. In ObjC language +/// modes, it's safe to treat such a type

r289285 - Fix unused variable warnings. NFCI.

2016-12-09 Thread Simon Pilgrim via cfe-commits
Author: rksimon Date: Fri Dec 9 16:45:21 2016 New Revision: 289285 URL: http://llvm.org/viewvc/llvm-project?rev=289285=rev Log: Fix unused variable warnings. NFCI. Modified: cfe/trunk/lib/CodeGen/CGExprConstant.cpp cfe/trunk/lib/CodeGen/CodeGenTypes.cpp Modified:

[PATCH] D27627: Allow target to specify default address space for codegen

2016-12-09 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. Because, notably, if you do that, then an attempt to pass as an int* will fail, which means this isn't really C++ anymore... and yet that appears to be exactly what you want. https://reviews.llvm.org/D27627 ___

[libcxx] r289283 - [libcxx] [test] Fix string_view tests.

2016-12-09 Thread Stephan T. Lavavej via cfe-commits
Author: stl_msft Date: Fri Dec 9 16:35:53 2016 New Revision: 289283 URL: http://llvm.org/viewvc/llvm-project?rev=289283=rev Log: [libcxx] [test] Fix string_view tests. test/std/strings/string.view/string.view.ops/compare.pointer_size.pass.cpp Passing -1 to size_t triggers signed/unsigned

[PATCH] D27627: Allow target to specify default address space for codegen

2016-12-09 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. I suspect that what you actually want to do in order to implement HCC is change SemaType so that 'int*' is implicitly interpreted as 'int __something *'. But I don't know how not having explicit address spaces actually works in the HCC language design, given that

Re: [PATCH] D26267: [Modules] Include builtins with #include instead of #import for ObjC

2016-12-09 Thread Richard Smith via cfe-commits
On 9 December 2016 at 03:59, Richard Smith via Phabricator via cfe-commits < cfe-commits@lists.llvm.org> wrote: > rsmith added a comment. > > Looks like we might only be making macros visible, and failing to emit the > annot_module_import token for Sema. Hmm, no, we inject that token

[PATCH] D27633: [libcxx] [test] Fix string_view tests.

2016-12-09 Thread Stephan T. Lavavej via Phabricator via cfe-commits
STL_MSFT created this revision. STL_MSFT added reviewers: EricWF, mclow.lists. STL_MSFT added a subscriber: cfe-commits. [libcxx] [test] Fix string_view tests. test/std/strings/string.view/string.view.ops/compare.pointer_size.pass.cpp Passing -1 to size_t triggers signed/unsigned mismatch

[PATCH] D27603: Propagate -fdiagnostics-color to LLD.

2016-12-09 Thread Richard Smith via Phabricator via cfe-commits
rsmith added inline comments. Comment at: lib/Driver/Tools.cpp:284 + // propagate -fdiagnostics-color. + if (StringRef(TC.GetLinkerPath()).endswith("ld.lld") && + D.getDiags().getShowColors()) ruiu wrote: > rsmith wrote: > > I don't think this will work

[PATCH] D26768: [analyzer] Improve VirtualCallChecker diagnostics

2016-12-09 Thread Devin Coughlin via Phabricator via cfe-commits
dcoughlin retitled this revision from "[analyzer] Improve VirtualCallChecker diagnostics and move out of alpha" to "[analyzer] Improve VirtualCallChecker diagnostics". dcoughlin updated this revision to Diff 80953. dcoughlin added a comment. Keep the diagnostic improvements but remove the

[PATCH] D27627: Allow target to specify default address space for codegen

2016-12-09 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. Ok, I'm not understanding this, then. I declare a local variable: int x; According to you, x should be in the generic address space, i.e. the private address space. And at the LLVM IR level, this will be implemented with an AllocaInst, which always creates memory

[PATCH] Fix modernize-deprecated-headers clang-tidy warnings

2016-12-09 Thread Michael Sharpe via cfe-commits
The attached patch will replace C included headers with the respective C++ versions. Best regards, Michael Sharpe diff --git lib/CodeGen/CGOpenCLRuntime.cpp lib/CodeGen/CGOpenCLRuntime.cpp index 9062936..f4c961c 100644 --- lib/CodeGen/CGOpenCLRuntime.cpp +++ lib/CodeGen/CGOpenCLRuntime.cpp @@

[PATCH] D27580: [modules] Add optional out-param to ASTReader::ReadAST for imported submodules.

2016-12-09 Thread Graydon Hoare via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL289276: [modules] Add optional out-param to ASTReader::ReadAST for imported submodules. (authored by graydon). Changed prior to commit: https://reviews.llvm.org/D27580?vs=80782=80952#toc Repository:

[PATCH] D27631: [CUDA,Driver] Added --no-cuda-gpu-arch= option.

2016-12-09 Thread Artem Belevich via Phabricator via cfe-commits
tra updated this revision to Diff 80950. tra added a comment. Removed sorting and extraneous empty lines. https://reviews.llvm.org/D27631 Files: include/clang/Driver/Options.td lib/Driver/Driver.cpp test/Driver/cuda-options.cu Index: test/Driver/cuda-options.cu

[PATCH] D27631: [CUDA,Driver] Added --no-cuda-gpu-arch= option.

2016-12-09 Thread Justin Lebar via Phabricator via cfe-commits
jlebar accepted this revision. jlebar added inline comments. This revision is now accepted and ready to land. Comment at: lib/Driver/Driver.cpp:1952 + + + // Default to sm_20 which is the lowest common denominator for Extra linebreak

[PATCH] D26768: [analyzer] Improve VirtualCallChecker diagnostics and move out of alpha

2016-12-09 Thread Devin Coughlin via Phabricator via cfe-commits
dcoughlin added a comment. I evaluated this checker on three internal codebases that make large use of virtual functions. Project 1: ~190,000 lines of C++. 16 alarms. I triaged all of them. There were 2 definite false positives (FPs) and 14 likely FPs. Project 2: ~320,000 lines of C++. 116

[PATCH] D27631: [CUDA,Driver] Added --no-cuda-gpu-arch= option.

2016-12-09 Thread Artem Belevich via Phabricator via cfe-commits
tra created this revision. tra added reviewers: jlebar, echristo. tra added a subscriber: cfe-commits. Herald added a subscriber: mehdi_amini. This allows us to negate preceding --cuda-gpu-arch=X. This comes handy when user needs to override default flags set for them by the build system.

r289273 - Remove special error recovery for ::(id)

2016-12-09 Thread Reid Kleckner via cfe-commits
Author: rnk Date: Fri Dec 9 15:10:43 2016 New Revision: 289273 URL: http://llvm.org/viewvc/llvm-project?rev=289273=rev Log: Remove special error recovery for ::(id) The code pattern used to implement the token rewriting hack doesn't interact well with token caching in the pre-processor. As a

[PATCH] D27627: Allow target to specify default address space for codegen

2016-12-09 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added a comment. In https://reviews.llvm.org/D27627#618597, @rjmccall wrote: > What address space should local variables be in? should always be 0 since that's llvm convention. https://reviews.llvm.org/D27627 ___ cfe-commits mailing list

Re: r289259 - Improve error message when referencing a non-tag type with a tag

2016-12-09 Thread Reid Kleckner via cfe-commits
On Fri, Dec 9, 2016 at 12:01 PM, Nico Weber wrote: > I never heard "class specifier" outside of compilerese either… > Even if "specifier" is noise to the user, we mention the exact keyword they used, i.e. class, struct, union, enum. That seems like a big improvement.

[PATCH] D27627: Allow target to specify default address space for codegen

2016-12-09 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. What address space should local variables be in? https://reviews.llvm.org/D27627 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D27607: [ubsan] Treat ObjC's BOOL as if its range is always {0, 1}

2016-12-09 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak added inline comments. Comment at: lib/CodeGen/CGExpr.cpp:1221 +/// Check if \p Ty is defined as BOOL in a system header. In ObjC language +/// modes, it's safe to treat such a type as 'the builtin bool'. +static bool isObjCBool(QualType Ty, const SourceManager ,

[PATCH] D25263: [Driver] Allow setting the default linker during build

2016-12-09 Thread Petr Hosek via Phabricator via cfe-commits
phosek added inline comments. Comment at: lib/Driver/ToolChain.cpp:362 + return UseLinker; + } else if (UseLinker == "ld") { +// If we're passed the argument ld, then use whatever the default system I'm wandering whether we shouldn't use `"platform"`

[PATCH] D25263: [Driver] Allow setting the default linker during build

2016-12-09 Thread Petr Hosek via Phabricator via cfe-commits
phosek updated this revision to Diff 80934. phosek marked 4 inline comments as done. Repository: rL LLVM https://reviews.llvm.org/D25263 Files: CMakeLists.txt include/clang/Config/config.h.cmake include/clang/Driver/ToolChain.h lib/Driver/ToolChain.cpp lib/Driver/ToolChains.cpp

[libcxx] r289264 - [libcxx] [test] Add LIBCPP_ASSERT_NOEXCEPT/LIBCPP_ASSERT_NOT_NOEXCEPT, remove an unused variable.

2016-12-09 Thread Stephan T. Lavavej via cfe-commits
Author: stl_msft Date: Fri Dec 9 13:53:08 2016 New Revision: 289264 URL: http://llvm.org/viewvc/llvm-project?rev=289264=rev Log: [libcxx] [test] Add LIBCPP_ASSERT_NOEXCEPT/LIBCPP_ASSERT_NOT_NOEXCEPT, remove an unused variable. test/support/test_macros.h For convenience/greppability, add macros

Re: r289259 - Improve error message when referencing a non-tag type with a tag

2016-12-09 Thread Nico Weber via cfe-commits
I never heard "class specifier" outside of compilerese either… On Fri, Dec 9, 2016 at 2:47 PM, Reid Kleckner via cfe-commits < cfe-commits@lists.llvm.org> wrote: > Author: rnk > Date: Fri Dec 9 13:47:58 2016 > New Revision: 289259 > > URL: http://llvm.org/viewvc/llvm-project?rev=289259=rev >

r289259 - Improve error message when referencing a non-tag type with a tag

2016-12-09 Thread Reid Kleckner via cfe-commits
Author: rnk Date: Fri Dec 9 13:47:58 2016 New Revision: 289259 URL: http://llvm.org/viewvc/llvm-project?rev=289259=rev Log: Improve error message when referencing a non-tag type with a tag Other compilers accept invalid code here that we reject, and we need a better error message to try to

[PATCH] D25216: Improve error message when referencing a non-tag type with a tag

2016-12-09 Thread Reid Kleckner via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL289259: Improve error message when referencing a non-tag type with a tag (authored by rnk). Changed prior to commit: https://reviews.llvm.org/D25216?vs=80903=80927#toc Repository: rL LLVM

[PATCH] D27627: Allow target to specify default address space for codegen

2016-12-09 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl created this revision. yaxunl added reviewers: rjmccall, tstellarAMD, arsenm. yaxunl added a subscriber: cfe-commits. Herald added a subscriber: wdng. By default, if a variable is declared without address space qualifier, clang will assume address space 0 in codegen. This is OK for most

r289258 - Add tests for a couple more DRs.

2016-12-09 Thread Richard Smith via cfe-commits
Author: rsmith Date: Fri Dec 9 13:35:45 2016 New Revision: 289258 URL: http://llvm.org/viewvc/llvm-project?rev=289258=rev Log: Add tests for a couple more DRs. Added: cfe/trunk/test/CXX/drs/dr118.cpp cfe/trunk/test/CXX/drs/dr158.cpp Modified: cfe/trunk/test/CXX/drs/dr0xx.cpp

[PATCH] D27600: [analyzer] Refine the diagnostics in the nullability checker to differentiate between nil and null

2016-12-09 Thread Anna Zaks via Phabricator via cfe-commits
zaks.anna updated this revision to Diff 80925. zaks.anna added a comment. Updated "null"-> "Null" as per Devin's suggestion. https://reviews.llvm.org/D27600 Files: lib/StaticAnalyzer/Checkers/NullabilityChecker.cpp test/Analysis/nullability-no-arc.mm test/Analysis/nullability.mm

[PATCH] D27377: clang-format: Support the Java 8 'default' method modifier

2016-12-09 Thread Luis Héctor Chávez via Phabricator via cfe-commits
lhchavez added a comment. Gentle ping? https://reviews.llvm.org/D27377 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D27607: [ubsan] Treat ObjC's BOOL as if its range is always {0, 1}

2016-12-09 Thread Anna Zaks via Phabricator via cfe-commits
zaks.anna added inline comments. Comment at: lib/CodeGen/CGExpr.cpp:1222 +/// modes, it's safe to treat such a type as 'the builtin bool'. +static bool isObjCBool(QualType Ty, const SourceManager , + const LangOptions ) { Could you use the

r289255 - cxx_dr_status: update to latest issue list and add a couple more tests.

2016-12-09 Thread Richard Smith via cfe-commits
Author: rsmith Date: Fri Dec 9 13:11:50 2016 New Revision: 289255 URL: http://llvm.org/viewvc/llvm-project?rev=289255=rev Log: cxx_dr_status: update to latest issue list and add a couple more tests. Modified: cfe/trunk/test/CXX/drs/dr15xx.cpp cfe/trunk/test/CXX/drs/dr16xx.cpp

r289252 - Add support for non-zero null pointer for C and OpenCL

2016-12-09 Thread Yaxun Liu via cfe-commits
Author: yaxunl Date: Fri Dec 9 13:01:11 2016 New Revision: 289252 URL: http://llvm.org/viewvc/llvm-project?rev=289252=rev Log: Add support for non-zero null pointer for C and OpenCL In amdgcn target, null pointers in global, constant, and generic address space take value 0 but null pointers in

[PATCH] D26196: Add support for non-zero null pointer for C and OpenCL

2016-12-09 Thread Yaxun Liu via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL289252: Add support for non-zero null pointer for C and OpenCL (authored by yaxunl). Changed prior to commit: https://reviews.llvm.org/D26196?vs=80902=80919#toc Repository: rL LLVM

[PATCH] D25660: [Analyzer] Checker for iterators dereferenced beyond their range.

2016-12-09 Thread Anna Zaks via Phabricator via cfe-commits
zaks.anna added a comment. Thanks Artem! Just to be clear, I think this patch should be committed once "inTopLevelNamespace" issue is addressed. That is the only issue pending as far as I can see. The visitor should be a separate patch. https://reviews.llvm.org/D25660

[PATCH] D27603: Propagate -fdiagnostics-color to LLD.

2016-12-09 Thread Rui Ueyama via Phabricator via cfe-commits
ruiu added inline comments. Comment at: lib/Driver/Tools.cpp:284 + // propagate -fdiagnostics-color. + if (StringRef(TC.GetLinkerPath()).endswith("ld.lld") && + D.getDiags().getShowColors()) rsmith wrote: > I don't think this will work for

r289250 - DR1295 and cleanup for P0135R1: Make our initialization code more directly

2016-12-09 Thread Richard Smith via cfe-commits
Author: rsmith Date: Fri Dec 9 12:49:13 2016 New Revision: 289250 URL: http://llvm.org/viewvc/llvm-project?rev=289250=rev Log: DR1295 and cleanup for P0135R1: Make our initialization code more directly mirror the description in the standard. Per DR1295, this means that binding a const / rvalue

[PATCH] D27603: Propagate -fdiagnostics-color to LLD.

2016-12-09 Thread Richard Smith via Phabricator via cfe-commits
rsmith added inline comments. Comment at: lib/Driver/Tools.cpp:284 + // propagate -fdiagnostics-color. + if (StringRef(TC.GetLinkerPath()).endswith("ld.lld") && + D.getDiags().getShowColors()) I don't think this will work for `-fuse-ld=$BINDIR/lld` and

[PATCH] D27603: Propagate -fdiagnostics-color to LLD.

2016-12-09 Thread Hans Wennborg via Phabricator via cfe-commits
hans added inline comments. Comment at: lib/Driver/Tools.cpp:234 const ArgList , ArgStringList , const JobAction ) { const Driver = TC.getDriver(); ruiu wrote: > hans wrote: > > Yes, this doesn't seem

[PATCH] D27621: [clang-tidy] check to find declarations declaring more than one name

2016-12-09 Thread Firat Kasmis via Phabricator via cfe-commits
firolino added a comment. In https://reviews.llvm.org/D27621#618379, @JDevlieghere wrote: > Some small stuff I noticed while reading through the code, I didn't check it > in much detail though. Thanks, fixed it. https://reviews.llvm.org/D27621

[PATCH] D27621: [clang-tidy] check to find declarations declaring more than one name

2016-12-09 Thread Firat Kasmis via Phabricator via cfe-commits
firolino updated this revision to Diff 80916. firolino added a comment. Addressed comment from JDevlieghere https://reviews.llvm.org/D27621 Files: clang-tidy/readability/CMakeLists.txt clang-tidy/readability/OneNamePerDeclarationCheck.cpp

[PATCH] D27603: Propagate -fdiagnostics-color to LLD.

2016-12-09 Thread Rui Ueyama via Phabricator via cfe-commits
ruiu added inline comments. Comment at: lib/Driver/Tools.cpp:234 const ArgList , ArgStringList , const JobAction ) { const Driver = TC.getDriver(); hans wrote: > Yes, this doesn't seem like exactly

[PATCH] D27612: [libcxx] Fix PR24075, PR23841 - Add scoped_allocator_adaptor::construct(pair<T, U>*, ...) overloads.

2016-12-09 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF added a reviewer: AlisdairM. EricWF added a subscriber: AlisdairM. EricWF added a comment. Adding @AlisdairM as a reviewer, because nobody knows more about allocators than Alisdair. https://reviews.llvm.org/D27612 ___ cfe-commits mailing

[PATCH] D27600: [analyzer] Refine the diagnostics in the nullability checker to differentiate between nil and null

2016-12-09 Thread Anna Zaks via Phabricator via cfe-commits
zaks.anna added a comment. Looks like Sema uses "null" not only when referring to literals (see below). Also, if we were referring to literals, we would use single quotes, no? I suggest keeping as is for consistency with the wording that uses nil. I do not see much difference between the two

[PATCH] D25660: [Analyzer] Checker for iterators dereferenced beyond their range.

2016-12-09 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added a comment. A quick example of how a bug reporter visitor for this checker may look like - it needs to be expanded significantly but here's a start. F2675703: report-11.html <== example of how it looks. See, for example, `MallocChecker` to

[PATCH] D27621: [clang-tidy] check to find declarations declaring more than one name

2016-12-09 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tidy/readability/OneNamePerDeclarationCheck.cpp:47 +// Single declarations and macros will be ignored +if (DeclStmt->isSingleDecl() == false && +DeclStmt->getLocStart().isMacroID() == false) {

[PATCH] D27621: [clang-tidy] check to find declarations declaring more than one name

2016-12-09 Thread Firat Kasmis via Phabricator via cfe-commits
firolino removed rL LLVM as the repository for this revision. firolino updated this revision to Diff 80915. firolino added a comment. Updated docs/ReleaseNotes.txt https://reviews.llvm.org/D27621 Files: clang-tidy/readability/CMakeLists.txt

[PATCH] D22296: CodeGen: New vtable group representation: struct of vtable arrays.

2016-12-09 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. A couple minor suggestions, then LGTM. Comment at: clang/include/clang/AST/VTableBuilder.h:255 +operator ArrayRef() const { return {data(), size()}; }; + }; + Maybe this ought to be in LLVM as OwnedArrayRef? And the more minimal

[PATCH] D27621: [clang-tidy] check to find declarations declaring more than one name

2016-12-09 Thread Jonas Devlieghere via Phabricator via cfe-commits
JDevlieghere added a comment. Some small stuff I noticed while reading through the code, I didn't check it in much detail though. Comment at: clang-tidy/readability/OneNamePerDeclarationCheck.cpp:43 +void OneNamePerDeclarationCheck::check(const MatchFinder::MatchResult ) { +

[PATCH] D27622: [libcxx] [test] Add LIBCPP_ASSERT_NOEXCEPT/LIBCPP_ASSERT_NOT_NOEXCEPT, remove an unused variable.

2016-12-09 Thread Stephan T. Lavavej via Phabricator via cfe-commits
STL_MSFT created this revision. STL_MSFT added reviewers: EricWF, mclow.lists. STL_MSFT added a subscriber: cfe-commits. [libcxx] [test] Add LIBCPP_ASSERT_NOEXCEPT/LIBCPP_ASSERT_NOT_NOEXCEPT, remove an unused variable. test/support/test_macros.h For convenience/greppability, add macros for

[PATCH] D27621: [clang-tidy] check to find declarations declaring more than one name

2016-12-09 Thread Firat Kasmis via Phabricator via cfe-commits
firolino added a comment. I have agreed with Kirill to continue this. See http://lists.llvm.org/pipermail/cfe-dev/2016-October/051270.html I would suggest to close https://reviews.llvm.org/D25024. Repository: rL LLVM https://reviews.llvm.org/D27621

[PATCH] D27621: [clang-tidy] check to find declarations declaring more than one name

2016-12-09 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added a comment. Please mention this check in docs/ReleaseNotes.rst (in alphabetical order). This is duplicate of https://reviews.llvm.org/D25024. Will be goo idea to combine code in one. Please note that there are multiple coding guidelines which suggest this style.

[PATCH] D26196: Add support for non-zero null pointer for C and OpenCL

2016-12-09 Thread John McCall via Phabricator via cfe-commits
rjmccall accepted this revision. rjmccall added a comment. This revision is now accepted and ready to land. Okay. With that resolved, this LGTM. https://reviews.llvm.org/D26196 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

r289234 - Relax IRgen check in decl-in-prototype.c to match signext on PPC64

2016-12-09 Thread Reid Kleckner via cfe-commits
Author: rnk Date: Fri Dec 9 11:56:04 2016 New Revision: 289234 URL: http://llvm.org/viewvc/llvm-project?rev=289234=rev Log: Relax IRgen check in decl-in-prototype.c to match signext on PPC64 Modified: cfe/trunk/test/PCH/decl-in-prototype.c Modified: cfe/trunk/test/PCH/decl-in-prototype.c

[PATCH] D27529: Correct Vectorcall Register passing and HVA Behavior

2016-12-09 Thread Erich Keane via Phabricator via cfe-commits
erichkeane updated this revision to Diff 80913. erichkeane marked an inline comment as done. erichkeane added a comment. Based on the tests, I was able to track down the 2 locations that stopped working. I've updated them appropriately. It seems though that this Template Decl Instantiation is

[PATCH] D27621: [clang-tidy] check to find declarations declaring more than one name

2016-12-09 Thread Firat Kasmis via Phabricator via cfe-commits
firolino added a comment. I have tested it on the whole llvm/clang/extra source code without any problems. https://reviews.llvm.org/D27621 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D25216: Improve error message when referencing a non-tag type with a tag

2016-12-09 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. Thanks! https://reviews.llvm.org/D25216 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D27621: [clang-tidy] check to find declarations declaring more than one name

2016-12-09 Thread Firat Kasmis via Phabricator via cfe-commits
firolino created this revision. firolino added reviewers: alexfh, aaron.ballman, klimek, malcolm.parsons. firolino added a subscriber: cfe-commits. Herald added subscribers: JDevlieghere, mgorny. This check can be used to find declarations, which declare more than one name. It helps improving

[PATCH] D27545: Don't assert when redefining a built-in macro in a PCH, PR29119

2016-12-09 Thread Nico Weber via Phabricator via cfe-commits
thakis closed this revision. thakis added a comment. r289228, thanks! https://reviews.llvm.org/D27545 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

r289228 - Don't assert when redefining a built-in macro in a PCH, PR29119

2016-12-09 Thread Nico Weber via cfe-commits
Author: nico Date: Fri Dec 9 11:32:52 2016 New Revision: 289228 URL: http://llvm.org/viewvc/llvm-project?rev=289228=rev Log: Don't assert when redefining a built-in macro in a PCH, PR29119 PCH files store the macro history for a given macro, and the whole history list for one identifier is

[PATCH] D25882: Remove special error recovery for ::(id)

2016-12-09 Thread Reid Kleckner via Phabricator via cfe-commits
rnk added a comment. I think the last time we discussed this, we decided that to truly fix this we need to audit all calls to PP.EnterToken(Stream) from the parser. They are probably broken in token caching mode. I haven't been able to find the time to do that. Should we commit this in the

[PATCH] D27501: clang-format-vsix: add command to format document

2016-12-09 Thread Antonio Maiorano via Phabricator via cfe-commits
amaiorano added a comment. (NOTE, I forgot to click Submit on the reply to @klimek a couple days ago!) Comment at: tools/clang-format-vs/ClangFormat/ClangFormat.vsct:76 + + Clang Format Document + klimek wrote: > hans wrote: > >

[PATCH] D27604: [Driver] Add compiler option to generate a reproducer

2016-12-09 Thread Mehdi AMINI via Phabricator via cfe-commits
mehdi_amini added inline comments. Comment at: include/clang/Basic/DiagnosticDriverKinds.td:95 def err_drv_force_crash : Error< - "failing because environment variable '%0' is set">; + "failing because %select{environment variable|option}0 '%1' is set">; def

[PATCH] D27545: Don't assert when redefining a built-in macro in a PCH, PR29119

2016-12-09 Thread Reid Kleckner via Phabricator via cfe-commits
rnk accepted this revision. rnk added a comment. This revision is now accepted and ready to land. lgtm https://reviews.llvm.org/D27545 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D27279: Store decls in prototypes on the declarator instead of in the AST

2016-12-09 Thread Reid Kleckner via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL289225: Store decls in prototypes on the declarator instead of in the AST (authored by rnk). Changed prior to commit: https://reviews.llvm.org/D27279?vs=80827=80910#toc Repository: rL LLVM

r289225 - Store decls in prototypes on the declarator instead of in the AST

2016-12-09 Thread Reid Kleckner via cfe-commits
Author: rnk Date: Fri Dec 9 11:14:05 2016 New Revision: 289225 URL: http://llvm.org/viewvc/llvm-project?rev=289225=rev Log: Store decls in prototypes on the declarator instead of in the AST This saves two pointers from FunctionDecl that were being used for some rare and questionable C-only

[PATCH] D27486: Correct class-template deprecation behavior

2016-12-09 Thread Erich Keane via Phabricator via cfe-commits
erichkeane updated this revision to Diff 80907. erichkeane added a comment. I've been trying to do what @rsmith suggested, so this is a WIP checkpoint, I was hoping you could take a look and tell me if I'm on the right track. I beleive I'm very nearly done, and all but 1 of the tests pass,

[PATCH] D27429: [Chrono][Darwin] On Darwin use CLOCK_UPTIME_RAW instead of CLOCK_MONOTONIC

2016-12-09 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF added a comment. `CLOCK_MONOTONIC_RAW` however seems to meet the requirements.. https://reviews.llvm.org/D27429 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D27429: [Chrono][Darwin] On Darwin use CLOCK_UPTIME_RAW instead of CLOCK_MONOTONIC

2016-12-09 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists added a comment. I agree with @EricWF . If `CLOCK_UPTIME_RAW` doesn't meet the requirements of `steady_clock` (i.e, monotonically increasing, and advances in real time), then we can't use it. https://reviews.llvm.org/D27429 ___

[PATCH] D27600: [analyzer] Refine the diagnostics in the nullability checker to differentiate between nil and null

2016-12-09 Thread Devin Coughlin via Phabricator via cfe-commits
dcoughlin added a comment. I think in the 'null' case it might be better to keep it as "Null passed" or even "Null value passed". This is different than the 'nil' case because the diagnostic is not referring to a literal. https://reviews.llvm.org/D27600

[PATCH] D27535: [analyzer] Add ObjCPropertyChecker - check for autosynthesized copy-properties of mutable types.

2016-12-09 Thread Devin Coughlin via Phabricator via cfe-commits
dcoughlin added inline comments. Comment at: lib/StaticAnalyzer/Checkers/ObjCPropertyChecker.cpp:44 + BugReporter ) const { + if (D->isReadOnly() || D->getSetterKind() != ObjCPropertyDecl::Copy) +return; It is

  1   2   >