[libcxx] r289195 - Put C++ ABI headers in a special build directory instead of the top level.

2016-12-09 Thread Eric Fiselier via cfe-commits
Author: ericwf Date: Fri Dec 9 03:31:01 2016 New Revision: 289195 URL: http://llvm.org/viewvc/llvm-project?rev=289195&view=rev Log: Put C++ ABI headers in a special build directory instead of the top level. This patch changes where the C++ ABI headers are put during the build. Previously

[libcxx] r289197 - Refactor uses_allocator test types for upcoming fixes

2016-12-09 Thread Eric Fiselier via cfe-commits
Author: ericwf Date: Fri Dec 9 03:51:09 2016 New Revision: 289197 URL: http://llvm.org/viewvc/llvm-project?rev=289197&view=rev Log: Refactor uses_allocator test types for upcoming fixes Added: libcxx/trunk/test/support/controlled_allocators.hpp - copied, changed from r289195, libcxx/t

r289203 - [clang-format] calculate MaxInsertOffset in the original code correctly.

2016-12-09 Thread Eric Liu via cfe-commits
Author: ioeric Date: Fri Dec 9 05:45:50 2016 New Revision: 289203 URL: http://llvm.org/viewvc/llvm-project?rev=289203&view=rev Log: [clang-format] calculate MaxInsertOffset in the original code correctly. Reviewers: djasper Subscribers: klimek, cfe-commits Differential Revision: https://review

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

2016-12-09 Thread Richard Smith via Phabricator via cfe-commits
rsmith added a comment. Looks like we might only be making macros visible, and failing to emit the annot_module_import token for Sema. https://reviews.llvm.org/D26267 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi

[PATCH] D27597: [DebugInfo] Restore test case for long double constants.

2016-12-09 Thread David Gross via Phabricator via cfe-commits
dgross created this revision. dgross added reviewers: cfe-commits, probinson. https://reviews.llvm.org/D27549 (partial fix for PR26619) emits a constant value in the debug metadata for a floating-point static const that does not exceed 64 bits in size. Whether or not a long double exceeds 64 bit

[PATCH] D27599: [analyzer] Teach the analyzer that pointers can escape into __cxa_demangle

2016-12-09 Thread Anna Zaks via Phabricator via cfe-commits
zaks.anna created this revision. zaks.anna added a reviewer: dergachev.a. zaks.anna added subscribers: dcoughlin, cfe-commits. This fixes a reported false positive in the malloc checker. https://reviews.llvm.org/D27599 Files: lib/StaticAnalyzer/Core/CallEvent.cpp test/Analysis/Inputs/system

[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 created this revision. zaks.anna added a reviewer: dcoughlin. zaks.anna added subscribers: dergachev.a, cfe-commits. This is a big deal for ObjC, where nullability annotations are extensively used. I've also changed "Null" -> "null" and removed "is" as this is the pattern that Sema is

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

2016-12-09 Thread Peter Collingbourne via Phabricator via cfe-commits
pcc added inline comments. Comment at: clang/include/clang/AST/VTableBuilder.h:225 private: + std::vector VTableIndices; + rjmccall wrote: > Does this actually grow, or should you use a representation more like > VTableComponents? Or something custom that exp

[PATCH] D26882: Refactor how FunctionDecl handles constexpr:

2016-12-09 Thread Nathan Wilson via Phabricator via cfe-commits
nwilson updated this revision to Diff 80845. nwilson added a comment. - Initialize IsConstexprSpecified - Remove unnecessary parenthetical in comment - Fix non-portable test https://reviews.llvm.org/D26882 Files: include/clang/AST/Decl.h lib/Sema/SemaDecl.cpp lib/Sema/SemaDeclCXX.cpp li

[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 added inline comments. Comment at: lib/Lex/PPMacroExpansion.cpp:110-112 +// FIXME: shouldIgnoreMacro() in ASTWriter also stops at macros from the +// predefines buffer in module builds. Do we need to splice to those here +// too? rsmith wrote:

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

2016-12-09 Thread Peter Collingbourne via Phabricator via cfe-commits
pcc updated this revision to Diff 80844. pcc marked 6 inline comments as done. pcc added a comment. - Address review comments https://reviews.llvm.org/D22296 Files: clang/include/clang/AST/VTableBuilder.h clang/lib/AST/VTableBuilder.cpp clang/lib/CodeGen/CGCXX.cpp clang/lib/CodeGen/CGVT

[PATCH] D26882: Refactor how FunctionDecl handles constexpr:

2016-12-09 Thread Nathan Wilson via Phabricator via cfe-commits
nwilson added a comment. https://reviews.llvm.org/D26882 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[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 updated this revision to Diff 80849. thakis added a comment. update a comment https://reviews.llvm.org/D27545 Files: include/clang/Lex/Preprocessor.h lib/Lex/PPMacroExpansion.cpp lib/Serialization/ASTReader.cpp test/PCH/builtin-macro.c Index: test/PCH/builtin-macro.c ===

[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 added a comment. (The reason that the predefines buffer doesn't override the value of `__STDC_HOSTED__` from the pch is that CompilerInstance::createPCHExternalASTSource overrides the predefines buffer with a different predefines buffer suggested by the ASTReader, usually an empty one.)

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

2016-12-09 Thread Bruno Cardoso Lopes via Phabricator via cfe-commits
bruno created this revision. bruno added reviewers: rsmith, v.g.vassilev. bruno added subscribers: cfe-commits, mehdi_amini. One way to currently test the reproducers is to setup "FORCE_CLANG_DIAGNOSTICS_CRASH=1" before invoking clang. This simulates a crash and produces the same contents needed b

[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 created this revision. vsk added a reviewer: ahatanak. vsk added subscribers: kubabrecka, cfe-commits. On some Apple platforms, the ObjC BOOL type is defined as a signed char. When performing instrumentation for -fsanitize=bool, we'd like to treat the range of BOOL like it's always {0, 1}. Whi

[PATCH] D27597: [DebugInfo] Restore test case for long double constants.

2016-12-09 Thread David Gross via Phabricator via cfe-commits
dgross added a comment. I don't know exactly what the RUN syntax supported by lit is. What I've done here looks complex, but it does work for Linux. What about other platforms? Is there some better way of writing a test case where the checks to be done by FileCheck depend on some property of

[PATCH] D27606: [libcxx] Fix tuple construction/assignment from types derived from tuple/pair/array.

2016-12-09 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF created this revision. EricWF added reviewers: mclow.lists, K-ballo, mpark. EricWF added a subscriber: cfe-commits. The standard requires tuple have the following constructors: tuple(tuple const&); tuple(tuple &&); tuple(pair const&); tuple(pair &&); tuple(array const&); tuple(

[PATCH] D27606: [libcxx] Fix tuple construction/assignment from types derived from tuple/pair/array.

2016-12-09 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF updated this revision to Diff 80870. EricWF added a comment. Fix comments. https://reviews.llvm.org/D27606 Files: include/__tuple include/tuple include/type_traits test/std/utilities/tuple/tuple.tuple/tuple.assign/derived_from_tuple_like.pass.cpp test/std/utilities/tuple/tupl

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

2016-12-09 Thread Malcolm Parsons via Phabricator via cfe-commits
malcolm.parsons updated this revision to Diff 80869. malcolm.parsons added a comment. Use hasUnaryOperand. https://reviews.llvm.org/D26750 Files: clang-tidy/modernize/CMakeLists.txt clang-tidy/modernize/ModernizeTidyModule.cpp clang-tidy/modernize/UseDefaultMemberInitCheck.cpp clang-tid

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

2016-12-09 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF updated this revision to Diff 80873. EricWF added a comment. Fix copy paste errors in tests. https://reviews.llvm.org/D27612 Files: include/scoped_allocator test/std/utilities/allocator.adaptor/allocator.adaptor.members/construct_pair.pass.cpp test/std/utilities/allocator.adaptor

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

2016-12-09 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF created this revision. EricWF added a reviewer: mclow.lists. EricWF added subscribers: cfe-commits, Potatoswatter. For more information see: - https://llvm.org/bugs/show_bug.cgi?id=23841 - https://llvm.org/bugs/show_bug.cgi?id=24075 I hope you have as much fun reviewing as I did writing t

[PATCH] D26137: [clang-tidy] Add check name to YAML export

2016-12-09 Thread Alpha Abdoulaye via Phabricator via cfe-commits
Alpha updated this revision to Diff 80874. Alpha added a comment. Fix clang compilation warnings. These didn't appear when compiled on Windows. Tested on a Linux distribution, should be fixed. Repository: rL LLVM https://reviews.llvm.org/D26137 Files: include/clang/Tooling/Core/Diagnostic.

[PATCH] D27606: [libcxx] Fix tuple construction/assignment from types derived from tuple/pair/array.

2016-12-09 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF updated this revision to Diff 80862. EricWF added a comment. Cleanup a couple of issues. https://reviews.llvm.org/D27606 Files: include/__tuple include/tuple include/type_traits test/std/utilities/tuple/tuple.tuple/tuple.assign/derived_from_tuple_like.pass.cpp test/std/utilit

[PATCH] D27614: Mark tests as unsupported under libcpp-no-exceptions

2016-12-09 Thread Roger Ferrer Ibanez via Phabricator via cfe-commits
rogfer01 created this revision. rogfer01 added reviewers: EricWF, mclow.lists, rmaprath. rogfer01 added a subscriber: cfe-commits. The destructor of std::promise needs to construct a std::future_error exception so it calls std::make_exception_ptr. But under libcpp-no-exceptions this will trigger a

[PATCH] D27615: [clang-format] calculate MaxInsertOffset in the original code correctly.

2016-12-09 Thread Daniel Jasper via Phabricator via cfe-commits
djasper accepted this revision. djasper added a comment. This revision is now accepted and ready to land. Looks good. https://reviews.llvm.org/D27615 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listi

[PATCH] D27615: [clang-format] calculate MaxInsertOffset in the original code correctly.

2016-12-09 Thread Eric Liu via Phabricator via cfe-commits
ioeric created this revision. ioeric added a reviewer: djasper. ioeric added a subscriber: cfe-commits. Herald added a subscriber: klimek. https://reviews.llvm.org/D27615 Files: lib/Format/Format.cpp unittests/Format/CleanupTest.cpp Index: unittests/Format/CleanupTest.cpp ==

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

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. I'd much prefer we take this size reduction now and worry about the minor loss of ast dump fidelity later. Please delete the commented out code though :) https://reviews.llvm.org/D27279 __

[PATCH] D27211: [clang-format] Implement comment reflowing

2016-12-09 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir added inline comments. Comment at: lib/Format/Encoding.h:136 + } + while (Left + 1 < Right) { +assert(ComputeWidth(Left) <= Width && "binary search left invariant"); xazax.hun wrote: > Was just skimming through this patch. What is the reason to use

[PATCH] D27615: [clang-format] calculate MaxInsertOffset in the original code correctly.

2016-12-09 Thread Eric Liu via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL289203: [clang-format] calculate MaxInsertOffset in the original code correctly. (authored by ioeric). Changed prior to commit: https://reviews.llvm.org/D27615?vs=80878&id=80888#toc Repository: rL LL

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

2016-12-09 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman added inline comments. Comment at: lib/CodeGen/CGExpr.cpp:1224 + const LangOptions &LO) { + if (!LO.ObjC1 && !LO.ObjC2) +return false; LangOptions.ObjC1 should be always set if LangOptions.ObjC2 is set, so the second check is

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

2016-12-09 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF updated this revision to Diff 80890. EricWF added a comment. - Add tests for non-pair construct function. - Fix the value-category of allocator_arg_t being used. https://reviews.llvm.org/D27612 Files: include/__functional_base include/scoped_allocator test/std/utilities/allocator.

[libcxx] r289204 - Fix missing const on set::count. Patch from Andrey Khalyavin

2016-12-09 Thread Eric Fiselier via cfe-commits
Author: ericwf Date: Fri Dec 9 06:17:31 2016 New Revision: 289204 URL: http://llvm.org/viewvc/llvm-project?rev=289204&view=rev Log: Fix missing const on set::count. Patch from Andrey Khalyavin Modified: libcxx/trunk/include/set libcxx/trunk/test/std/containers/associative/set/count.pass.

[libcxx] r289205 - [NFC] Change whitespace to force docs rebuild

2016-12-09 Thread Eric Fiselier via cfe-commits
Author: ericwf Date: Fri Dec 9 06:32:02 2016 New Revision: 289205 URL: http://llvm.org/viewvc/llvm-project?rev=289205&view=rev Log: [NFC] Change whitespace to force docs rebuild Modified: libcxx/trunk/docs/UsingLibcxx.rst Modified: libcxx/trunk/docs/UsingLibcxx.rst URL: http://llvm.org/vie

[libcxx] r289206 - Update doc version to 4.0

2016-12-09 Thread Eric Fiselier via cfe-commits
Author: ericwf Date: Fri Dec 9 06:33:49 2016 New Revision: 289206 URL: http://llvm.org/viewvc/llvm-project?rev=289206&view=rev Log: Update doc version to 4.0 Modified: libcxx/trunk/docs/conf.py Modified: libcxx/trunk/docs/conf.py URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/docs/c

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

2016-12-09 Thread Vassil Vassilev via Phabricator via cfe-commits
v.g.vassilev added a comment. Thanks for working on this, Bruno! This would be a useful feature to us, too. I am wondering if there is clearer name than `-gen-reproducer`. IIUC, the goal is to extract all environment (system) dependent pieces, copying them to a folder where the compiler can be

[PATCH] D26137: [clang-tidy] Add check name to YAML export

2016-12-09 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh added a comment. Have you run the tests? I see a number of failures: $ ninja check-clang-tools ... Failing Tests (6): Clang Tools :: clang-apply-replacements/basic.cpp Clang Tools :: clang-apply-replacements/conflict.cpp Clang Tools :: clang-apply-replacements/crlf.

[PATCH] D27599: [analyzer] Teach the analyzer that pointers can escape into __cxa_demangle

2016-12-09 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added a comment. LGTM! This could be probably modeled as realloc, and/or we could look for leaks of its return value, if we wanted. https://reviews.llvm.org/D27599 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/c

r289213 - Document and publish the useful module-file-info flag.

2016-12-09 Thread Vassil Vassilev via cfe-commits
Author: vvassilev Date: Fri Dec 9 08:20:32 2016 New Revision: 289213 URL: http://llvm.org/viewvc/llvm-project?rev=289213&view=rev Log: Document and publish the useful module-file-info flag. Modified: cfe/trunk/include/clang/Driver/Options.td Modified: cfe/trunk/include/clang/Driver/Options.

[PATCH] D26843: Make sizeof expression context partially evaluated

2016-12-09 Thread Paulo Matos via Phabricator via cfe-commits
pmatos added a subscriber: eli.friedman. pmatos added a comment. OK, with a lot of help from @eli.friedman I have now a fix. Shall I reuse this review by submitting a new diff or open a new one? https://reviews.llvm.org/D26843 ___ cfe-commits maili

[PATCH] D26843: Make sizeof expression context partially evaluated

2016-12-09 Thread Eli Friedman via Phabricator via cfe-commits
efriedma added a comment. I would say make a new review thread since none of the discussion here is going to be helpful for understanding the new patch... but it really doesn't matter. https://reviews.llvm.org/D26843 ___ cfe-commits mailing list cf

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

2016-12-09 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl marked an inline comment as done. yaxunl added inline comments. Comment at: lib/CodeGen/CGExprScalar.cpp:1532 + return llvm::ConstantInt::get(ConvertType(DestTy), + CGF.getContext().getTargetNullPtrValue(E->getType())); assert(!DestTy->isBooleanType() &&

Re: r288866 - [c++17] P0135R1: Guaranteed copy elision.

2016-12-09 Thread Adrian Prantl via cfe-commits
> On Dec 8, 2016, at 7:31 PM, Duncan P. N. Exon Smith > wrote: > > >> On 2016-Dec-08, at 19:29, Richard Smith wrote: >> >> On 8 Dec 2016 7:17 pm, "Duncan P. N. Exon Smith via cfe-commits" >> wrote: >> +Eric, Marshall >> >> I haven't looked, but: from the test name, "copy.fail.cpp", I susp

[PATCH] D27453: [OpenCL] Enable unroll hint for OpenCL 1.x.

2016-12-09 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia accepted this revision. Anastasia added a comment. This revision is now accepted and ready to land. LGTM! Thanks! https://reviews.llvm.org/D27453 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman

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

2016-12-09 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl updated this revision to Diff 80902. yaxunl marked an inline comment as done. yaxunl added a comment. Revised by John's comments. Dropped constant folding of ptrtoint of non-zero null pointer. https://reviews.llvm.org/D26196 Files: include/clang/AST/APValue.h include/clang/AST/ASTCo

[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
rnk updated this revision to Diff 80903. rnk added a comment. - new wording https://reviews.llvm.org/D25216 Files: include/clang/Basic/DiagnosticSemaKinds.td include/clang/Sema/Sema.h lib/Sema/SemaDecl.cpp lib/Sema/SemaTemplate.cpp lib/Sema/TreeTransform.h test/CXX/basic/basic.looku

[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 &BR) const { + if (D->isReadOnly() || D->getSetterKind() != ObjCPropertyDecl::Copy) +return; It is pro

[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] 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 ___ cfe-

[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] 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, whic

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&view=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] 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&id=80910#toc Repository: rL LLVM https:

[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 http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[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 err_drv_invalid_m

[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: > > amaiora

[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 mean

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&view=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] 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

[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 rea

[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 http://lists.llvm.org/cgi-bin/mailman/listinfo/cf

[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 http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-com

[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 t

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&view=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

[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 http://lists.ll

[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. https://r

[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] 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 libcx

[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 &Result

[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 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 clang-tidy/readability/OneNamePerDeclarationCheck.

[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] 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 under

[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 ca

[PATCH] D27612: [libcxx] Fix PR24075, PR23841 - Add scoped_allocator_adaptor::construct(pair*, ...) 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 lis

[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 &Args, ArgStringList &CmdArgs, const JobAction &JA) { const Driver &D = TC.getDriver(); hans wrote: > Yes, this doesn't see

[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 clang-tidy/readability/OneNamePerDeclarationCheck.

[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] 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 &Args, ArgStringList &CmdArgs, const JobAction &JA) { const Driver &D = TC.getDriver(); ruiu wrote: > hans wrote: > > Yes,

[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 the

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&view=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 / rval

[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 `-fuse-ld=$BINDI

[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&id=80919#toc Repository: rL LLVM https://review

[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

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&view=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 pointer

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&view=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 cf

[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 &SM, + const LangOptions &LO) { Could you use

[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] 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 test/An

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&view=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] 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 ta

[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&id=80927#toc Repository: rL LLVM https:/

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&view=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

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&view=rev

[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&view=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 ma

[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 lib

[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"` in

[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 &SM,

[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

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.

  1   2   >