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

2016-11-17 Thread Artem Dergachev via cfe-commits
NoQ accepted this revision. NoQ added a comment. This revision is now accepted and ready to land. LGTM! Comment at: test/Analysis/virtualcall.h:23 +#if INTERPROCEDURAL + // expected-warning-re@-2 ^}}Call Path : fooCall to virtual function during construction or de

[PATCH] D26588: Add LocationContext to members of check::RegionChanges

2016-11-17 Thread Artem Dergachev via cfe-commits
NoQ added inline comments. Comment at: include/clang/StaticAnalyzer/Core/Checker.h:325 + const CallEvent *Call, + const LocationContext *LCtx) { +return ((const CHECKER *) checker)->checkRegionChanges(state, invalidated, -

[clang-tools-extra] r287215 - [clang-tidy] Changes to modernize-use-default check

2016-11-17 Thread Malcolm Parsons via cfe-commits
Author: malcolm.parsons Date: Thu Nov 17 03:14:04 2016 New Revision: 287215 URL: http://llvm.org/viewvc/llvm-project?rev=287215&view=rev Log: [clang-tidy] Changes to modernize-use-default check Summary: Warn about special member functions that only contain a comment. Report the location of the sp

[PATCH] D26741: [clang-tidy] Changes to modernize-use-default check

2016-11-17 Thread Malcolm Parsons via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL287215: [clang-tidy] Changes to modernize-use-default check (authored by malcolm.parsons). Changed prior to commit: https://reviews.llvm.org/D26741?vs=78164&id=78328#toc Repository: rL LLVM https://

[PATCH] D26752: [include-fixer] Refactor include fixer to be usable as a plugin

2016-11-17 Thread Haojian Wu via cfe-commits
hokein added inline comments. Comment at: include-fixer/IncludeFixer.cpp:64 getIncludeFixerContext(const clang::SourceManager &SourceManager, clang::HeaderSearch &HeaderSearch) { +return SemaSource.getIncludeFixerContext(SourceManager, HeaderSearc

[PATCH] D26751: [clang-tidy] Ignore template instantiations in modernize-use-equals-delete check

2016-11-17 Thread Haojian Wu via cfe-commits
hokein accepted this revision. hokein added a reviewer: hokein. hokein added a comment. This revision is now accepted and ready to land. LGTM, thanks. Comment at: clang-tidy/modernize/UseEqualsDeleteCheck.cpp:37 unless(anyOf(hasBody(stmt()), isDefaulted(), isDeleted(

[PATCH] D21298: [Clang-tidy] delete null check

2016-11-17 Thread Haojian Wu via cfe-commits
hokein added inline comments. Comment at: test/clang-tidy/readability-delete-null-pointer.cpp:3 + +#include + We don't rely on implementations of standard headers in lit test. You should fake the function/class that you need in this test. Co

[PATCH] D26751: [clang-tidy] Ignore template instantiations in modernize-use-equals-delete check

2016-11-17 Thread Malcolm Parsons via cfe-commits
malcolm.parsons added inline comments. Comment at: clang-tidy/modernize/UseEqualsDeleteCheck.cpp:37 unless(anyOf(hasBody(stmt()), isDefaulted(), isDeleted(), + ast_matchers::isTemplateInstantiation(), // Ensure that all met

[PATCH] D26774: [CUDA] Driver changes to support CUDA compilation on MacOS.

2016-11-17 Thread Samuel Antao via cfe-commits
sfantao added a comment. Hi Justin, Thanks for the patch. Comment at: clang/lib/Driver/Driver.cpp:479 +// the device toolchain we create depends on both. +ToolChain *&CudaTC = ToolChains[CudaTriple.str() + "/" + HostTriple.str()]; +if (!CudaTC) { I

[PATCH] D26746: [OpenCL] Split PipeType into ReadPipe/WritePipe

2016-11-17 Thread Alexey Bader via cfe-commits
bader accepted this revision. bader added a comment. This revision is now accepted and ready to land. LGTM. Thanks! A few minor comments regarding outdated comments and style. Comment at: include/clang/AST/ASTContext.h:1124 /// \brief Return pipe type for the specified typ

[clang-tools-extra] r287221 - [clang-tidy] Ignore template instantiations in modernize-use-equals-delete check

2016-11-17 Thread Malcolm Parsons via cfe-commits
Author: malcolm.parsons Date: Thu Nov 17 05:40:02 2016 New Revision: 287221 URL: http://llvm.org/viewvc/llvm-project?rev=287221&view=rev Log: [clang-tidy] Ignore template instantiations in modernize-use-equals-delete check Summary: Template instantiations were causing misplaced fixits. Reviewers

[PATCH] D26751: [clang-tidy] Ignore template instantiations in modernize-use-equals-delete check

2016-11-17 Thread Malcolm Parsons via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL287221: [clang-tidy] Ignore template instantiations in modernize-use-equals-delete check (authored by malcolm.parsons). Changed prior to commit: https://reviews.llvm.org/D26751?vs=78202&id=78344#toc Re

[PATCH] D26752: [include-fixer] Refactor include fixer to be usable as a plugin

2016-11-17 Thread Benjamin Kramer via cfe-commits
bkramer added inline comments. Comment at: include-fixer/IncludeFixer.cpp:136 + +auto Begin = StartOfFile.getLocWithOffset(Placed.getOffset()); +auto End = Begin.getLocWithOffset(Placed.getLength()); hokein wrote: > I have a concern that `Placed` here mig

[PATCH] D26752: [include-fixer] Refactor include fixer to be usable as a plugin

2016-11-17 Thread Benjamin Kramer via cfe-commits
bkramer updated this revision to Diff 78345. bkramer marked 7 inline comments as done. bkramer added a comment. - Address review comments. https://reviews.llvm.org/D26752 Files: include-fixer/CMakeLists.txt include-fixer/IncludeFixer.cpp include-fixer/IncludeFixer.h include-fixer/plugin

[PATCH] D21099: [Sema] Teach -Wcast-align to look at the aligned attribute of the declared variables

2016-11-17 Thread Alex Lorenz via cfe-commits
arphaman added inline comments. Comment at: lib/Sema/SemaChecking.cpp:10304 CharUnits SrcAlign = Context.getTypeAlignInChars(SrcPointee); + Expr *SE = nullptr; + NIT, but I think you don't need the extra variable and the `if (SE)` below if you extract the co

[PATCH] D26752: [include-fixer] Refactor include fixer to be usable as a plugin

2016-11-17 Thread Eric Liu via cfe-commits
ioeric added inline comments. Comment at: include-fixer/IncludeFixer.cpp:136 + +auto Begin = StartOfFile.getLocWithOffset(Placed.getOffset()); +auto End = Begin.getLocWithOffset(Placed.getLength()); bkramer wrote: > hokein wrote: > > I have a concern that

[PATCH] D26752: [include-fixer] Refactor include fixer to be usable as a plugin

2016-11-17 Thread Haojian Wu via cfe-commits
hokein added inline comments. Comment at: include-fixer/IncludeFixer.cpp:136 + +auto Begin = StartOfFile.getLocWithOffset(Placed.getOffset()); +auto End = Begin.getLocWithOffset(Placed.getLength()); ioeric wrote: > bkramer wrote: > > hokein wrote: > > > I

[PATCH] D26752: [include-fixer] Refactor include fixer to be usable as a plugin

2016-11-17 Thread Eric Liu via cfe-commits
ioeric added inline comments. Comment at: include-fixer/IncludeFixer.cpp:136 + +auto Begin = StartOfFile.getLocWithOffset(Placed.getOffset()); +auto End = Begin.getLocWithOffset(Placed.getLength()); hokein wrote: > ioeric wrote: > > bkramer wrote: > > > h

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

2016-11-17 Thread Balogh , Ádám via cfe-commits
baloghadamsoftware updated this revision to Diff 78352. baloghadamsoftware added a comment. Updated according to comments. https://reviews.llvm.org/D25660 Files: include/clang/StaticAnalyzer/Checkers/Checkers.td lib/StaticAnalyzer/Checkers/CMakeLists.txt lib/StaticAnalyzer/Checkers/Iterat

[PATCH] D26794: [OpenCL] Blocks are allowed to capture arrays in OpenCL 2.0 and higher.

2016-11-17 Thread Egor Churaev via cfe-commits
echuraev created this revision. echuraev added a reviewer: Anastasia. echuraev added subscribers: cfe-commits, yaxunl, bader. https://reviews.llvm.org/D26794 Files: lib/Sema/SemaExpr.cpp test/SemaOpenCL/blocks_with_arrays.cl Index: test/SemaOpenCL/blocks_with_arrays.cl =

[PATCH] D21298: [Clang-tidy] delete null check

2016-11-17 Thread Aaron Ballman via cfe-commits
aaron.ballman added inline comments. Comment at: test/clang-tidy/readability-delete-null-pointer.cpp:7 + int *p = 0; + if (p) { +// CHECK-MESSAGES: :[[@LINE-1]]:3: warning: 'if' statement is unnecessary; deleting null pointer has no effect [readability-delete-null-pointer]

[PATCH] D26750: [clang-tidy] Add modernize-use-default-member-init check

2016-11-17 Thread Malcolm Parsons via cfe-commits
malcolm.parsons added inline comments. Comment at: docs/clang-tidy/checks/modernize-use-default-member-init.rst:7 +This check converts a default constructor's member initializers into default +member initializers. Other member initializers that match the default +member initiali

[PATCH] D26752: [include-fixer] Refactor include fixer to be usable as a plugin

2016-11-17 Thread Benjamin Kramer via cfe-commits
bkramer updated this revision to Diff 78354. bkramer added a comment. - Turn loop into an assertions, there should never be more than one replacement coming back. https://reviews.llvm.org/D26752 Files: include-fixer/CMakeLists.txt include-fixer/IncludeFixer.cpp include-fixer/IncludeFixer

[PATCH] D26752: [include-fixer] Refactor include fixer to be usable as a plugin

2016-11-17 Thread Benjamin Kramer via cfe-commits
bkramer added inline comments. Comment at: include-fixer/IncludeFixer.cpp:136 + +auto Begin = StartOfFile.getLocWithOffset(Placed.getOffset()); +auto End = Begin.getLocWithOffset(Placed.getLength()); ioeric wrote: > hokein wrote: > > ioeric wrote: > > > b

[PATCH] D26750: [clang-tidy] Add modernize-use-default-member-init check

2016-11-17 Thread Aaron Ballman via cfe-commits
aaron.ballman added inline comments. Comment at: docs/clang-tidy/checks/modernize-use-default-member-init.rst:7 +This check converts a default constructor's member initializers into default +member initializers. Other member initializers that match the default +member initialize

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

2016-11-17 Thread Balogh , Ádám via cfe-commits
baloghadamsoftware marked 10 inline comments as done. baloghadamsoftware added inline comments. Comment at: lib/StaticAnalyzer/Checkers/IteratorPastEndChecker.cpp:209 + CheckerContext &C) const { + const auto *Func = Call.getDecl()->getA

[PATCH] D26752: [include-fixer] Refactor include fixer to be usable as a plugin

2016-11-17 Thread Haojian Wu via cfe-commits
hokein accepted this revision. hokein added a comment. This revision is now accepted and ready to land. LGTM. https://reviews.llvm.org/D26752 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-

[PATCH] D26796: [Driver] Use arch type to find compiler-rt libraries (on Linux)

2016-11-17 Thread Michał Górny via cfe-commits
mgorny created this revision. mgorny added reviewers: rsmith, compnerd, pcc, rengolin. mgorny added a subscriber: cfe-commits. Herald added a subscriber: dberris. Use llvm::Triple::getArchTypeName() when looking for compiler-rt libraries, rather than the exact arch string from the triple. This is

[PATCH] D26798: [docs] Remove doubled spaces

2016-11-17 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. Herald added a subscriber: nemanjai. https://reviews.llvm.org/D26798 Files: docs/ModularizeUsage.rst docs/clang-tidy/checks/cppcoreguidelines-pro-type-cstyl

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

2016-11-17 Thread Balogh , Ádám via cfe-commits
baloghadamsoftware marked 2 inline comments as done. baloghadamsoftware added a comment. In https://reviews.llvm.org/D25660#590778, @NoQ wrote: > - Agree on the `evalAssume()` implementation (i'm still not quite > understanding what the problem is here, see the new inline comments); I think it

[PATCH] D26798: [docs] Remove doubled spaces

2016-11-17 Thread Aaron Ballman via cfe-commits
aaron.ballman accepted this revision. aaron.ballman added a comment. This revision is now accepted and ready to land. LGTM! https://reviews.llvm.org/D26798 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman

[clang-tools-extra] r287226 - [docs] Remove doubled spaces

2016-11-17 Thread Malcolm Parsons via cfe-commits
Author: malcolm.parsons Date: Thu Nov 17 08:26:45 2016 New Revision: 287226 URL: http://llvm.org/viewvc/llvm-project?rev=287226&view=rev Log: [docs] Remove doubled spaces Reviewers: aaron.ballman Subscribers: nemanjai, cfe-commits Differential Revision: https://reviews.llvm.org/D26798 Modified

[PATCH] D26798: [docs] Remove doubled spaces

2016-11-17 Thread Malcolm Parsons via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL287226: [docs] Remove doubled spaces (authored by malcolm.parsons). Changed prior to commit: https://reviews.llvm.org/D26798?vs=78361&id=78362#toc Repository: rL LLVM https://reviews.llvm.org/D26798

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

2016-11-17 Thread Balogh , Ádám via cfe-commits
baloghadamsoftware added a comment. DO I have to apply your path over patch and update the diff? https://reviews.llvm.org/D22374 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D26750: [clang-tidy] Add modernize-use-default-member-init check

2016-11-17 Thread Malcolm Parsons via cfe-commits
malcolm.parsons updated this revision to Diff 78363. malcolm.parsons added a comment. Remove doubled spaces https://reviews.llvm.org/D26750 Files: clang-tidy/modernize/CMakeLists.txt clang-tidy/modernize/ModernizeTidyModule.cpp clang-tidy/modernize/UseDefaultMemberInitCheck.cpp clang-ti

[PATCH] D26796: [Driver] Use arch type to find compiler-rt libraries (on Linux)

2016-11-17 Thread Jonathan Roelofs via cfe-commits
jroelofs added a comment. Testcase? https://reviews.llvm.org/D26796 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D26800: [Sema] Make __attribute__((notnull)) inheritable through function parameters

2016-11-17 Thread Matt Bettinson via cfe-commits
bettinson created this revision. bettinson added reviewers: rsmith, aaron.ballman. bettinson added a subscriber: cfe-commits. Fix PR 30828. ` __attribute__((notnull))` was not inheritable in the redefinition of a function. This is because attribute NonNull wasn't `InheritableParamAttr`, it was `

r287227 - [OPENMP] Fixed codegen for 'omp cancel' construct.

2016-11-17 Thread Alexey Bataev via cfe-commits
Author: abataev Date: Thu Nov 17 09:12:05 2016 New Revision: 287227 URL: http://llvm.org/viewvc/llvm-project?rev=287227&view=rev Log: [OPENMP] Fixed codegen for 'omp cancel' construct. If 'omp cancel' construct is used in a worksharing construct it may cause hanging of the software in case if red

[PATCH] D26752: [include-fixer] Refactor include fixer to be usable as a plugin

2016-11-17 Thread Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL287228: [include-fixer] Refactor include fixer to be usable as a plugin (authored by d0k). Changed prior to commit: https://reviews.llvm.org/D26752?vs=78354&id=78366#toc Repository: rL LLVM https://

[clang-tools-extra] r287228 - [include-fixer] Refactor include fixer to be usable as a plugin

2016-11-17 Thread Benjamin Kramer via cfe-commits
Author: d0k Date: Thu Nov 17 09:16:05 2016 New Revision: 287228 URL: http://llvm.org/viewvc/llvm-project?rev=287228&view=rev Log: [include-fixer] Refactor include fixer to be usable as a plugin - Refactor the external sema source into a visible class - Add support for emitting FixIts - Wrap up in

r287229 - Link include-fixer into libclang if clang-tools-extra is checked out.

2016-11-17 Thread Benjamin Kramer via cfe-commits
Author: d0k Date: Thu Nov 17 09:22:36 2016 New Revision: 287229 URL: http://llvm.org/viewvc/llvm-project?rev=287229&view=rev Log: Link include-fixer into libclang if clang-tools-extra is checked out. include-fixer only slightly bloats the size of libclang, but since libclang has no explicit plugi

[clang-tools-extra] r287230 - [include-fixer] Add a test for the full round trip through libclang and the plugin.

2016-11-17 Thread Benjamin Kramer via cfe-commits
Author: d0k Date: Thu Nov 17 09:23:06 2016 New Revision: 287230 URL: http://llvm.org/viewvc/llvm-project?rev=287230&view=rev Log: [include-fixer] Add a test for the full round trip through libclang and the plugin. Added: clang-tools-extra/trunk/test/include-fixer/yamldb_plugin.cpp Added: cl

[PATCH] D23765: Fix for clang PR 29087

2016-11-17 Thread Gonzalo BG via cfe-commits
gnzlbg added a comment. ping https://reviews.llvm.org/D23765 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D26796: [Driver] Use arch type to find compiler-rt libraries (on Linux)

2016-11-17 Thread Michał Górny via cfe-commits
mgorny updated this revision to Diff 78370. mgorny added a comment. Updated expected output for existing tests and added an additional test to linux-ld.c. https://reviews.llvm.org/D26796 Files: lib/Driver/ToolChain.cpp test/Driver/Inputs/basic_linux_tree/usr/i686-unknown-linux/lib/.keep

[PATCH] D26796: [Driver] Use arch type to find compiler-rt libraries (on Linux)

2016-11-17 Thread Jonathan Roelofs via cfe-commits
jroelofs added inline comments. Comment at: test/Driver/print-libgcc-file-name-clangrt.c:11 // RUN: | FileCheck --check-prefix=CHECK-CLANGRT-I686 %s -// CHECK-CLANGRT-I686: libclang_rt.builtins-i686.a +// CHECK-CLANGRT-I686: libclang_rt.builtins-i386.a This CH

[PATCH] D24289: Add warning when assigning enums to bitfields without an explicit unsigned underlying type

2016-11-17 Thread Reid Kleckner via cfe-commits
rnk added a comment. In https://reviews.llvm.org/D24289#598169, @rsmith wrote: > This is causing warnings to fire for headers shared between C and C++, where > the "give the enum an unsigned underlying type" advice doesn't work, and > where the code in question will never be built for the MS AB

[PATCH] D26763: [compiler-rt] [asan] Use __SSE2__ (rather than __i686__...) for SSE2 test

2016-11-17 Thread Kostya Serebryany via cfe-commits
kcc accepted this revision. kcc added a comment. This revision is now accepted and ready to land. LGTM, assuming you have verified that the test is still executed. https://reviews.llvm.org/D26763 ___ cfe-commits mailing list cfe-commits@lists.llvm.

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

2016-11-17 Thread Anna Zaks via cfe-commits
zaks.anna added inline comments. Comment at: lib/StaticAnalyzer/Checkers/IteratorPastEndChecker.cpp:423 + +void IteratorPastEndChecker::handleComparison(CheckerContext &C, + const SVal &LVal, baloghadamsoftware wrote:

r287238 - Sema: correct typo correction for ivars in @implementation

2016-11-17 Thread Saleem Abdulrasool via cfe-commits
Author: compnerd Date: Thu Nov 17 11:10:54 2016 New Revision: 287238 URL: http://llvm.org/viewvc/llvm-project?rev=287238&view=rev Log: Sema: correct typo correction for ivars in @implementation The previous typo correction handling assumed that ivars are only declared in the interface declaration

[PATCH] D26435: Use unique_ptr for cached tokens for default arguments in C++.

2016-11-17 Thread Malcolm Parsons via cfe-commits
malcolm.parsons accepted this revision. malcolm.parsons added a comment. This revision is now accepted and ready to land. LGTM. https://reviews.llvm.org/D26435 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mai

[PATCH] D26435: Use unique_ptr for cached tokens for default arguments in C++.

2016-11-17 Thread David Tarditi via cfe-commits
dtarditi updated this revision to Diff 78375. dtarditi added a comment. The parameter array needed to be initialized so that assignments involving unique pointers work properly. The memory could be uninitialized according to C++ semantics.. Visual C++ was zeroing the memory and GCC was not. T

[PATCH] D26796: [Driver] Use arch type to find compiler-rt libraries (on Linux)

2016-11-17 Thread Michał Górny via cfe-commits
mgorny added inline comments. Comment at: test/Driver/print-libgcc-file-name-clangrt.c:11 // RUN: | FileCheck --check-prefix=CHECK-CLANGRT-I686 %s -// CHECK-CLANGRT-I686: libclang_rt.builtins-i686.a +// CHECK-CLANGRT-I686: libclang_rt.builtins-i386.a jroelofs

Re: [PATCH] D24289: Add warning when assigning enums to bitfields without an explicit unsigned underlying type

2016-11-17 Thread Richard Smith via cfe-commits
On 17 Nov 2016 8:56 am, "Reid Kleckner" wrote: rnk added a comment. In https://reviews.llvm.org/D24289#598169, @rsmith wrote: > This is causing warnings to fire for headers shared between C and C++, where the "give the enum an unsigned underlying type" advice doesn't work, and where the code in

[PATCH] D26544: [PPC] support for arithmetic builtins in the FE

2016-11-17 Thread Ehsan Amiri via cfe-commits
amehsan updated the summary for this revision. amehsan updated this revision to Diff 78376. https://reviews.llvm.org/D26544 Files: lib/Headers/altivec.h test/CodeGen/builtins-ppc-altivec.c test/CodeGen/builtins-ppc-p8vector.c test/CodeGen/builtins-ppc-quadword.c test/CodeGen/builtins-pp

[PATCH] D26564: Use PIC relocation mode by default for PowerPC64 ELF

2016-11-17 Thread Ehsan Amiri via cfe-commits
amehsan added inline comments. Comment at: lib/Driver/ToolChains.cpp:2799-2807 + switch (getArch()) { + case llvm::Triple::x86_64: +return getTriple().isOSWindows(); + case llvm::Triple::ppc64: + case llvm::Triple::ppc64le: +return !getTriple().isOSBinFormatMachO() &&

r287241 - Use unique_ptr for cached tokens for default arguments in C++.

2016-11-17 Thread Malcolm Parsons via cfe-commits
Author: malcolm.parsons Date: Thu Nov 17 11:52:58 2016 New Revision: 287241 URL: http://llvm.org/viewvc/llvm-project?rev=287241&view=rev Log: Use unique_ptr for cached tokens for default arguments in C++. Summary: This changes pointers to cached tokens for default arguments in C++ from raw point

[PATCH] D26782: [libcxx] [test] Test changes for P0504R0 "Revisiting in-place tag types for any/optional/variant"

2016-11-17 Thread Casey Carter via cfe-commits
CaseyCarter marked an inline comment as done. CaseyCarter added a comment. > Do these tests pass with the current `` implementation, or will they > have to wait? These tests **do not pass** without making the changes required in P0504R0 to `` and ``. (Interestingly is unaffected; its use of

[PATCH] D26435: Use unique_ptr for cached tokens for default arguments in C++.

2016-11-17 Thread Malcolm Parsons via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL287241: Use unique_ptr for cached tokens for default arguments in C++. (authored by malcolm.parsons). Changed prior to commit: https://reviews.llvm.org/D26435?vs=78375&id=78380#toc Repository: rL LLV

[PATCH] D26796: [Driver] Use arch type to find compiler-rt libraries (on Linux)

2016-11-17 Thread Michał Górny via cfe-commits
mgorny updated this revision to Diff 78378. mgorny marked 2 inline comments as done. mgorny added a comment. Updated the -print-libgcc-file-name test name. Additionally, I've added another subvariant of that test using i686-* target to ensure that the mapping works for that function too, in case

[PATCH] D26782: [libcxx] [test] Test changes for P0504R0 "Revisiting in-place tag types for any/optional/variant"

2016-11-17 Thread Casey Carter via cfe-commits
CaseyCarter updated this revision to Diff 78379. CaseyCarter marked an inline comment as done. CaseyCarter added a comment. Don't `STATIC_ASSERT`; `static_assert`. https://reviews.llvm.org/D26782 Files: test/std/utilities/any/any.class/any.cons/in_place_type.pass.cpp test/std/utilities/any/

[PATCH] D26794: [OpenCL] Blocks are allowed to capture arrays in OpenCL 2.0 and higher.

2016-11-17 Thread Anastasia Stulova via cfe-commits
Anastasia added a comment. I have created a bug to Khronos regarding this, but unfortunately I don't see it being progressed yet. https://cvs.khronos.org/bugzilla/show_bug.cgi?id=15659 The problem here is that I am not sure we should deviate from the ObjC implementation because OpenCL blocks ar

[PATCH] D26773: [analyzer] Refactor recursive symbol reachability check to use symbol_iterator

2016-11-17 Thread Artem Dergachev via cfe-commits
NoQ added inline comments. Comment at: lib/StaticAnalyzer/Core/ProgramState.cpp:542 +if (!visitor.VisitSymbol(*SI)) + Result = false; } I guess we should break the loop here. https://reviews.llvm.org/D26773 ___

[PATCH] D26807: Fix a comment for -fsave-optimization-record

2016-11-17 Thread Adam Nemet via cfe-commits
anemet created this revision. anemet added a reviewer: hfinkel. anemet added a subscriber: cfe-commits. https://reviews.llvm.org/D26807 Files: lib/Driver/Tools.cpp Index: lib/Driver/Tools.cpp === --- lib/Driver/Tools.cpp +++ lib/

[PATCH] D26773: [analyzer] Refactor recursive symbol reachability check to use symbol_iterator

2016-11-17 Thread Artem Dergachev via cfe-commits
NoQ added inline comments. Comment at: lib/StaticAnalyzer/Core/ProgramState.cpp:535 +if (!isa(*SI)) + continue; Hmm, the original code does actually visit non-SymbolData. https://reviews.llvm.org/D26773

[PATCH] D26763: [compiler-rt] [asan] Use __SSE2__ (rather than __i686__...) for SSE2 test

2016-11-17 Thread Michał Górny via cfe-commits
mgorny added a comment. I did, even twice ;-). Thanks. https://reviews.llvm.org/D26763 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

r287244 - ObjC Module: try to make objc module deterministic.

2016-11-17 Thread Manman Ren via cfe-commits
Author: mren Date: Thu Nov 17 12:41:18 2016 New Revision: 287244 URL: http://llvm.org/viewvc/llvm-project?rev=287244&view=rev Log: ObjC Module: try to make objc module deterministic. Make sure that comparing selectors in DeclarationName does its job. rdar://problem/28988750 Added: cfe/trunk/

[PATCH] D26763: [compiler-rt] [asan] Use __SSE2__ (rather than __i686__...) for SSE2 test

2016-11-17 Thread Michał Górny via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL287245: [tests] Use __SSE2__ (rather than __i686__...) for SSE2 ASAN test (authored by mgorny). Changed prior to commit: https://reviews.llvm.org/D26763?vs=78245&id=78391#toc Repository: rL LLVM htt

[PATCH] D26774: [CUDA] Driver changes to support CUDA compilation on MacOS.

2016-11-17 Thread Justin Lebar via cfe-commits
jlebar added inline comments. Comment at: clang/lib/Driver/Driver.cpp:479 +// the device toolchain we create depends on both. +ToolChain *&CudaTC = ToolChains[CudaTriple.str() + "/" + HostTriple.str()]; +if (!CudaTC) { sfantao wrote: > I am not sure I

[PATCH] D26773: [analyzer] Refactor recursive symbol reachability check to use symbol_iterator

2016-11-17 Thread Dominic Chen via cfe-commits
ddcc updated this revision to Diff 78392. ddcc added a comment. Fix visitation, add early termination, add comments https://reviews.llvm.org/D26773 Files: include/clang/StaticAnalyzer/Core/PathSensitive/ProgramState.h lib/StaticAnalyzer/Core/ProgramState.cpp Index: lib/StaticAnalyzer/Core

[PATCH] D26773: [analyzer] Refactor recursive symbol reachability check to use symbol_iterator

2016-11-17 Thread Dominic Chen via cfe-commits
ddcc added a comment. I believe you're correct, the original code terminates early because of the short circuit evaluation on line 553, and visits all reachable nodes but doesn't recurse on non-SymbolData. https://reviews.llvm.org/D26773 ___ cfe-c

[PATCH] D25654: [Sema] Don't perform aggregate initialization for types with explicit constructors

2016-11-17 Thread Eric Fiselier via cfe-commits
EricWF added a comment. @rsmith ping. This is kind-of blocking making libc++'s tag types not constructible from `{}`. https://reviews.llvm.org/D25654 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/list

Re: r287241 - Use unique_ptr for cached tokens for default arguments in C++.

2016-11-17 Thread Richard Smith via cfe-commits
On 17 November 2016 at 09:52, Malcolm Parsons via cfe-commits < cfe-commits@lists.llvm.org> wrote: > Author: malcolm.parsons > Date: Thu Nov 17 11:52:58 2016 > New Revision: 287241 > > URL: http://llvm.org/viewvc/llvm-project?rev=287241&view=rev > Log: > Use unique_ptr for cached tokens for defaul

[PATCH] D26782: [libcxx] [test] Test changes for P0504R0 "Revisiting in-place tag types for any/optional/variant"

2016-11-17 Thread Eric Fiselier via cfe-commits
EricWF accepted this revision. EricWF added a comment. This revision is now accepted and ready to land. LGTM. This patch misses `any.modifiers/emplace.pass.cpp` but I'll fix that up and commit with the libc++ changes! https://reviews.llvm.org/D26782 __

[libcxx] r287249 - Test changes for P0504R0 "Revisiting in-place tag types for any/optional/variant". Patch from Casey Carter

2016-11-17 Thread Eric Fiselier via cfe-commits
Author: ericwf Date: Thu Nov 17 13:23:35 2016 New Revision: 287249 URL: http://llvm.org/viewvc/llvm-project?rev=287249&view=rev Log: Test changes for P0504R0 "Revisiting in-place tag types for any/optional/variant". Patch from Casey Carter Modified: libcxx/trunk/test/std/utilities/any/any.c

[libcxx] r287250 - Implement P0504R0: Revisiting in-place tag types for any/optional/variant

2016-11-17 Thread Eric Fiselier via cfe-commits
Author: ericwf Date: Thu Nov 17 13:24:04 2016 New Revision: 287250 URL: http://llvm.org/viewvc/llvm-project?rev=287250&view=rev Log: Implement P0504R0: Revisiting in-place tag types for any/optional/variant Modified: libcxx/trunk/include/any libcxx/trunk/include/utility Modified: libcxx/

[libcxx] r287251 - Remove files missed in r287250

2016-11-17 Thread Eric Fiselier via cfe-commits
Author: ericwf Date: Thu Nov 17 13:24:34 2016 New Revision: 287251 URL: http://llvm.org/viewvc/llvm-project?rev=287251&view=rev Log: Remove files missed in r287250 Removed: libcxx/trunk/test/libcxx/utilities/utility/utility.inplace/ ___ cfe-commits

[PATCH] D26782: [libcxx] [test] Test changes for P0504R0 "Revisiting in-place tag types for any/optional/variant"

2016-11-17 Thread Eric Fiselier via cfe-commits
EricWF closed this revision. EricWF added a comment. r287249. Thanks again! https://reviews.llvm.org/D26782 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D25654: [Sema] Don't perform aggregate initialization for types with explicit constructors

2016-11-17 Thread Richard Smith via cfe-commits
rsmith added inline comments. Comment at: lib/AST/DeclCXX.cpp:564 +// C++1z [dcl.init.aggr]p1: +// - no user-provided, explicit, or inherited constructors, +if (getASTContext().getLangOpts().CPlusPlus1z && Constructor->isExplicit()) rsmith wrote: > D

[PATCH] D26808: [Sema] Don't allow applying address-of operator to a call to a function with __unknown_anytype return type

2016-11-17 Thread Akira Hatanaka via cfe-commits
ahatanak created this revision. ahatanak added reviewers: doug.gregor, spyffe. ahatanak added a subscriber: cfe-commits. This patch fixes an assert in CodeGenFunction::EmitCallExprLValue that is triggered when the CallExpr's return type is not a reference type: assert(E->getCallReturnType(getCon

[PATCH] D26753: ASTImporter: improve support for C++ templates

2016-11-17 Thread Aleksei Sidorin via cfe-commits
a.sidorin updated this revision to Diff 78382. a.sidorin added a comment. Address review comments; fix tests. https://reviews.llvm.org/D26753 Files: include/clang/AST/TemplateBase.h lib/AST/ASTImporter.cpp test/ASTMerge/class-template-partial-spec/Inputs/class-template-partial-spec1.cpp

[PATCH] D26753: ASTImporter: improve support for C++ templates

2016-11-17 Thread Aleksei Sidorin via cfe-commits
a.sidorin added a comment. Thank you! I'll update this review again when I have a test for NestedNameSpecifierLocs. Comment at: lib/AST/ASTImporter.cpp:458 + } + return true; +} spyffe wrote: > Is this really an appropriate default result? I would argue for

[PATCH] D22334: Fix for Bug 28172 : clang crashes on invalid code (with too few arguments to __builtin_signbit) without any proper diagnostics.

2016-11-17 Thread Mayur Pandey via cfe-commits
mayurpandey updated this revision to Diff 78390. mayurpandey added a comment. Hi, Updated the patch to incorporate the review comments. I had missed adding ValArg->getType() when emitting the diagnostic which was cauing the crash. Testing done, no regressions. Thanks, Mayur https://reviews.l

[libcxx] r287255 - Workaround compilers w/o C++1z inline variables

2016-11-17 Thread Eric Fiselier via cfe-commits
Author: ericwf Date: Thu Nov 17 14:08:43 2016 New Revision: 287255 URL: http://llvm.org/viewvc/llvm-project?rev=287255&view=rev Log: Workaround compilers w/o C++1z inline variables Modified: libcxx/trunk/include/__config libcxx/trunk/include/utility Modified: libcxx/trunk/include/__confi

[PATCH] D22334: Fix for Bug 28172 : clang crashes on invalid code (with too few arguments to __builtin_signbit) without any proper diagnostics.

2016-11-17 Thread David Majnemer via cfe-commits
majnemer accepted this revision. majnemer added a comment. This revision is now accepted and ready to land. LGTM with nits Comment at: lib/Sema/SemaChecking.cpp:110 +S.Diag(ValArg->getLocStart(), diag::err_typecheck_cond_expect_float) + << ValArg->getType() << ValArg->

[PATCH] D21099: [Sema] Teach -Wcast-align to look at the aligned attribute of the declared variables

2016-11-17 Thread Akira Hatanaka via cfe-commits
ahatanak updated this revision to Diff 78399. ahatanak added a comment. Address Alex's review comments. Define a static function for setting SrcAlign. https://reviews.llvm.org/D21099 Files: lib/Sema/SemaChecking.cpp test/Sema/warn-cast-align.c Index: test/Sema/warn-cast-align.c =

Re: [PATCH] D24289: Add warning when assigning enums to bitfields without an explicit unsigned underlying type

2016-11-17 Thread Arthur O'Dwyer via cfe-commits
On Thu, Nov 17, 2016 at 9:52 AM, Richard Smith via cfe-commits < cfe-commits@lists.llvm.org> wrote: > On 17 Nov 2016 8:56 am, "Reid Kleckner" wrote: >> In https://reviews.llvm.org/D24289#598169, @rsmith wrote: >>> This is causing warnings to fire for headers shared between C and C++, >>> where the

[PATCH] D26560: Add a test for vcall on a null ptr.

2016-11-17 Thread Ivan Krasin via cfe-commits
krasin updated this revision to Diff 78405. krasin added a comment. sync https://reviews.llvm.org/D26560 Files: test/ubsan/TestCases/TypeCheck/null.cpp Index: test/ubsan/TestCases/TypeCheck/null.cpp === --- test/ubsan/TestCases

r287258 - Fixes for r287241. Use placement new. Apply clang-format.

2016-11-17 Thread Malcolm Parsons via cfe-commits
Author: malcolm.parsons Date: Thu Nov 17 15:00:09 2016 New Revision: 287258 URL: http://llvm.org/viewvc/llvm-project?rev=287258&view=rev Log: Fixes for r287241. Use placement new. Apply clang-format. Modified: cfe/trunk/lib/Parse/ParseDeclCXX.cpp cfe/trunk/lib/Sema/DeclSpec.cpp cfe/tr

[PATCH] D26807: Fix a comment for -fsave-optimization-record

2016-11-17 Thread Hal Finkel via cfe-commits
hfinkel accepted this revision. hfinkel added a comment. This revision is now accepted and ready to land. LGTM https://reviews.llvm.org/D26807 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe

[PATCH] D25654: [Sema] Don't perform aggregate initialization for types with explicit constructors

2016-11-17 Thread Eric Fiselier via cfe-commits
EricWF updated this revision to Diff 78410. EricWF added a comment. OK, I've applied the fix to C++11 and C++14. Although the inheriting-constructor part still only matters in C++1z since it requires having base classes. I also fixed aggregate initialization for types with non-aggregate base c

[PATCH] D26774: [CUDA] Driver changes to support CUDA compilation on MacOS.

2016-11-17 Thread Artem Belevich via cfe-commits
tra accepted this revision. tra added a comment. This revision is now accepted and ready to land. LGTM, with couple of minor nits. Comment at: clang/lib/Driver/Driver.cpp:3650-3654 + + // Intentionally omitted from the switch above: llvm::Triple::CUDA. CUDA + // compiles alw

[PATCH] D26812: [libcxx] [test] In random tests, use real static_asserts and silence a warning.

2016-11-17 Thread Stephan T. Lavavej via cfe-commits
STL_MSFT created this revision. STL_MSFT added reviewers: EricWF, mclow.lists. STL_MSFT added a subscriber: cfe-commits. [libcxx] [test] In random tests, use real static_asserts and silence a warning. One test triggers MSVC's warning C4310 "cast truncates constant value". The code is valid, and y

[PATCH] D26813: [libcxx] [test] allocator is non-Standard.

2016-11-17 Thread Stephan T. Lavavej via cfe-commits
STL_MSFT created this revision. STL_MSFT added reviewers: EricWF, mclow.lists. STL_MSFT added a subscriber: cfe-commits. [libcxx] [test] allocator is non-Standard. N4582 17.6.3.5 [allocator.requirements] says that allocators are given cv-unqualified object types, and N4582 20.9.9 [default.allocat

[PATCH] D26814: [libcxx] [test] Change ifstream constructor tests to handle read-only files.

2016-11-17 Thread Stephan T. Lavavej via cfe-commits
STL_MSFT created this revision. STL_MSFT added reviewers: EricWF, mclow.lists. STL_MSFT added a subscriber: cfe-commits. Herald added a subscriber: aemerson. [libcxx] [test] Change ifstream constructor tests to handle read-only files. Certain source control systems like to set the read-only bit o

[PATCH] D26815: [libcxx] [test] Fix an assumption about the state of moved-from std::functions.

2016-11-17 Thread Stephan T. Lavavej 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 an assumption about the state of moved-from std::functions. The Standard doesn't provide any guarantees beyond "valid but unspecified" for moved-from std::f

[PATCH] D26816: [libcxx] [test] Fix non-Standard assumptions when testing sample().

2016-11-17 Thread Stephan T. Lavavej 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 non-Standard assumptions when testing sample(). sample() isn't specified with a reproducible algorithm, so expecting exact output is non-Standard. Mark thos

r287262 - [CrashReproducer][Darwin] Suggest attaching .crash diagnostic file

2016-11-17 Thread Bruno Cardoso Lopes via cfe-commits
Author: bruno Date: Thu Nov 17 15:41:22 2016 New Revision: 287262 URL: http://llvm.org/viewvc/llvm-project?rev=287262&view=rev Log: [CrashReproducer][Darwin] Suggest attaching .crash diagnostic file In addition to the preprocessed sources file and reproducer script, also point to the .crash diagn

[PATCH] D25949: [Driver] Refactor distro detection & classification as a separate API

2016-11-17 Thread Bruno Cardoso Lopes via cfe-commits
bruno accepted this revision. bruno added a comment. This revision is now accepted and ready to land. Very nice! LGTM https://reviews.llvm.org/D25949 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listi

r287275 - [Preprocessor] Support for '-dI' flag

2016-11-17 Thread Bruno Cardoso Lopes via cfe-commits
Author: bruno Date: Thu Nov 17 16:45:31 2016 New Revision: 287275 URL: http://llvm.org/viewvc/llvm-project?rev=287275&view=rev Log: [Preprocessor] Support for '-dI' flag Re-introduce r285411. Implement the -dI as supported by GCC: Output ‘#include’ directives in addition to the result of preproc

[PATCH] D21298: [Clang-tidy] delete null check

2016-11-17 Thread Gergely Angeli via cfe-commits
SilverGeri added inline comments. Comment at: test/clang-tidy/readability-delete-null-pointer.cpp:7 + int *p = 0; + if (p) { +// CHECK-MESSAGES: :[[@LINE-1]]:3: warning: 'if' statement is unnecessary; deleting null pointer has no effect [readability-delete-null-pointer] --

  1   2   >