[PATCH] D25669: [Driver] Simplify ToolChain::GetCXXStdlibType (NFC)

2016-12-12 Thread Jonas Hahnfeld via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL289422: [Driver] Simplify ToolChain::GetCXXStdlibType (NFC) (authored by Hahnfeld). Changed prior to commit: https://reviews.llvm.org/D25669?vs=74948&id=81053#toc Repository: rL LLVM https://reviews

r289422 - [Driver] Simplify ToolChain::GetCXXStdlibType (NFC)

2016-12-12 Thread Jonas Hahnfeld via cfe-commits
Author: hahnfeld Date: Mon Dec 12 01:53:47 2016 New Revision: 289422 URL: http://llvm.org/viewvc/llvm-project?rev=289422&view=rev Log: [Driver] Simplify ToolChain::GetCXXStdlibType (NFC) I made the wrong assumption that execution would continue after an error Diag which led to unneeded complex co

[PATCH] D24933: Enable configuration files in clang

2016-12-12 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff updated this revision to Diff 81055. sepavloff marked 4 inline comments as done. sepavloff added a comment. Updated patch. - Directories which are searched for config files are now defined during project configuration process using special cmake options. - Driver do not warn on unused

[PATCH] D24933: Enable configuration files in clang

2016-12-12 Thread Hal Finkel via Phabricator via cfe-commits
hfinkel added inline comments. Comment at: lib/Driver/Driver.cpp:2695 + // Claim all arguments that come from configuration file, - driver must not + // warn about unused argument on them. Grammar here is a bit odd, how about: // Claim all arguments that c

[PATCH] D25686: [Driver] Improve support for Gentoo arm*-hardfloat-*-*eabi triples

2016-12-12 Thread Renato Golin via Phabricator via cfe-commits
rengolin added a comment. We already massage the triple in many cases, and what goes into IR is not always the same as what is used in Clang. Examples are x86_64's "x32" extension to the ABI, ARM -> Thumb triples, adding compulsory dashes and unknowns (ex. x86_64--linux-gnu), etc. You just hav

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

2016-12-12 Thread Malcolm Parsons via Phabricator via cfe-commits
malcolm.parsons added a comment. The fixit construction looks overly complicated. All you need to do is change a `,` to a `;` and insert a copy of the type: << FixItHint::CreateReplacement(CommaRange, ";") << FixItHint::CreateInsertionFromRange(VarLocation, TypeRange) and insert some whitesp

[PATCH] D26887: [Driver] Fix finding multilib gcc install on Gentoo (with gcc-config)

2016-12-12 Thread Renato Golin via Phabricator via cfe-commits
rengolin resigned from this revision. rengolin removed a reviewer: rengolin. rengolin added a comment. I don't know enough about x86_64's ABI to have a solid opinion. https://reviews.llvm.org/D26887 ___ cfe-commits mailing list cfe-commits@lists.llv

[PATCH] D27210: [clang-tidy] misc-string-compare. Adding a new check to clang-tidy

2016-12-12 Thread Malcolm Parsons via Phabricator via cfe-commits
malcolm.parsons added inline comments. Comment at: clang-tidy/misc/StringCompareCheck.cpp:25 + callee(cxxMethodDecl(hasName("compare"), + ofClass(classTemplateSpecializationDecl( + hasName("::std::basic_string"), --

[PATCH] D24933: Enable configuration files in clang

2016-12-12 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff updated this revision to Diff 81057. sepavloff added a comment. Fixed grammar in comment, thanks to Hal Finkel. https://reviews.llvm.org/D24933 Files: docs/UsersManual.rst include/clang/Basic/DiagnosticDriverKinds.td include/clang/Config/config.h.cmake include/clang/Driver/Dri

[PATCH] D23610: [ARM] Add pre-defined macros for ROPI, RWPI and FPIC

2016-12-12 Thread Renato Golin via Phabricator via cfe-commits
rengolin added a comment. Was this abandoned? Repository: rL LLVM https://reviews.llvm.org/D23610 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D16901: [Clang driver, ARM] Do not add +long-calls in PIC mode

2016-12-12 Thread Renato Golin via Phabricator via cfe-commits
rengolin added a comment. Was this abandoned? Repository: rL LLVM https://reviews.llvm.org/D16901 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D24083: [CMake] Fix libc++abi __aeabi_idiv() link error.

2016-12-12 Thread Renato Golin via Phabricator via cfe-commits
rengolin added a comment. Was this abandoned? Merged? https://reviews.llvm.org/D24083 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D24084: [CMake] Cleanup libunwind lookup code.

2016-12-12 Thread Renato Golin via Phabricator via cfe-commits
rengolin added a comment. So, we found this issue with the different unwinds between Clang and libunwind: https://llvm.org/bugs/show_bug.cgi?id=31035 Is this related? https://reviews.llvm.org/D24084 ___ cfe-commits mailing list cfe-commits@lists.l

[PATCH] D27576: [libcxx] libc++ changes necessary for the externally threaded libcxxabi variant

2016-12-12 Thread Asiri Rathnayake via Phabricator via cfe-commits
rmaprath added inline comments. Comment at: include/__threading_support:193 +// Execute once +int __libcpp_execute_once(__libcpp_exec_once_flag *flag, + void (*init_routine)(void)) { EricWF wrote: > These should have `inline`. In fact all

[PATCH] D27576: [libcxx] libc++ changes necessary for the externally threaded libcxxabi variant

2016-12-12 Thread Asiri Rathnayake via Phabricator via cfe-commits
rmaprath updated this revision to Diff 81059. https://reviews.llvm.org/D27576 Files: CMakeLists.txt include/__threading_support test/CMakeLists.txt test/libcxx/test/config.py test/lit.site.cfg.in Index: test/lit.site.cfg.in ==

[PATCH] D27473: Bring back note about not supporting global register variables

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

Re: [PATCH] D27210: [clang-tidy] misc-string-compare. Adding a new check to clang-tidy

2016-12-12 Thread Mads Ravn via cfe-commits
Hi Malcolm, I will look into fixing the two cases only. argumentCountIs(1) is sufficient to narrow the matching to only string compare with one argument. Best regards, Mads Ravn On Mon, Dec 12, 2016 at 10:38 AM Malcolm Parsons via Phabricator < revi...@reviews.llvm.org> wrote: > malcolm.parsons

[PATCH] D27575: [libcxxabi] Introduce an externally threaded libc++abi variant (take-2)

2016-12-12 Thread Asiri Rathnayake via Phabricator via cfe-commits
rmaprath added inline comments. Comment at: CMakeLists.txt:121 option(LIBCXXABI_HAS_PTHREAD_API "Ignore auto-detection and force use of pthread API" OFF) +option(LIBCXXABI_HAS_EXTERNAL_THREAD_API + "Build libc++abi with an externalized threading API. EricWF wr

[PATCH] D27575: [libcxxabi] Introduce an externally threaded libc++abi variant (take-2)

2016-12-12 Thread Asiri Rathnayake via Phabricator via cfe-commits
rmaprath updated this revision to Diff 81062. https://reviews.llvm.org/D27575 Files: CMakeLists.txt src/config.h src/cxa_exception.cpp src/cxa_exception_storage.cpp src/cxa_guard.cpp src/cxa_thread_atexit.cpp src/fallback_malloc.cpp src/threading_support.h test/CMakeLists.txt

[PATCH] D27575: [libcxxabi] Introduce an externally threaded libc++abi variant (take-2)

2016-12-12 Thread Asiri Rathnayake via Phabricator via cfe-commits
rmaprath added a comment. Patch updated with more context. https://reviews.llvm.org/D27575 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2016-12-12 Thread Asiri Rathnayake via Phabricator via cfe-commits
rmaprath added a comment. LGTM. Needs approval from @EricWF or @mclow.lists. https://reviews.llvm.org/D27614 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D27671: [OpenCL] Improve address space diagnostics.

2016-12-12 Thread Egor Churaev via Phabricator via cfe-commits
echuraev created this revision. echuraev added a reviewer: Anastasia. echuraev added subscribers: cfe-commits, yaxunl, bader. https://reviews.llvm.org/D27671 Files: include/clang/Basic/DiagnosticSemaKinds.td lib/Sema/SemaDecl.cpp test/SemaOpenCL/invalid-kernel.cl Index: test/SemaOpenCL/in

r289428 - clang-format: Separate out a language kind for ObjC.

2016-12-12 Thread Daniel Jasper via cfe-commits
Author: djasper Date: Mon Dec 12 06:42:29 2016 New Revision: 289428 URL: http://llvm.org/viewvc/llvm-project?rev=289428&view=rev Log: clang-format: Separate out a language kind for ObjC. While C(++) and ObjC are generally formatted the same way and can be mixed, people might want to choose differ

[PATCH] D27557: Update the default of the Mozilla coding style

2016-12-12 Thread Manuel Klimek via Phabricator via cfe-commits
klimek accepted this revision. klimek added a comment. This revision is now accepted and ready to land. lg https://reviews.llvm.org/D27557 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-com

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

2016-12-12 Thread Firat Kasmis via Phabricator via cfe-commits
firolino added a comment. In https://reviews.llvm.org/D27621#619649, @malcolm.parsons wrote: > The fixit construction looks overly complicated. > All you need to do is change a `,` to a `;` and insert a copy of the type: > > << FixItHint::CreateReplacement(CommaRange, ";") > << FixItHint::Cr

[PATCH] D27669: [clang-move] Use appendArgumentsAdjuster for adding extra arguments

2016-12-12 Thread Haojian Wu via Phabricator via cfe-commits
hokein accepted this revision. hokein added a comment. This revision is now accepted and ready to land. LGTM, Thanks! Comment at: clang-move/tool/ClangMoveMain.cpp:109 OptionsParser.getSourcePathList()); + // Add "-fparse-all-comments" compile

[PATCH] D27673: [clang-move] Only move used helper declarations.

2016-12-12 Thread Haojian Wu via Phabricator via cfe-commits
hokein created this revision. hokein added a reviewer: ioeric. hokein added a subscriber: cfe-commits. Herald added a subscriber: mgorny. Instead of moving all the helper declarations blindly, this patch implement an AST-based call graph solution to make clang-move only move used helper decls to n

[PATCH] D27674: [StaticAnalysis] Remove unnecessary parameter in CallGraphNode::addCallee.

2016-12-12 Thread Haojian Wu via Phabricator via cfe-commits
hokein created this revision. hokein added a reviewer: bkramer. hokein added subscribers: ioeric, cfe-commits. Remove the CallGraph in addCallee as it is not used in addCallee. It decouples addCallee from CallGraph, so that we can use CallGraphNode within our customized CallGraph. https://review

[PATCH] D27673: [clang-move] Only move used helper declarations.

2016-12-12 Thread Haojian Wu via Phabricator via cfe-commits
hokein updated this revision to Diff 81079. hokein added a comment. Fix code style. https://reviews.llvm.org/D27673 Files: clang-move/CMakeLists.txt clang-move/ClangMove.cpp clang-move/ClangMove.h clang-move/UsedHelperDeclFinder.cpp clang-move/UsedHelperDeclFinder.h test/clang-move/

r289431 - [StaticAnalysis] Remove unnecessary parameter in CallGraphNode::addCallee.

2016-12-12 Thread Haojian Wu via cfe-commits
Author: hokein Date: Mon Dec 12 08:12:10 2016 New Revision: 289431 URL: http://llvm.org/viewvc/llvm-project?rev=289431&view=rev Log: [StaticAnalysis] Remove unnecessary parameter in CallGraphNode::addCallee. Summary: Remove the CallGraph in addCallee as it is not used in addCallee. It decouples a

[PATCH] D27674: [StaticAnalysis] Remove unnecessary parameter in CallGraphNode::addCallee.

2016-12-12 Thread Haojian Wu via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL289431: [StaticAnalysis] Remove unnecessary parameter in CallGraphNode::addCallee. (authored by hokein). Changed prior to commit: https://reviews.llvm.org/D27674?vs=81078&id=81081#toc Repository: rL

r289433 - Use function_ref to avoid allocation in std::function. NFC.

2016-12-12 Thread Benjamin Kramer via cfe-commits
Author: d0k Date: Mon Dec 12 08:41:19 2016 New Revision: 289433 URL: http://llvm.org/viewvc/llvm-project?rev=289433&view=rev Log: Use function_ref to avoid allocation in std::function. NFC. Modified: cfe/trunk/include/clang/Sema/Sema.h cfe/trunk/lib/Sema/SemaChecking.cpp Modified: cfe/tr

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

2016-12-12 Thread Manuel Klimek via Phabricator via cfe-commits
klimek accepted this revision. klimek added a comment. This revision is now accepted and ready to land. LG. I also think it makes the code nicer by breaking out the right functions. Thanks! Comment at: tools/clang-format-vs/ClangFormat/ClangFormat.vsct:76 + +

[PATCH] D26887: [Driver] Fix finding multilib gcc install on Gentoo (with gcc-config)

2016-12-12 Thread Benjamin Kramer via Phabricator via cfe-commits
bkramer accepted this revision. bkramer added a comment. This revision is now accepted and ready to land. I believe this is fine. https://reviews.llvm.org/D26887 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/m

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

2016-12-12 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ updated this revision to Diff 81083. NoQ added a comment. - Fix crashes on checking properties in categories. - Address both comments. https://reviews.llvm.org/D27535 Files: include/clang/StaticAnalyzer/Checkers/Checkers.td lib/StaticAnalyzer/Checkers/CMakeLists.txt lib/StaticAnalyzer

r289436 - [Driver] Fix finding multilib gcc install on Gentoo (with gcc-config)

2016-12-12 Thread Michal Gorny via cfe-commits
Author: mgorny Date: Mon Dec 12 09:07:43 2016 New Revision: 289436 URL: http://llvm.org/viewvc/llvm-project?rev=289436&view=rev Log: [Driver] Fix finding multilib gcc install on Gentoo (with gcc-config) Fix the gcc-config code to support multilib gcc installs properly. This solves two problems: -

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

2016-12-12 Thread Firat Kasmis via Phabricator via cfe-commits
firolino added a comment. In https://reviews.llvm.org/D27621#619649, @malcolm.parsons wrote: > The fixit construction looks overly complicated. Yes, you were right. I have changed a couple of things. It looks better now. Still working on a better getUserWrittenType. https://reviews.llvm.org/

[PATCH] D26887: [Driver] Fix finding multilib gcc install on Gentoo (with gcc-config)

2016-12-12 Thread Michał Górny via Phabricator via cfe-commits
mgorny added a comment. Thanks for the review. Committed now. https://reviews.llvm.org/D26887 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D26887: [Driver] Fix finding multilib gcc install on Gentoo (with gcc-config)

2016-12-12 Thread Michał Górny via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL289436: [Driver] Fix finding multilib gcc install on Gentoo (with gcc-config) (authored by mgorny). Changed prior to commit: https://reviews.llvm.org/D26887?vs=78623&id=81086#toc Repository: rL LLVM

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

2016-12-12 Thread Antonio Maiorano via Phabricator via cfe-commits
amaiorano added inline comments. Comment at: tools/clang-format-vs/ClangFormat/ClangFormat.vsct:76 + + Clang Format Document + klimek wrote: > amaiorano wrote: > > klimek wrote: > > > hans wrote: > > > > amaiorano wrote: > > > > > hans wr

[PATCH] D25686: [Driver] Improve support for Gentoo arm*-hardfloat-*-*eabi triples

2016-12-12 Thread Michał Górny via Phabricator via cfe-commits
mgorny abandoned this revision. mgorny added a comment. I give up. I'm just going to complain to Gentoo ARM people a lot and maybe they'll fix their triples. https://reviews.llvm.org/D25686 ___ cfe-commits mailing list cfe-commits@lists.llvm.org ht

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

2016-12-12 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman added inline comments. Comment at: clang-tidy/readability/OneNamePerDeclarationCheck.cpp:133 +VariableLocation.setBegin(tidy::utils::lexer::findLocationAfterToken( +VariableLocation.getEnd(), Tokens, *Result.Context)); + } If you use `ArrayR

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

2016-12-12 Thread Firat Kasmis via Phabricator via cfe-commits
firolino marked 2 inline comments as done. firolino added inline comments. Comment at: clang-tidy/readability/OneNamePerDeclarationCheck.cpp:133 +VariableLocation.setBegin(tidy::utils::lexer::findLocationAfterToken( +VariableLocation.getEnd(), Tokens, *Result.Context)

[PATCH] D21698: [OpenCL] Allow disabling types and declarations associated with extensions

2016-12-12 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added inline comments. Comment at: include/clang/Basic/DiagnosticSemaKinds.td:8127 "invalid prototype, variadic arguments are not allowed in OpenCL">; +def err_requires_extension : Error< + "use of %select{declaration|type }0%1 requires %2 extension to be enabled">;

r289440 - [Driver] Attempt to fix new linux-ld tests on Windows

2016-12-12 Thread Michal Gorny via cfe-commits
Author: mgorny Date: Mon Dec 12 10:04:37 2016 New Revision: 289440 URL: http://llvm.org/viewvc/llvm-project?rev=289440&view=rev Log: [Driver] Attempt to fix new linux-ld tests on Windows (broken by r289436) Modified: cfe/trunk/test/Driver/linux-ld.c Modified: cfe/trunk/test/Driver/linux-ld.

[PATCH] D27671: [OpenCL] Improve address space diagnostics.

2016-12-12 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/D27671 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman

r289444 - [clang] Version support for UBSan handlers

2016-12-12 Thread Filipe Cabecinhas via cfe-commits
Author: filcab Date: Mon Dec 12 10:18:40 2016 New Revision: 289444 URL: http://llvm.org/viewvc/llvm-project?rev=289444&view=rev Log: [clang] Version support for UBSan handlers This adds a way for us to version any UBSan handler by itself. The patch overrides D21289 for a better implementation (we

[PATCH] D21695: [clang] Version support for UBSan handlers

2016-12-12 Thread Filipe Cabecinhas via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL289444: [clang] Version support for UBSan handlers (authored by filcab). Changed prior to commit: https://reviews.llvm.org/D21695?vs=61817&id=81089#toc Repository: rL LLVM https://reviews.llvm.org/D

[PATCH] D27569: [OpenCL] Enabling the usage of CLK_NULL_QUEUE as compare operand.

2016-12-12 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added inline comments. Comment at: lib/Sema/SemaExpr.cpp:9624 + if (getLangOpts().OpenCL && getLangOpts().OpenCLVersion >= 200) { +if (LHSIsNull && RHSType->isQueueT()) { getLangOpts().OpenCL is redundant because getLangOpts().OpenCLVersion is on

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

2016-12-12 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added a comment. > Because, notably, if you do that, then an attempt to pass &x as an int* will > fail, which means this isn't really C++ anymore... and yet that appears to be > exactly what you want. How about when generating alloca instruction, I insert addrspacecast to the default ad

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

2016-12-12 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak updated this revision to Diff 81090. ahatanak added a comment. Address review comments. - Arrays marked "flexible_array" are now treated as flexible arrays. - __builtin_object_size returns a more accurate numbers for normal C99 flexible arrays (see test/CodeGen/object-size.c). Note tha

r289446 - [Fix] Add missing include from r289444.

2016-12-12 Thread Filipe Cabecinhas via cfe-commits
Author: filcab Date: Mon Dec 12 10:43:40 2016 New Revision: 289446 URL: http://llvm.org/viewvc/llvm-project?rev=289446&view=rev Log: [Fix] Add missing include from r289444. Modified: cfe/trunk/lib/CodeGen/CGExpr.cpp Modified: cfe/trunk/lib/CodeGen/CGExpr.cpp URL: http://llvm.org/viewvc/llvm

[PATCH] D26167: [Clang-tidy] check for malloc, realloc and free calls

2016-12-12 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh requested changes to this revision. alexfh added inline comments. This revision now requires changes to proceed. Comment at: clang-tidy/cppcoreguidelines/NoMallocCheck.cpp:54 + +void NoMallocCheck::handleAquisition(const CallExpr *AquisitionCall) { + diag(AquisitionCall->

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

2016-12-12 Thread Reid Kleckner via Phabricator via cfe-commits
rnk added inline comments. Comment at: lib/Basic/SourceManager.cpp:1447 +void SourceManager::getChecksumMD5(FileID FID, std::string &Checksum) const { + bool Invalid; Let's move this whole thing to CGDebugInfo::getOrCreateFile. SourceManager isn't caching or

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

2016-12-12 Thread Devin Coughlin via Phabricator via cfe-commits
dcoughlin added a comment. In https://reviews.llvm.org/D26768#619222, @malcolm.parsons wrote: > In https://reviews.llvm.org/D26768#618651, @dcoughlin wrote: > > > The definite false positives were cases where the programmer seemed aware > > of the semantics of virtual calls during construction/d

[PATCH] D26846: __uuidof() and declspec(uuid("...")) should be allowed on enumeration types

2016-12-12 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. This looks good to me, I'll merge this today unless I hear otherwise. Repository: rL LLVM https://reviews.llvm.org/D26846 ___ cfe-commits mailing li

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

2016-12-12 Thread Firat Kasmis via Phabricator via cfe-commits
firolino updated this revision to Diff 81101. firolino marked an inline comment as done. firolino added a comment. Simplified fix-it hint generation. https://reviews.llvm.org/D27621 Files: clang-tidy/readability/CMakeLists.txt clang-tidy/readability/OneNamePerDeclarationCheck.cpp clang-ti

[PATCH] D27680: [CodeGen] Move lifetime.start of a variable when goto jumps back past its declaration

2016-12-12 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak added a subscriber: cfe-commits. ahatanak added a comment. Add cfe-commits. https://reviews.llvm.org/D27680 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D27555: [libcxx] [test] Fix MSVC warning C6001 "Using uninitialized memory".

2016-12-12 Thread Stephan T. Lavavej via Phabricator via cfe-commits
STL_MSFT added a comment. Hmm, would a pragma guarded by _MSC_VER be better? I can easily do that. I've tried to avoid cluttering the test with VC-specific pragmas, but I understand your concern about initializing too much memory. https://reviews.llvm.org/D27555

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

2016-12-12 Thread Malcolm Parsons via Phabricator via cfe-commits
malcolm.parsons added inline comments. Comment at: clang-tidy/readability/OneNamePerDeclarationCheck.cpp:86 + + Diag << FixItHint::CreateReplacement(CommaRange, ";") + << FixItHint::CreateReplacement(AfterCommaToVarNameRange, A `SourceLocation` can

[PATCH] D27270: [libcxx] [test] Fix MSVC x64 warning C4267 "conversion from 'size_t' to 'int' [or 'unsigned int'], possible loss of data", part 4/4.

2016-12-12 Thread Stephan T. Lavavej via Phabricator via cfe-commits
STL_MSFT added a comment. Yeah, users are free to do this, which also triggers conversion warnings for us. I think I'll need to investigate actually fixing/suppressing them in our sources and abandoning this patch; leaving it open for now as a todo. https://reviews.llvm.org/D27270 _

[PATCH] D26167: [Clang-tidy] check for malloc, realloc and free calls

2016-12-12 Thread Jonas Toth via Phabricator via cfe-commits
JonasToth marked 3 inline comments as done. JonasToth added a comment. removed the function calls, a little doc tidy as well Repository: rL LLVM https://reviews.llvm.org/D26167 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.

[PATCH] D26167: [Clang-tidy] check for malloc, realloc and free calls

2016-12-12 Thread Jonas Toth via Phabricator via cfe-commits
JonasToth updated this revision to Diff 81103. JonasToth added a comment. fixes last review comments from alex Repository: rL LLVM https://reviews.llvm.org/D26167 Files: clang-tidy/cppcoreguidelines/CMakeLists.txt clang-tidy/cppcoreguidelines/CppCoreGuidelinesTidyModule.cpp clang-tidy/

r289450 - Fix format and a few typos in comments.

2016-12-12 Thread Samuel Antao via cfe-commits
Author: sfantao Date: Mon Dec 12 12:00:20 2016 New Revision: 289450 URL: http://llvm.org/viewvc/llvm-project?rev=289450&view=rev Log: Fix format and a few typos in comments. Modified: cfe/trunk/include/clang-c/Index.h cfe/trunk/lib/CodeGen/CGOpenMPRuntime.cpp cfe/trunk/lib/Sema/SemaOp

[PATCH] D27555: [libcxx] [test] Fix MSVC warning C6001 "Using uninitialized memory".

2016-12-12 Thread Stephan T. Lavavej via Phabricator via cfe-commits
STL_MSFT added a comment. Actually, the compiler bug was resolved as fixed earlier today. Verifying... https://reviews.llvm.org/D27555 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commit

[PATCH] D21695: [clang] Version support for UBSan handlers

2016-12-12 Thread Andrew Ford via Phabricator via cfe-commits
andrewford added a comment. This broke the build on android due to use of std::to_string. Would someone mind changing it to llvm::to_string, I don't have commit access to change it myself. Thanks! Repository: rL LLVM https://reviews.llvm.org/D21695 ___

Re: r289285 - Fix unused variable warnings. NFCI.

2016-12-12 Thread David Blaikie via cfe-commits
On Fri, Dec 9, 2016 at 2:55 PM Simon Pilgrim via cfe-commits < cfe-commits@lists.llvm.org> wrote: > Author: rksimon > Date: Fri Dec 9 16:45:21 2016 > New Revision: 289285 > > URL: http://llvm.org/viewvc/llvm-project?rev=289285&view=rev > Log: > Fix unused variable warnings. NFCI. > > Modified: >

[PATCH] D27669: [clang-move] Use appendArgumentsAdjuster for adding extra arguments

2016-12-12 Thread Alexander Shaposhnikov via Phabricator via cfe-commits
alexshap added inline comments. Comment at: clang-move/tool/ClangMoveMain.cpp:109 OptionsParser.getSourcePathList()); + // Add "-fparse-all-comments" compile option to make clang parse all comments + Tool.appendArgumentsAdjuster(tooling::getInse

r289452 - Avoid use of std::to_string. NFC.

2016-12-12 Thread Vedant Kumar via cfe-commits
Author: vedantk Date: Mon Dec 12 12:47:33 2016 New Revision: 289452 URL: http://llvm.org/viewvc/llvm-project?rev=289452&view=rev Log: Avoid use of std::to_string. NFC. Apparently this routine isn't available on some Android platforms. See the mailing list thread re: D21695. Modified: cfe/tru

Re: [PATCH] D21695: [clang] Version support for UBSan handlers

2016-12-12 Thread Vedant Kumar via cfe-commits
> On Dec 12, 2016, at 10:17 AM, Andrew Ford via Phabricator > wrote: > > andrewford added a comment. > > This broke the build on android due to use of std::to_string. Would someone > mind changing it to llvm::to_string, I don't have commit access to change it > myself. Thanks! Should be don

Re: [PATCH] D21695: [clang] Version support for UBSan handlers

2016-12-12 Thread Filipe Cabecinhas via cfe-commits
Thanks Vedant! Andrew: does Android not support C++11? I don't understand why it wouldn't have these funcions. Thank you, Filipe On Mon, 12 Dec 2016 at 18:58, Vedant Kumar wrote: > > > > On Dec 12, 2016, at 10:17 AM, Andrew Ford via Phabricator < > revi...@reviews.llvm.org> wrote: > > > > > >

[PATCH] D24933: Enable configuration files in clang

2016-12-12 Thread Bruno Cardoso Lopes via Phabricator via cfe-commits
bruno added inline comments. Comment at: include/clang/Driver/Driver.h:287 + const std::string &getConfigFile() const { return ConfigFile; } + void setConfigFile(StringRef x, unsigned N) { +ConfigFile = x; x -> FileName Comment at: lib/Dr

[PATCH] D27473: Bring back note about not supporting global register variables

2016-12-12 Thread Michael Kuperstein via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL289455: Bring back note about not supporting global register variables. (authored by mkuper). Changed prior to commit: https://reviews.llvm.org/D27473?vs=80450&id=81113#toc Repository: rL LLVM https

r289455 - Bring back note about not supporting global register variables.

2016-12-12 Thread Michael Kuperstein via cfe-commits
Author: mkuper Date: Mon Dec 12 13:11:39 2016 New Revision: 289455 URL: http://llvm.org/viewvc/llvm-project?rev=289455&view=rev Log: Bring back note about not supporting global register variables. This was accidentally removed in r260506, even though we only support non-allocatable global registe

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

2016-12-12 Thread David Blaikie via cfe-commits
While it's possible to do arbitrary script things - we prefer nto to to ensure the tests are portable. (we have some custom implementations of common unix utilities for portability of those). In this case, can you xfail this on platforms that don't have the feature you want? rather than trying to

[PATCH] D27284: [ClangTidy] Add new performance-type-promotion-in-math-fn check.

2016-12-12 Thread Justin Lebar via Phabricator via cfe-commits
jlebar added a comment. @alexfh , friendly ping. I'm not in a huge rush on this or anything, but I don't want one or both of us to lose all context here... https://reviews.llvm.org/D27284 ___ cfe-commits mailing list cfe-commits@lists.llvm.org htt

r289458 - Fix typo and remove unnecessary statement.

2016-12-12 Thread Samuel Antao via cfe-commits
Author: sfantao Date: Mon Dec 12 13:26:31 2016 New Revision: 289458 URL: http://llvm.org/viewvc/llvm-project?rev=289458&view=rev Log: Fix typo and remove unnecessary statement. Modified: cfe/trunk/lib/CodeGen/CGOpenMPRuntime.cpp Modified: cfe/trunk/lib/CodeGen/CGOpenMPRuntime.cpp URL: http:

r289459 - [Frontend] Use vfs for directory iteration while searching PCHs. NFCI

2016-12-12 Thread Bruno Cardoso Lopes via cfe-commits
Author: bruno Date: Mon Dec 12 13:28:21 2016 New Revision: 289459 URL: http://llvm.org/viewvc/llvm-project?rev=289459&view=rev Log: [Frontend] Use vfs for directory iteration while searching PCHs. NFCI Use the vfs lookup instead of real filesytem and handle the case where -include-pch is a direct

r289460 - [CrashReproducer] Collect PCH included via -include-pch

2016-12-12 Thread Bruno Cardoso Lopes via cfe-commits
Author: bruno Date: Mon Dec 12 13:28:25 2016 New Revision: 289460 URL: http://llvm.org/viewvc/llvm-project?rev=289460&view=rev Log: [CrashReproducer] Collect PCH included via -include-pch Collect the necessary input PCH files. Do not try to validate the AST before copying it out because if the c

[PATCH] D27520: [clang-tidy] Add check for redundant function pointer dereferences

2016-12-12 Thread Haojian Wu via Phabricator via cfe-commits
hokein accepted this revision. hokein added a comment. This revision is now accepted and ready to land. Nice, the patch looks good to me. Comment at: docs/clang-tidy/checks/readability-redundant-function-ptr-dereference.rst:25 + int i = (*p)(10, 50); + Nit: a

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

2016-12-12 Thread Vedant Kumar via cfe-commits
Thanks for double-checking this. I realized that there's a problem with my patch: skipping the encoding step when using Python 3 could cause problems when we use difflib.SequenceMatcher. I don't know how to fix this, since the strings in vim.current.buffer appear to be 'raw'. They are not encoded

[libcxx] r289463 - [libcxx] [test] Change ifstream constructor tests to handle read-only files.

2016-12-12 Thread Stephan T. Lavavej via cfe-commits
Author: stl_msft Date: Mon Dec 12 13:50:22 2016 New Revision: 289463 URL: http://llvm.org/viewvc/llvm-project?rev=289463&view=rev Log: [libcxx] [test] Change ifstream constructor tests to handle read-only files. Certain source control systems like to set the read-only bit on their files, which in

[libcxx] r289462 - [libcxx] [test] Fix an improper assumption about Null Forward Iterators.

2016-12-12 Thread Stephan T. Lavavej via cfe-commits
Author: stl_msft Date: Mon Dec 12 13:50:14 2016 New Revision: 289462 URL: http://llvm.org/viewvc/llvm-project?rev=289462&view=rev Log: [libcxx] [test] Fix an improper assumption about Null Forward Iterators. Value-initialized iterators still can't be compared to those with parents. Fixes D26626.

[clang-tools-extra] r289464 - [clang-move] Use appendArgumentsAdjuster for adding extra arguments

2016-12-12 Thread Alexander Shaposhnikov via cfe-commits
Author: alexshap Date: Mon Dec 12 13:56:37 2016 New Revision: 289464 URL: http://llvm.org/viewvc/llvm-project?rev=289464&view=rev Log: [clang-move] Use appendArgumentsAdjuster for adding extra arguments 1. Remove some boilerplate code for appending -fparse-all-comments to the list of arguments.

[PATCH] D27669: [clang-move] Use appendArgumentsAdjuster for adding extra arguments

2016-12-12 Thread Alexander Shaposhnikov via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL289464: [clang-move] Use appendArgumentsAdjuster for adding extra arguments (authored by alexshap). Changed prior to commit: https://reviews.llvm.org/D27669?vs=81052&id=81124#toc Repository: rL LLVM

[PATCH] D27424: Add the diagnose_if attribute to clang.

2016-12-12 Thread George Burgess IV via Phabricator via cfe-commits
george.burgess.iv added a comment. Glad you like it! > The second thing that would be amazing if this attribute was late parsed so > it the ability to reference this when applied to member functions That seems like a good idea; I'll look into what that would take. (In the meantime, reviews wou

[clang-tools-extra] r289465 - [clang-move] Fix buildbot failures

2016-12-12 Thread Alexander Shaposhnikov via cfe-commits
Author: alexshap Date: Mon Dec 12 14:24:44 2016 New Revision: 289465 URL: http://llvm.org/viewvc/llvm-project?rev=289465&view=rev Log: [clang-move] Fix buildbot failures Fix the buildbot failures introduced by D27669 Modified: clang-tools-extra/trunk/clang-move/tool/ClangMoveMain.cpp Modifi

[PATCH] D27555: [libcxx] [test] Fix MSVC warning C6001 "Using uninitialized memory".

2016-12-12 Thread Stephan T. Lavavej via Phabricator via cfe-commits
STL_MSFT abandoned this revision. STL_MSFT added a comment. Verified compiler fix. Abandoning this patch - nothing has been committed. https://reviews.llvm.org/D27555 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-

[PATCH] D26623: [libcxx] [test] Swapping non-equal non-POCS allocators is UB.

2016-12-12 Thread Stephan T. Lavavej via Phabricator via cfe-commits
STL_MSFT abandoned this revision. STL_MSFT added a comment. r289358 fixes everything for me, thanks! Abandoning this revision. https://reviews.llvm.org/D26623 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mail

[PATCH] D22057: Prevent devirtualization of calls to un-instantiated functions.

2016-12-12 Thread Sunil Srivastava via Phabricator via cfe-commits
Sunil_Srivastava added a comment. A friendly ping. https://reviews.llvm.org/D22057 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2016-12-12 Thread David Gross via cfe-commits
I looked at what's supported by "requires", and couldn't find anything appropriate. The problem is that I want the test to be sensitive to the size of long double -- either no greater than 64 bits, or greater than 64 bits. It does not seem practical to list all platforms (so I suspect your "xfail

[PATCH] D27546: [ASTReader] Sort RawComments before merging

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

[PATCH] D27680: [CodeGen] Move lifetime.start of a variable when goto jumps back past its declaration

2016-12-12 Thread David Majnemer via Phabricator via cfe-commits
majnemer added inline comments. Comment at: lib/CodeGen/CodeGenFunction.h:619 +bool hasLabel(const LabelDecl *LD) const { + return std::find(Labels.begin(), Labels.end(), LD) != Labels.end(); +} This can be written as `llvm::is_contained(Labels, LD);

[PATCH] D27383: Add a new clang-format style option ObjCBlockResetsIndent.

2016-12-12 Thread Sean Lu via Phabricator via cfe-commits
yixiang added a comment. Ping. For the additional requirements of adding a style options: - be used in a project of significant size (have dozens of contributors) - Yes, it's been used by almost all the iOS projects inside Google, including Google Maps. - have a publicly accessible style guid

[PATCH] D21698: [OpenCL] Allow disabling types and declarations associated with extensions

2016-12-12 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl updated this revision to Diff 81142. yaxunl marked 9 inline comments as done. yaxunl added a comment. Revised by Anastasia's comments. https://reviews.llvm.org/D21698 Files: include/clang/Basic/DiagnosticParseKinds.td include/clang/Basic/DiagnosticSemaKinds.td include/clang/Basic/O

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

2016-12-12 Thread David Blaikie via cfe-commits
On Mon, Dec 12, 2016 at 1:11 PM David Gross wrote: > I looked at what's supported by "requires", and couldn't find anything > appropriate. > > The problem is that I want the test to be sensitive to the size of long > double -- either no greater than 64 bits, or greater than 64 bits. It does > no

[PATCH] D27068: Improve string::find

2016-12-12 Thread Aditya Kumar via Phabricator via cfe-commits
hiraditya added a comment. Ping https://reviews.llvm.org/D27068 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

r289478 - [Modules] Make header inclusion order from umbrella dirs deterministic

2016-12-12 Thread Bruno Cardoso Lopes via cfe-commits
Author: bruno Date: Mon Dec 12 16:41:20 2016 New Revision: 289478 URL: http://llvm.org/viewvc/llvm-project?rev=289478&view=rev Log: [Modules] Make header inclusion order from umbrella dirs deterministic Sort the headers by name before adding the includes in collectModuleHeaderIncludes. This makes

[PATCH] D27689: Module: hash the pcm content and use it as SIGNATURE for implicit modules.

2016-12-12 Thread Manman Ren via Phabricator via cfe-commits
manmanren created this revision. manmanren added reviewers: rsmith, benlangmuir, aprantl. manmanren added subscribers: bruno, cfe-commits, dexonsmith. We change ASTFileSignature from a random 32-bit number to the actual SHA hash of the pcm content. 1> Definition of ASTFileSignature is moved to B

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

2016-12-12 Thread Firat Kasmis via Phabricator via cfe-commits
firolino marked an inline comment as done. firolino added inline comments. Comment at: clang-tidy/readability/OneNamePerDeclarationCheck.cpp:87 + Diag << FixItHint::CreateReplacement(CommaRange, ";") + << FixItHint::CreateReplacement(AfterCommaToVarNameRange, +

  1   2   >