[libcxx] r305373 - Mark `__is_inplace_*` tests as UNSUPPORTED in <= C++14.

2017-06-14 Thread Michael Park via cfe-commits
Author: mpark Date: Wed Jun 14 02:12:55 2017 New Revision: 305373 URL: http://llvm.org/viewvc/llvm-project?rev=305373&view=rev Log: Mark `__is_inplace_*` tests as UNSUPPORTED in <= C++14. Modified: libcxx/trunk/test/libcxx/utilities/utility/__is_inplace_index.pass.cpp libcxx/trunk/test/li

[PATCH] D32480: clang-format: Add CompactNamespaces option

2017-06-14 Thread Manuel Klimek via Phabricator via cfe-commits
klimek added a comment. Generally LG from my side. Comment at: unittests/Format/FormatTest.cpp:1363-1381 + EXPECT_EQ("namespace {\n" + "namespace {\n" +"}} // namespace aaa

[PATCH] D34194: [coroutines] Allow co_await and co_yield expressions that return an lvalue to compile

2017-06-14 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF updated this revision to Diff 102494. https://reviews.llvm.org/D34194 Files: lib/AST/ExprClassification.cpp lib/CodeGen/CGCoroutine.cpp lib/CodeGen/CGExpr.cpp lib/CodeGen/CodeGenFunction.h test/CodeGenCoroutines/coro-await.cpp Index: test/CodeGenCoroutines/coro-await.cpp ===

[PATCH] D34182: [analyzer] Performance optimizations for the CloneChecker

2017-06-14 Thread Vassil Vassilev via Phabricator via cfe-commits
v.g.vassilev added inline comments. Comment at: include/clang/Analysis/CloneDetection.h:263 +public: + void constrain(std::vector &Sequences); +}; Could we typedef `std::vector` into `CloneDetector::CloneGroups`? https://reviews.llvm.org/D34182 ___

[PATCH] D34182: [analyzer] Performance optimizations for the CloneChecker

2017-06-14 Thread Raphael Isemann via Phabricator via cfe-commits
teemperor added inline comments. Comment at: include/clang/Analysis/CloneDetection.h:263 +public: + void constrain(std::vector &Sequences); +}; v.g.vassilev wrote: > Could we typedef `std::vector` into > `CloneDetector::CloneGroups`? Yes, I'll do this in anothe

[PATCH] D34175: [driver][macOS] Pick the system version for the deployment target if the SDK is newer than the system

2017-06-14 Thread Hiroshi Inoue via Phabricator via cfe-commits
inouehrs added inline comments. Comment at: lib/Driver/ToolChains/Darwin.cpp:1133 + HadExtra) || + HadExtra || Major != 10 || Minor >= 100 || Micro >= 100) +return MacOSSDKVersion; What these magic numbers mean (especially

[PATCH] D33644: Add default values for function parameter chunks

2017-06-14 Thread Ivan Donchevskii via Phabricator via cfe-commits
yvvan added a comment. Anyone? :) https://reviews.llvm.org/D33644 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D32942: [clang-tidy] readability-function-size: add NestingThreshold param.

2017-06-14 Thread Malcolm Parsons via Phabricator via cfe-commits
malcolm.parsons added a comment. In https://reviews.llvm.org/D32942#779143, @lebedev.ri wrote: > In https://reviews.llvm.org/D32942#778729, @malcolm.parsons wrote: > > > In https://reviews.llvm.org/D32942#777001, @lebedev.ri wrote: > > > > > Which makes sense, since in AST, they are nested: > > >

[PATCH] D32341: Fix a bug that warnings generated with -M or -MM flags

2017-06-14 Thread Raphael Isemann via Phabricator via cfe-commits
teemperor accepted this revision. teemperor added a comment. This revision is now accepted and ready to land. LGTM, good job! (Sorry for the delay, I think I got interrupted here by the GSoC start...) https://reviews.llvm.org/D32341 ___ cfe-commits

[PATCH] D33989: [OpenCL] Allow targets to select address space per type

2017-06-14 Thread Alexey Bader via Phabricator via cfe-commits
bader added inline comments. Comment at: include/clang/Basic/TargetInfo.h:1041 +default: + return LangAS::Default; +} yaxunl wrote: > I think the default (including even_t, clk_event_t, queue_t, reserved_id_t) > should be global since these opaque O

[PATCH] D32646: Fix a bug that -Wmissing-braces fires on system headers

2017-06-14 Thread Raphael Isemann via Phabricator via cfe-commits
teemperor added a comment. Everything beside this last test case seems to be handled. And from what I remember there was a longer discussion how to properly handle this case and so this review got stuck. Can we add this last test case with a FIXME and then get this merged? https://reviews.llv

[PATCH] D32942: [clang-tidy] readability-function-size: add NestingThreshold param.

2017-06-14 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added a comment. In https://reviews.llvm.org/D32942#780053, @malcolm.parsons wrote: > In https://reviews.llvm.org/D32942#779143, @lebedev.ri wrote: > > > In https://reviews.llvm.org/D32942#778729, @malcolm.parsons wrote: > > > > > In https://reviews.llvm.org/D32942#777001, @lebedev.ri

[clang-tools-extra] r305376 - [clangd] Add a filename parameter to FileSystemProvider.

2017-06-14 Thread Ilya Biryukov via cfe-commits
Author: ibiryukov Date: Wed Jun 14 04:46:44 2017 New Revision: 305376 URL: http://llvm.org/viewvc/llvm-project?rev=305376&view=rev Log: [clangd] Add a filename parameter to FileSystemProvider. Reviewers: krasimir Reviewed By: krasimir Subscribers: klimek, cfe-commits Tags: #clang-tools-extra

[PATCH] D34151: [clangd] Add a filename parameter to FileSystemProvider.

2017-06-14 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL305376: [clangd] Add a filename parameter to FileSystemProvider. (authored by ibiryukov). Changed prior to commit: https://reviews.llvm.org/D34151?vs=102347&id=102508#toc Repository: rL LLVM https:/

[PATCH] D34137: [clangd] Add priority to completion item sort text

2017-06-14 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added inline comments. Comment at: clangd/ClangdUnit.cpp:156 assert(CCS->getTypedText()); +CCS->getPriority(); Item.kind = getKind(Result.CursorKind); This is a no-op, commited incidentally? Comment at: c

r305377 - Fix for Itanium mangler issue with templates

2017-06-14 Thread Dmitry Polukhin via cfe-commits
Author: dpolukhin Date: Wed Jun 14 04:47:47 2017 New Revision: 305377 URL: http://llvm.org/viewvc/llvm-project?rev=305377&view=rev Log: Fix for Itanium mangler issue with templates Patch by Serge Preis Differential Revision: https://reviews.llvm.org/D32428 Modified: cfe/trunk/lib/AST/Itaniu

[PATCH] D32428: Fix for Itanium mangler issue with templates (bug: 31405)

2017-06-14 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL305377: Fix for Itanium mangler issue with templates (authored by dpolukhin). Changed prior to commit: https://reviews.llvm.org/D32428?vs=96380&id=102509#toc Repository: rL LLVM https://reviews.llvm

[PATCH] D32942: [clang-tidy] readability-function-size: add NestingThreshold param.

2017-06-14 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added a comment. Hm, oh, maybe this is as simple as a partially-unintentional `switch` fallthrough Repository: rL LLVM https://reviews.llvm.org/D32942 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-b

r305379 - Function with unparsed body is a definition

2017-06-14 Thread Serge Pavlov via cfe-commits
Author: sepavloff Date: Wed Jun 14 05:07:02 2017 New Revision: 305379 URL: http://llvm.org/viewvc/llvm-project?rev=305379&view=rev Log: Function with unparsed body is a definition While a function body is being parsed, the function declaration is not considered as a definition because it does no

[PATCH] D30375: Function with unparsed body is a definition

2017-06-14 Thread Serge Pavlov via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL305379: Function with unparsed body is a definition (authored by sepavloff). Changed prior to commit: https://reviews.llvm.org/D30375?vs=101993&id=102512#toc Repository: rL LLVM https://reviews.llvm

[PATCH] D30375: Function with unparsed body is a definition

2017-06-14 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff added a comment. Thank you! Committed as is, improvements will be made as separate patches. Repository: rL LLVM https://reviews.llvm.org/D30375 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailma

[PATCH] D34198: Fix __has_trivial_destructor crash when the type is incomplete with unknown array bounds.

2017-06-14 Thread Puneetha K via Phabricator via cfe-commits
puneetha updated this revision to Diff 102516. puneetha added a comment. Incorrectly rejecting __is_destructible queries on arrays of unknown bound of incomplete types. https://reviews.llvm.org/D34198 Files: lib/Sema/SemaExprCXX.cpp Index: lib/Sema/SemaExprCXX.cpp =

[PATCH] D30946: [ScopePrinting] Added support to print full scopes of types and declarations.

2017-06-14 Thread Simon Schroeder via Phabricator via cfe-commits
schroedersi added a comment. Would it help the acceptance of the patch if I add a fourth option `LegacySuppressScope` (or similar) that emulates the current/pre-patch `SuppressScope==true`? This way the patched type printing would be a real superset of the current/non-patched type printing (exc

r305381 - Reverted 305379 (Function with unparsed body is a definition)

2017-06-14 Thread Serge Pavlov via cfe-commits
Author: sepavloff Date: Wed Jun 14 05:57:56 2017 New Revision: 305381 URL: http://llvm.org/viewvc/llvm-project?rev=305381&view=rev Log: Reverted 305379 (Function with unparsed body is a definition) It broke clang-x86_64-linux-selfhost-modules-2 and some other buildbots. Modified: cfe/trunk/

[PATCH] D34137: [clangd] Add priority to completion item sort text

2017-06-14 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir updated this revision to Diff 102522. krasimir added a comment. - Address review comments https://reviews.llvm.org/D34137 Files: clangd/ClangdUnit.cpp test/clangd/authority-less-uri.test test/clangd/completion.test Index: test/clangd/completion.test =

[PATCH] D32480: clang-format: Add CompactNamespaces option

2017-06-14 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. Yeah, looks good. Krasimir, any further concerns? https://reviews.llvm.org/D32480 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http

[PATCH] D32480: clang-format: Add CompactNamespaces option

2017-06-14 Thread Francois Ferrand via Phabricator via cfe-commits
Typz updated this revision to Diff 102525. Typz added a comment. Make tests more readable https://reviews.llvm.org/D32480 Files: include/clang/Format/Format.h lib/Format/Format.cpp lib/Format/NamespaceEndCommentsFixer.cpp lib/Format/UnwrappedLineFormatter.cpp lib/Format/UnwrappedLineP

[PATCH] D32480: clang-format: Add CompactNamespaces option

2017-06-14 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir added a comment. Looks good, except for the tests that actually add or fix namespace end comments should be moved to NamespaceEndCommentsFixerTest.cpp. https://reviews.llvm.org/D32480 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D32480: clang-format: Add CompactNamespaces option

2017-06-14 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir added inline comments. Comment at: unittests/Format/FormatTest.cpp:1394 + "int j;\n" + "}\n" + "}", Re-indent this line. https://reviews.llvm.org/D32480 ___

[PATCH] D33644: Add default values for function parameter chunks

2017-06-14 Thread Manuel Klimek via Phabricator via cfe-commits
klimek added a comment. Can you give a bit more background what this is trying to do? https://reviews.llvm.org/D33644 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D34202: [clang-tidy] readability-function-size: fix nesting level calculation

2017-06-14 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri created this revision. lebedev.ri added a project: clang-tools-extra. A followup for https://reviews.llvm.org/D32942. Malcolm Parsons has provided a valid testcase that the initial version of the check complained about nested `if`'s. As it turns out, the culprit is the **partially** u

[PATCH] D27753: [analyzer] alpha.security.DirtyScalar Checker

2017-06-14 Thread Zoltán Gera via Phabricator via cfe-commits
gerazo added a comment. Before abandoning this patch and rewriting it, I would like to get a thumbs up for my plans: I will reimplement all functionality included here but without creating a new checker. Some parts which relate to specific checkers will be put into the corresponding checkers (l

[PATCH] D32480: clang-format: Add CompactNamespaces option

2017-06-14 Thread Francois Ferrand via Phabricator via cfe-commits
Typz updated this revision to Diff 102528. Typz marked an inline comment as done. Typz added a comment. Move tests that add or fix namespace end comments to NamespaceEndCommentsFixerTest.cpp https://reviews.llvm.org/D32480 Files: include/clang/Format/Format.h lib/Format/Format.cpp lib/Fo

[PATCH] D34202: [clang-tidy] readability-function-size: fix nesting level calculation

2017-06-14 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri planned changes to this revision. lebedev.ri added a comment. Hmm, this is moving in the right direction, but now it invalidated (decreases the nesting level) too eagerly Repository: rL LLVM https://reviews.llvm.org/D34202 ___ cfe-com

r305384 - clang-format: Add CompactNamespaces option

2017-06-14 Thread Francois Ferrand via cfe-commits
Author: typz Date: Wed Jun 14 07:29:47 2017 New Revision: 305384 URL: http://llvm.org/viewvc/llvm-project?rev=305384&view=rev Log: clang-format: Add CompactNamespaces option Summary: Add CompactNamespaces option, to pack namespace declarations on the same line (somewhat similar to C++17 nested na

[PATCH] D32480: clang-format: Add CompactNamespaces option

2017-06-14 Thread Francois Ferrand via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL305384: clang-format: Add CompactNamespaces option (authored by Typz). Changed prior to commit: https://reviews.llvm.org/D32480?vs=102528&id=102531#toc Repository: rL LLVM https://reviews.llvm.org/D

r305385 - Corrected some comment typos; NFC.

2017-06-14 Thread Aaron Ballman via cfe-commits
Author: aaronballman Date: Wed Jun 14 07:48:18 2017 New Revision: 305385 URL: http://llvm.org/viewvc/llvm-project?rev=305385&view=rev Log: Corrected some comment typos; NFC. Modified: cfe/trunk/include/clang/Frontend/FrontendOptions.h Modified: cfe/trunk/include/clang/Frontend/FrontendOption

[PATCH] D34201: [clangd] Move dependencies of ClangdLSPServer out of its implementation

2017-06-14 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added inline comments. Comment at: clangd/ClangdLSPServer.h:26 /// dispatch and ClangdServer together. -class ClangdLSPServer { +class ClangdLSPServer : public DiagnosticsConsumer { public: I would not expect ClangdLSPServer to be passed as a Diag

[PATCH] D33589: clang-format: consider not splitting tokens in optimization

2017-06-14 Thread Francois Ferrand via Phabricator via cfe-commits
Typz added a comment. @krasimir : ping https://reviews.llvm.org/D33589 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D33644: Add default values for function parameter chunks

2017-06-14 Thread Ivan Donchevskii via Phabricator via cfe-commits
yvvan added a comment. In https://reviews.llvm.org/D33644#780188, @klimek wrote: > Can you give a bit more background what this is trying to do? Sure :) Currently default value string does not contain default value itself. This change fixes it and adds the default value to the string. https:

[PATCH] D32146: PR32476: __nop_locale_mgmt.h not needed with newlib 2.5+

2017-06-14 Thread Ben Craig via Phabricator via cfe-commits
bcraig accepted this revision. bcraig added a comment. LGTM. @waltl : Do you need me to submit the changes, or will you handle that? https://reviews.llvm.org/D32146 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bi

[PATCH] D32942: [clang-tidy] readability-function-size: add NestingThreshold param.

2017-06-14 Thread Malcolm Parsons via Phabricator via cfe-commits
malcolm.parsons added a comment. In https://reviews.llvm.org/D32942#780090, @lebedev.ri wrote: > In https://reviews.llvm.org/D32942#780053, @malcolm.parsons wrote: > > > My prototype of this feature used `ifStmt(stmt().bind("if"), > > unless(hasParent(ifStmt(hasElse(equalsBoundNode("if"))`.

[PATCH] D33644: Add default values for function parameter chunks

2017-06-14 Thread Manuel Klimek via Phabricator via cfe-commits
klimek added a comment. Ok, now I get it - can you please add tests? This is usually tested by adding a c-index-test based test. Comment at: lib/Sema/SemaCodeComplete.cpp:2411-2417 + const SourceLocation StartLoc = SrcRange.getBegin(); + const SourceLocation EndLoc = SrcRang

[PATCH] D34202: [clang-tidy] readability-function-size: fix nesting level calculation

2017-06-14 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri updated this revision to Diff 102533. lebedev.ri edited the summary of this revision. lebedev.ri added a comment. Ok, i really messed up the initial https://reviews.llvm.org/D32942 :) Malcolm, thank you for bothering to report :) This should be so much better. Repository: rL LLVM h

[PATCH] D34201: [clangd] Move dependencies of ClangdLSPServer out of its implementation

2017-06-14 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir abandoned this revision. krasimir added a comment. On a second thought, meh :D https://reviews.llvm.org/D34201 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D34202: [clang-tidy] readability-function-size: fix nesting level calculation

2017-06-14 Thread Malcolm Parsons via Phabricator via cfe-commits
malcolm.parsons added inline comments. Comment at: clang-tidy/readability/FunctionSizeCheck.cpp:38 +} else { + assert(!isa(Node)); + if (TrackedParent.back()) I don't think this assert adds anything. Comment at: clang-tidy/readabi

[PATCH] D34202: [clang-tidy] readability-function-size: fix nesting level calculation

2017-06-14 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added inline comments. Comment at: clang-tidy/readability/FunctionSizeCheck.cpp:38 +} else { + assert(!isa(Node)); + if (TrackedParent.back()) malcolm.parsons wrote: > I don't think this assert adds anything. Yes, however the original `if

[PATCH] D34202: [clang-tidy] readability-function-size: fix nesting level calculation

2017-06-14 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri updated this revision to Diff 102542. lebedev.ri marked an inline comment as done. lebedev.ri added a comment. Fix spelling. Repository: rL LLVM https://reviews.llvm.org/D34202 Files: clang-tidy/readability/FunctionSizeCheck.cpp test/clang-tidy/readability-function-size.cpp I

[PATCH] D33719: Add _Float16 as a C/C++ source language type

2017-06-14 Thread Sjoerd Meijer via Phabricator via cfe-commits
SjoerdMeijer updated this revision to Diff 102543. SjoerdMeijer added a comment. Float16 is added as a native type. Implementing it as some sort of alias to fp16 caused too many type issues in expression/literals/etc., and thus was not an easier first step, and also in the end we want it to be a

[PATCH] D33644: Add default values for function parameter chunks

2017-06-14 Thread Ivan Donchevskii via Phabricator via cfe-commits
yvvan added inline comments. Comment at: lib/Sema/SemaCodeComplete.cpp:2411-2417 + const SourceLocation StartLoc = SrcRange.getBegin(); + const SourceLocation EndLoc = SrcRange.getEnd(); + if (StartLoc != SM.getExpansionLoc(StartLoc) || EndLoc != SM.getExpansionLoc(EndLoc)) +

[PATCH] D34202: [clang-tidy] readability-function-size: fix nesting level calculation

2017-06-14 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri updated this revision to Diff 102548. lebedev.ri added a comment. Simplify it even further by moving the logic into it's proper place - `TraverseCompoundStmt()` Repository: rL LLVM https://reviews.llvm.org/D34202 Files: clang-tidy/readability/FunctionSizeCheck.cpp test/clang-

[PATCH] D34055: Be more strict when checking the -flto option value

2017-06-14 Thread Yuka Takahashi via Phabricator via cfe-commits
yamaguchi updated this revision to Diff 102551. yamaguchi added a comment. Herald added a subscriber: eraman. Update patch. Add testcase and check if argument is valid or not. https://reviews.llvm.org/D34055 Files: clang/lib/Frontend/CompilerInvocation.cpp clang/test/CodeGen/thinlto-backend

Re: [clang-tools-extra] r303735 - Modify test so that it looks for patterns in stderr as well

2017-06-14 Thread Serge Pavlov via cfe-commits
2017-06-14 4:24 GMT+07:00 David Blaikie : > Ah, I find that the test passes if I remove the compile_commands.json file > from my build directory (I have Ninja configured to generate a > compile_commands.json file). > > Looks like what happens is it finds the compilation database and fails > hard w

[PATCH] D32146: PR32476: __nop_locale_mgmt.h not needed with newlib 2.5+

2017-06-14 Thread Walter Lee via Phabricator via cfe-commits
waltl added a comment. In https://reviews.llvm.org/D32146#780231, @bcraig wrote: > LGTM. > @waltl : Do you need me to submit the changes, or will you handle that? Thanks -- I think jyknight will handle it. https://reviews.llvm.org/D32146 ___ cfe

[PATCH] D34055: Be more strict when checking the -flto option value

2017-06-14 Thread Teresa Johnson via Phabricator via cfe-commits
tejohnson accepted this revision. tejohnson added a comment. This revision is now accepted and ready to land. LGTM, thanks for the fix! https://reviews.llvm.org/D34055 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi

[PATCH] D33304: [clang-tidy][Part1] Add a new module Android and three new checks.

2017-06-14 Thread Haojian Wu via Phabricator via cfe-commits
hokein added inline comments. Comment at: clang-tidy/android/FileOpenFlagCheck.cpp:28 + hasParameter(1, hasType(isInteger())), + hasAnyName("open", "open64")) + .bind("funcDecl"))) --

[PATCH] D34206: [clang-tidy] Add "MakeSmartPtrFunction" option to modernize-make-shared/unique checks.

2017-06-14 Thread Haojian Wu via Phabricator via cfe-commits
hokein created this revision. Herald added a subscriber: xazax.hun. https://reviews.llvm.org/D34206 Files: clang-tidy/modernize/MakeSmartPtrCheck.cpp clang-tidy/modernize/MakeSmartPtrCheck.h docs/clang-tidy/checks/modernize-make-shared.rst docs/clang-tidy/checks/modernize-make-unique.rst

[PATCH] D34121: [ubsan] Teach the pointer overflow check that "p - <= p" (PR33430)

2017-06-14 Thread Adrian Prantl via Phabricator via cfe-commits
aprantl added inline comments. Comment at: lib/CodeGen/CGExpr.cpp:3010 +return CGF.EmitCheckedInBoundsGEP(ptr, indices, signedIndices, + /*IsSubtraction=*/false, loc, name); } else { Might want to define an `enum { Not

r305392 - Be more strict when checking the -flto option value

2017-06-14 Thread Yuka Takahashi via cfe-commits
Author: yamaguchi Date: Wed Jun 14 10:37:11 2017 New Revision: 305392 URL: http://llvm.org/viewvc/llvm-project?rev=305392&view=rev Log: Be more strict when checking the -flto option value Summary: It seems -flto must be either "thin" or "full". I think the use of containValue is just a typo. Rev

[PATCH] D34055: Be more strict when checking the -flto option value

2017-06-14 Thread Yuka Takahashi via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL305392: Be more strict when checking the -flto option value (authored by yamaguchi). Changed prior to commit: https://reviews.llvm.org/D34055?vs=102551&id=102555#toc Repository: rL LLVM https://revi

[PATCH] D30691: [analyzer] Support for naive cross translational unit analysis

2017-06-14 Thread Daniel Krupp via Phabricator via cfe-commits
dkrupp added a comment. Thanks for the reviews so far. I think we have addressed all major concerns regarding this patch: -(Anna) Scan-build-py integration of the functionality is nearly finished (see https://github.com/rizsotto/scan-build/issues/83) (--ctu switch performs both analysis phases

[PATCH] D30691: [analyzer] Support for naive cross translational unit analysis

2017-06-14 Thread Aleksei Sidorin via Phabricator via cfe-commits
a.sidorin accepted this revision. a.sidorin added a comment. Hello Daniel & Gabor, Thank you very much for your work. This patch looks good to me but I think such a change should also be approved by maintainers. https://reviews.llvm.org/D30691 ___

[PATCH] D33644: Add default values for function parameter chunks

2017-06-14 Thread Manuel Klimek via Phabricator via cfe-commits
klimek added inline comments. Comment at: lib/Sema/SemaCodeComplete.cpp:2453 std::string PlaceholderStr = FormatFunctionParameter(Policy, Param); +if (Param->hasDefaultArg() && PlaceholderStr.find("=") == std::string::npos) { +std::string DefaultValue =

[PATCH] D34210: Add __has_feature(leak_sanitizer)

2017-06-14 Thread Francis Ricci via Phabricator via cfe-commits
fjricci created this revision. Stand-alone leak sanitizer builds are supported with -fsanitize=leak, adds an attribute for consistency with the rest of the sanitizer attributes. https://reviews.llvm.org/D34210 Files: lib/Lex/PPMacroExpansion.cpp test/Lexer/has_feature_leak_sanitizer.cpp I

[PATCH] D34202: [clang-tidy] readability-function-size: fix nesting level calculation

2017-06-14 Thread Malcolm Parsons via Phabricator via cfe-commits
malcolm.parsons added a comment. What do you expect for this? if (true) if (true) if (true) { int j; } Repository: rL LLVM https://reviews.llvm.org/D34202 ___ cfe-commits mailing list cfe-commits@lists.l

[PATCH] D34198: Fix __has_trivial_destructor crash when the type is incomplete with unknown array bounds.

2017-06-14 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. Test cases? https://reviews.llvm.org/D34198 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D34211: Implement the non-execution policy versions of `inclusive_scan` and `transform_ inclusive_scan` for C++17

2017-06-14 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists created this revision. This is the last of three patches - https://reviews.llvm.org/D33997 and https://reviews.llvm.org/D34038 were the first two. When this lands, we'll have all of the new (non-parallel) algorithms that were added in C++17. https://reviews.llvm.org/D34211 Files:

[PATCH] D34202: [clang-tidy] readability-function-size: fix nesting level calculation

2017-06-14 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added a comment. In https://reviews.llvm.org/D34202#780394, @malcolm.parsons wrote: > What do you expect for this? > > if (true) > if (true) > if (true) { > int j; > } > that it is equivalent to if (true && true && true) { // 1 int j;

[PATCH] D34202: [clang-tidy] readability-function-size: fix nesting level calculation

2017-06-14 Thread Malcolm Parsons via Phabricator via cfe-commits
malcolm.parsons added a comment. My coding standards require the `{}`, so while I may not agree with your definition of nesting, it doesn't matter. Repository: rL LLVM https://reviews.llvm.org/D34202 ___ cfe-commits mailing list cfe-commits@list

[PATCH] D34202: [clang-tidy] readability-function-size: fix nesting level calculation

2017-06-14 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added a comment. In https://reviews.llvm.org/D34202#780424, @malcolm.parsons wrote: > My coding standards require the `{}`, so while I may not agree with your > definition of nesting, it doesn't matter. Well, seeing `readability-deep-nesting.cpp` in the issue, i suppose the definit

[PATCH] D34202: [clang-tidy] readability-function-size: fix nesting level calculation

2017-06-14 Thread Malcolm Parsons via Phabricator via cfe-commits
malcolm.parsons added a comment. LGTM! Comment at: clang-tidy/readability/FunctionSizeCheck.cpp:58 +// is already nested NestingThreshold levels deep, record the start location +// of this new compound statement +if (CurrentNestingLevel == Info.NestingThreshold) --

[PATCH] D32146: PR32476: __nop_locale_mgmt.h not needed with newlib 2.5+

2017-06-14 Thread James Y Knight via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL305394: PR32476: __nop_locale_mgmt.h not needed with newlib 2.5+ (authored by jyknight). Changed prior to commit: https://reviews.llvm.org/D32146?vs=102265&id=102562#toc Repository: rL LLVM https://

[libcxx] r305394 - PR32476: __nop_locale_mgmt.h not needed with newlib 2.5+

2017-06-14 Thread James Y Knight via cfe-commits
Author: jyknight Date: Wed Jun 14 11:40:03 2017 New Revision: 305394 URL: http://llvm.org/viewvc/llvm-project?rev=305394&view=rev Log: PR32476: __nop_locale_mgmt.h not needed with newlib 2.5+ Newlib 2.5 added the locale management functions, so it should not include __nop_local_mgmt.h. This chang

[libcxx] r305397 - In several places in std::allocator (and one in shared_ptr, we were casting a 'const T*' to a 'void *' - implicitly casting away the const. Add const_cast to make that expl

2017-06-14 Thread Marshall Clow via cfe-commits
Author: marshall Date: Wed Jun 14 11:54:43 2017 New Revision: 305397 URL: http://llvm.org/viewvc/llvm-project?rev=305397&view=rev Log: In several places in std::allocator (and one in shared_ptr, we were casting a 'const T*' to a 'void *' - implicitly casting away the const. Add const_cast to mak

r305399 - Define _GNU_SOURCE for rtems c++

2017-06-14 Thread James Y Knight via cfe-commits
Author: jyknight Date: Wed Jun 14 12:01:18 2017 New Revision: 305399 URL: http://llvm.org/viewvc/llvm-project?rev=305399&view=rev Log: Define _GNU_SOURCE for rtems c++ This is required by the libc++ locale support. Patch by Walter Lee. Differential Revision: https://reviews.llvm.org/D34105 Mod

[PATCH] D34105: Define _GNU_SOURCE for rtems c++

2017-06-14 Thread James Y Knight via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL305399: Define _GNU_SOURCE for rtems c++ (authored by jyknight). Changed prior to commit: https://reviews.llvm.org/D34105?vs=102188&id=102565#toc Repository: rL LLVM https://reviews.llvm.org/D34105

[PATCH] D30268: Avoid copy of __atoms when char_type is char

2017-06-14 Thread Aditya Kumar via Phabricator via cfe-commits
hiraditya updated this revision to Diff 102566. hiraditya added a comment. Addressed comments from Eric. https://reviews.llvm.org/D30268 Files: libcxx/benchmarks/stringstream.bench.cpp libcxx/include/__config libcxx/include/locale Index: libcxx/include/locale

[PATCH] D33644: Add default values for function parameter chunks

2017-06-14 Thread Ivan Donchevskii via Phabricator via cfe-commits
yvvan added inline comments. Comment at: lib/Sema/SemaCodeComplete.cpp:2453 std::string PlaceholderStr = FormatFunctionParameter(Policy, Param); +if (Param->hasDefaultArg() && PlaceholderStr.find("=") == std::string::npos) { +std::string DefaultValue = -

[PATCH] D34206: [clang-tidy] Add "MakeSmartPtrFunction" option to modernize-make-shared/unique checks.

2017-06-14 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added a comment. It'll be good idea to run modernize-make-unique on LLVM/Clang/etc for llvm::make_unique. https://reviews.llvm.org/D34206 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/l

r305401 - [PPC] Enhance altivec conversion function macros implementation.

2017-06-14 Thread Tony Jiang via cfe-commits
Author: jtony Date: Wed Jun 14 12:23:43 2017 New Revision: 305401 URL: http://llvm.org/viewvc/llvm-project?rev=305401&view=rev Log: [PPC] Enhance altivec conversion function macros implementation. Add checking for the second parameter of altivec conversion builtin to make sure it is compile-time

[PATCH] D34212: docs: Document binary compatibility issue due to bug in gcc

2017-06-14 Thread Tom Stellard via Phabricator via cfe-commits
tstellar created this revision. Reported in PR33161. https://reviews.llvm.org/D34212 Files: docs/BinaryCompatibilityWithOtherCompilers.rst Index: docs/BinaryCompatibilityWithOtherCompilers.rst === --- /dev/null +++ docs/BinaryC

[PATCH] D34210: Add __has_feature(leak_sanitizer)

2017-06-14 Thread Kostya Serebryany via Phabricator via cfe-commits
kcc added a comment. I'm not sure about this one. standalone lsan is a link-time feature only, it doesn't change the compilation, so the argument of consistency doesn't apply. https://reviews.llvm.org/D34210 ___ cfe-commits mailing list cfe-commit

[PATCH] D33304: [clang-tidy][Part1] Add a new module Android and three new checks.

2017-06-14 Thread Yan Wang via Phabricator via cfe-commits
yawanng added inline comments. Comment at: clang-tidy/android/FileOpenFlagCheck.cpp:61 + SourceLocation EndLoc = + Lexer::getLocForEndOfToken(FlagArg->getLocEnd(), 0, SM, getLangOpts()); + hokein wrote: > Instead of using getLangOpts(), you should use `Resu

[PATCH] D33304: [clang-tidy][Part1] Add a new module Android and three new checks.

2017-06-14 Thread Yan Wang via Phabricator via cfe-commits
yawanng updated this revision to Diff 102577. yawanng marked 7 inline comments as done. https://reviews.llvm.org/D33304 Files: clang-tidy/CMakeLists.txt clang-tidy/android/AndroidTidyModule.cpp clang-tidy/android/CMakeLists.txt clang-tidy/android/FileOpenFlagCheck.cpp clang-tidy/android

[PATCH] D34185: [Parser][ObjC] Avoid crashing when skipping to EOF while parsing an ObjC interface/implementation

2017-06-14 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak added a comment. This patch fixes the crash and that is fine, but the users might find the last error ("expected '}'" at the end of the file) confusing. This seems to happen because Parser::ParseLexedObjCMethodDefs consumes all tokens in the file until it sees the EOF after consuming a

[PATCH] D34210: Add __has_feature(leak_sanitizer)

2017-06-14 Thread Francis Ricci via Phabricator via cfe-commits
fjricci added a comment. Currently, the way that we tell users to gate on sanitizer-specific behavior is with `__has_feature(foo_sanitizer)`, as far as I know, it's the only way to do so. LSan provides several API functions for users, ie `__lsan_ignore_object`. If a user program wants to use th

[PATCH] D34210: Add __has_feature(leak_sanitizer)

2017-06-14 Thread Maxim Ostapenko via Phabricator via cfe-commits
m.ostapenko added a comment. In https://reviews.llvm.org/D34210#780520, @fjricci wrote: > Currently, the way that we tell users to gate on sanitizer-specific behavior > is with `__has_feature(foo_sanitizer)`, as far as I know, it's the only way > to do so. LSan provides several API functions fo

[PATCH] D34102: [analyzer] Add portability package for the checkers.

2017-06-14 Thread Anna Zaks via Phabricator via cfe-commits
zaks.anna added inline comments. Comment at: include/clang/StaticAnalyzer/Checkers/Checkers.td:454 +def UnixAPIPortabilityChecker : Checker<"API">, + HelpText<"Finds implementation-defined behavior in UNIX/Posix functions">, + DescFile<"UnixAPIChecker.cpp">; No

[PATCH] D27753: [analyzer] alpha.security.DirtyScalar Checker

2017-06-14 Thread Anna Zaks via Phabricator via cfe-commits
zaks.anna added a comment. This generally sounds good. Definitely do submit these changes in small pieces! See http://llvm.org/docs/DeveloperPolicy.html#incremental-development for rationale. https://reviews.llvm.org/D27753 ___ cfe-commits mailing

[PATCH] D33383: [GSoC] Flag value completion for clang

2017-06-14 Thread Rui Ueyama via Phabricator via cfe-commits
ruiu added a comment. Overall looking good. Good work! A few minor comments. Comment at: clang/include/clang/Driver/Options.td:2198 def stdlib_EQ : Joined<["-", "--"], "stdlib=">, Flags<[CC1Option]>, - HelpText<"C++ standard library to use">; + HelpText<"C++ standard library

[PATCH] D34210: Add __has_feature(leak_sanitizer)

2017-06-14 Thread Francis Ricci via Phabricator via cfe-commits
fjricci abandoned this revision. fjricci added a comment. Weak hooks do provide a good solution, abandoning for now (although it may need to be reconsidered if we get a windows LSan port up and running). https://reviews.llvm.org/D34210 ___ cfe-comm

[PATCH] D34156: [LTO] Add -femit-summary-index flag to emit summary for regular LTO

2017-06-14 Thread Tobias Edler von Koch via Phabricator via cfe-commits
tobiasvk updated this revision to Diff 102585. tobiasvk added a comment. - Change patch to always emit a module summary for regular LTO I don't see any real downside of having a summary given the marginal time and space overhead it takes to construct and save it. https://reviews.llvm.org/D34156

Re: [clang-tools-extra] r303735 - Modify test so that it looks for patterns in stderr as well

2017-06-14 Thread David Blaikie via cfe-commits
On Wed, Jun 14, 2017, 8:17 AM Serge Pavlov wrote: > 2017-06-14 4:24 GMT+07:00 David Blaikie : > >> Ah, I find that the test passes if I remove the compile_commands.json >> file from my build directory (I have Ninja configured to generate a >> compile_commands.json file). >> >> Looks like what hap

[libcxx] r305410 - Add some const_casts in places where we were implicitly casting away constness. No functional change, but now they're explicit

2017-06-14 Thread Marshall Clow via cfe-commits
Author: marshall Date: Wed Jun 14 15:00:36 2017 New Revision: 305410 URL: http://llvm.org/viewvc/llvm-project?rev=305410&view=rev Log: Add some const_casts in places where we were implicitly casting away constness. No functional change, but now they're explicit Modified: libcxx/trunk/include

[PATCH] D33102: [clang] Implement -Wcast-qual for C++

2017-06-14 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists added a comment. As of r305410, libc++ passes all the tests w/ -Wcast-qual enabled. Repository: rL LLVM https://reviews.llvm.org/D33102 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/list

[PATCH] D33308: [analyzer]: Improve test handling with multiple constraint managers

2017-06-14 Thread Devin Coughlin via Phabricator via cfe-commits
dcoughlin accepted this revision. dcoughlin added a comment. This revision is now accepted and ready to land. This looks good to me. Sorry of the delay here -- and thanks for your patience. I will review the other patches this weekend. https://reviews.llvm.org/D33308 ___

[PATCH] D34185: [Parser][ObjC] Avoid crashing when skipping to EOF while parsing an ObjC interface/implementation

2017-06-14 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman added a comment. In https://reviews.llvm.org/D34185#780494, @ahatanak wrote: > This patch fixes the crash and that is fine, but the users might find the > last error ("expected '}'" at the end of the file) confusing. This seems to > happen because Parser::ParseLexedObjCMethodDefs consu

[PATCH] D34175: [driver][macOS] Pick the system version for the deployment target if the SDK is newer than the system

2017-06-14 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman added inline comments. Comment at: lib/Driver/ToolChains/Darwin.cpp:1133 + HadExtra) || + HadExtra || Major != 10 || Minor >= 100 || Micro >= 100) +return MacOSSDKVersion; inouehrs wrote: > What these magic number

[PATCH] D34121: [ubsan] Teach the pointer overflow check that "p - <= p" (PR33430)

2017-06-14 Thread Vedant Kumar via Phabricator via cfe-commits
vsk updated this revision to Diff 102603. vsk marked an inline comment as done. vsk added a comment. Address Adrian's comment about using an enum to simplify some calls. https://reviews.llvm.org/D34121 Files: lib/CodeGen/CGExpr.cpp lib/CodeGen/CGExprScalar.cpp lib/CodeGen/CodeGenFunction.

[PATCH] D32046: [Preprocessor]Correct Macro-Arg allocation of StringifiedArguments, correct getNumArguments

2017-06-14 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman accepted this revision. arphaman added a comment. This revision is now accepted and ready to land. LGTM! Please fix the code style issues that I pointed out before committing. Comment at: unittests/Lex/LexerTest.cpp:24 #include "clang/Lex/PreprocessorOptions.h" +#incl

  1   2   >