Re: r345099 - [analyzer] Trust summaries for OSObject::retain and OSObject::release

2018-11-20 Thread Mikael Holmén via cfe-commits
Hi George, I noticed that valgrind started complaining in one case with this patch. I've no idea if it's really due to something in the patch or if it's something old that surfaced or if it's a false flag. Anyway, with this patch the following valgrind clang-tidy

[PATCH] D54724: [Driver] Automatically include C++ library dependencies

2018-11-20 Thread Dimitry Andric via Phabricator via cfe-commits
dim added a comment. In https://reviews.llvm.org/D54724#1303844, @phosek wrote: > In https://reviews.llvm.org/D54724#1303809, @dim wrote: > > > I think this is the wrong direction, placing "common" code in > > `addCXXStdlibLinkDeps`, which then has all kinds of ugly ifs and switches > > for

[PATCH] D54550: Mark lambda decl as invalid if a captured variable has an invalid type.

2018-11-20 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith accepted this revision. rsmith added a comment. This revision is now accepted and ready to land. Looks good, thanks! (Though we generally prefer fewer test files with more test per file, because a lot of the overhead of running tests is the setup / teardown time, so can you merge the two

[PATCH] D54741: [Driver] Link sanitizer runtime deps on Fuchsia when needed

2018-11-20 Thread Petr Hosek via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC347378: [Driver] Link sanitizer runtime deps on Fuchsia when needed (authored by phosek, committed by ). Changed prior to commit: https://reviews.llvm.org/D54741?vs=174728=174868#toc Repository: rC

r347378 - [Driver] Link sanitizer runtime deps on Fuchsia when needed

2018-11-20 Thread Petr Hosek via cfe-commits
Author: phosek Date: Tue Nov 20 20:33:44 2018 New Revision: 347378 URL: http://llvm.org/viewvc/llvm-project?rev=347378=rev Log: [Driver] Link sanitizer runtime deps on Fuchsia when needed Even though these deps weren't needed, this makes Fuchsia driver better match other drivers, and it may be

[PATCH] D54781: [clangd] Add 'Switch header/source' command in clangd-vscode

2018-11-20 Thread Marc-Andre Laperle via Phabricator via cfe-commits
malaperle updated this revision to Diff 174866. malaperle added a comment. Fix a bad change Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D54781 Files: clangd/clients/clangd-vscode/package.json clangd/clients/clangd-vscode/src/extension.ts Index:

[PATCH] D54781: [clangd] Add 'Switch header/source' command in clangd-vscode

2018-11-20 Thread Marc-Andre Laperle via Phabricator via cfe-commits
malaperle created this revision. Herald added subscribers: cfe-commits, kadircet, arphaman, jkorous, MaskRay, ioeric, ilya-biryukov. Alt+o is used on Windows/Linux and Option+Cmd+o on macOS. Signed-off-by: Marc-Andre Laperle Repository: rCTE Clang Tools Extra

[PATCH] D51268: [libc++] Implement P0487R1 - Fixing operator>>(basic_istream&, CharT*)

2018-11-20 Thread Zhihao Yuan via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rCXX347377: [libc++] Implement P0487R1 - Fixing operator(basic_istream, CharT*) (authored by lichray, committed by ). Changed prior to commit: https://reviews.llvm.org/D51268?vs=174722=174864#toc

[PATCH] D54737: [clang-tidy] Add the abseil-duration-comparison check

2018-11-20 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: docs/clang-tidy/checks/abseil-duration-comparison.rst:11 +compared against a floating-pointer value, truncation during the ``Duration`` +conversion might yield a different result. In practice this is very rare, and +still

[PATCH] D53157: Teach the IRBuilder about constrained fadd and friends

2018-11-20 Thread Cameron McInally via Phabricator via cfe-commits
cameron.mcinally added a comment. In https://reviews.llvm.org/D53157#1304900, @andrew.w.kaylor wrote: > I think at this point we're all on the same page in this regard. I just > wanted to make sure we also understand why we're on that page. I still > believe it was the correct choice. Yup,

[PATCH] D53157: Teach the IRBuilder about constrained fadd and friends

2018-11-20 Thread Andy Kaylor via Phabricator via cfe-commits
andrew.w.kaylor added a comment. In https://reviews.llvm.org/D53157#1304895, @cameron.mcinally wrote: > The problem I was missing is when a FENV_ACCESS=OFF operation, like a FDIV, > is hoisted into a FENV_ACCESS=ON region. I see it now, but still think that > forcing FENV_ACCESS=OFF operations

[clang-tools-extra] r347373 - [clang-tidy] Add a test for proper handling of locations in scratch space.

2018-11-20 Thread Alexander Kornienko via cfe-commits
Author: alexfh Date: Tue Nov 20 17:11:18 2018 New Revision: 347373 URL: http://llvm.org/viewvc/llvm-project?rev=347373=rev Log: [clang-tidy] Add a test for proper handling of locations in scratch space. This test examines the behavior change of clang::tooling::Diagnostic in r347372. Added:

r347372 - clang::tooling::Diagnostic: Don't store offset in the scratch space.

2018-11-20 Thread Alexander Kornienko via cfe-commits
Author: alexfh Date: Tue Nov 20 17:08:46 2018 New Revision: 347372 URL: http://llvm.org/viewvc/llvm-project?rev=347372=rev Log: clang::tooling::Diagnostic: Don't store offset in the scratch space. These offsets are useless (and even harmful in certain cases) in exported diagnostics. The test

r347371 - Implement YAML serialization of notes in clang::tooling::Diagnostic.

2018-11-20 Thread Alexander Kornienko via cfe-commits
Author: alexfh Date: Tue Nov 20 17:06:32 2018 New Revision: 347371 URL: http://llvm.org/viewvc/llvm-project?rev=347371=rev Log: Implement YAML serialization of notes in clang::tooling::Diagnostic. Modified: cfe/trunk/include/clang/Tooling/DiagnosticsYaml.h

[PATCH] D53157: Teach the IRBuilder about constrained fadd and friends

2018-11-20 Thread Cameron McInally via Phabricator via cfe-commits
cameron.mcinally added a comment. In https://reviews.llvm.org/D53157#1304880, @hfinkel wrote: > In https://reviews.llvm.org/D53157#1304873, @cameron.mcinally wrote: > > > I'd like to hear more about this. The fesetexcept(...) function and friends > > change the FPEnv state, which can change the

[PATCH] D53157: Teach the IRBuilder about constrained fadd and friends

2018-11-20 Thread Cameron McInally via Phabricator via cfe-commits
cameron.mcinally added a comment. In https://reviews.llvm.org/D53157#1304347, @uweigand wrote: > OK, let me try to expand on my point 3 above, which appears to have confused > everybody :-) Ah, that makes more sense. The problem I was missing is when a FENV_ACCESS=OFF operation, like a FDIV,

[PATCH] D53157: Teach the IRBuilder about constrained fadd and friends

2018-11-20 Thread Hal Finkel via Phabricator via cfe-commits
hfinkel added a comment. In https://reviews.llvm.org/D53157#1304873, @cameron.mcinally wrote: > In https://reviews.llvm.org/D53157#1304275, @kpn wrote: > > > In https://reviews.llvm.org/D53157#1303398, @cameron.mcinally wrote: > > > > > If we all agree upon that, then we simply have to treat the

[PATCH] D53157: Teach the IRBuilder about constrained fadd and friends

2018-11-20 Thread Cameron McInally via Phabricator via cfe-commits
cameron.mcinally added a comment. In https://reviews.llvm.org/D53157#1304275, @kpn wrote: > In https://reviews.llvm.org/D53157#1303398, @cameron.mcinally wrote: > > > If we all agree upon that, then we simply have to treat the functions that > > modify the FPEnv, e.g. fesetexcept(...), as

[PATCH] D54550: Mark lambda decl as invalid if a captured variable has an invalid type.

2018-11-20 Thread Jorge Gorbe Moya via Phabricator via cfe-commits
jgorbe added a comment. Added a test for the "capturing an array of incomplete type" case. See also responses to inline comments below. Comment at: clang/lib/Sema/SemaExpr.cpp:14946 + // as invalid as well. + if (const CXXRecordDecl *RD = FieldType->getAsCXXRecordDecl()) {

[PATCH] D54550: Mark lambda decl as invalid if a captured variable has an invalid type.

2018-11-20 Thread Jorge Gorbe Moya via Phabricator via cfe-commits
jgorbe updated this revision to Diff 174853. jgorbe marked 2 inline comments as done. https://reviews.llvm.org/D54550 Files: clang/lib/Sema/SemaExpr.cpp clang/test/SemaCXX/lambda-invalid-array-capture.cpp clang/test/SemaCXX/lambda-invalid-capture.cpp Index:

[PATCH] D40988: Clang-format: add finer-grained options for putting all arguments on one line

2018-11-20 Thread Russell McClellan via Phabricator via cfe-commits
russellmcc added a comment. Bump! Thanks again for your consideration. https://reviews.llvm.org/D40988 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] r347366 - Update EvaluateAsInt to the new syntax.

2018-11-20 Thread Bill Wendling via cfe-commits
Author: void Date: Tue Nov 20 15:24:39 2018 New Revision: 347366 URL: http://llvm.org/viewvc/llvm-project?rev=347366=rev Log: Update EvaluateAsInt to the new syntax. Modified: clang-tools-extra/trunk/clang-tidy/bugprone/MisplacedWideningCastCheck.cpp

r347364 - Reinstate 347294 with a fix for the failures.

2018-11-20 Thread Bill Wendling via cfe-commits
Author: void Date: Tue Nov 20 15:24:16 2018 New Revision: 347364 URL: http://llvm.org/viewvc/llvm-project?rev=347364=rev Log: Reinstate 347294 with a fix for the failures. EvaluateAsInt() is sometimes called in a constant context. When that's the case, we need to specify it as so. Modified:

[PATCH] D52674: [AST] Add Obj-C discriminator to MS ABI RTTI

2018-11-20 Thread Reid Kleckner via Phabricator via cfe-commits
rnk added a comment. Well, you could go further down the route of what we do for "structors", and store the top-level decl being mangled in the mangler. Would that solve the problem? Repository: rC Clang https://reviews.llvm.org/D52674 ___

[PATCH] D54768: Don't speculatively emit VTTs for classes unless we are able to correctly emit references to all the functions they will (directly or indirectly) reference.

2018-11-20 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. LGTM. Repository: rC Clang https://reviews.llvm.org/D54768 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D53787: [Sema] Provide -fvisibility-global-new-delete-hidden option

2018-11-20 Thread Petr Hosek via Phabricator via cfe-commits
phosek added a comment. @rsmith friendly ping? Repository: rC Clang https://reviews.llvm.org/D53787 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D53900: [CodeComplete] Penalize inherited ObjC properties for auto-completion

2018-11-20 Thread Sam McCall via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC347352: [CodeComplete] Penalize inherited ObjC properties for auto-completion (authored by sammccall, committed by ). Changed prior to commit: https://reviews.llvm.org/D53900?vs=171799=174838#toc

r347352 - [CodeComplete] Penalize inherited ObjC properties for auto-completion

2018-11-20 Thread Sam McCall via cfe-commits
Author: sammccall Date: Tue Nov 20 14:06:54 2018 New Revision: 347352 URL: http://llvm.org/viewvc/llvm-project?rev=347352=rev Log: [CodeComplete] Penalize inherited ObjC properties for auto-completion Summary: Similar to auto-completion for ObjC methods, inherited properties should be penalized

r347351 - [OpenMP] Update CHECK-DAG usage in target_parallel_codegen.cpp

2018-11-20 Thread Joel E. Denny via cfe-commits
Author: jdenny Date: Tue Nov 20 14:05:23 2018 New Revision: 347351 URL: http://llvm.org/viewvc/llvm-project?rev=347351=rev Log: [OpenMP] Update CHECK-DAG usage in target_parallel_codegen.cpp This patch adjusts a test not to depend on deprecated FileCheck behavior that permits overlapping matches

[PATCH] D54764: [OpenMP] Update CHECK-DAG usage in for_codegen.cpp

2018-11-20 Thread Joel E. Denny via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC347350: [OpenMP] Update CHECK-DAG usage in for_codegen.cpp (authored by jdenny, committed by ). Changed prior to commit: https://reviews.llvm.org/D54764?vs=174816=174836#toc Repository: rC Clang

[PATCH] D54765: [OpenMP] Update CHECK-DAG usage in target_parallel_codegen.cpp

2018-11-20 Thread Joel E. Denny via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC347351: [OpenMP] Update CHECK-DAG usage in target_parallel_codegen.cpp (authored by jdenny, committed by ). Changed prior to commit: https://reviews.llvm.org/D54765?vs=174817=174837#toc Repository:

r347350 - [OpenMP] Update CHECK-DAG usage in for_codegen.cpp

2018-11-20 Thread Joel E. Denny via cfe-commits
Author: jdenny Date: Tue Nov 20 14:04:45 2018 New Revision: 347350 URL: http://llvm.org/viewvc/llvm-project?rev=347350=rev Log: [OpenMP] Update CHECK-DAG usage in for_codegen.cpp This patch adjusts a test not to depend on deprecated FileCheck behavior that permits overlapping matches within a

[PATCH] D53524: [ThinLTO] Enable LTOUnit only when it is needed

2018-11-20 Thread Teresa Johnson via Phabricator via cfe-commits
tejohnson abandoned this revision. tejohnson added a comment. Abandoned in favor of new approach in https://reviews.llvm.org/D53890/https://reviews.llvm.org/D53891. Repository: rC Clang https://reviews.llvm.org/D53524 ___ cfe-commits mailing

[PATCH] D54565: Introduce `-Wc++14-compat-ctad` as a subgroup of `-Wc++14-compat`

2018-11-20 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added a comment. In the past, we've been resistant to adding more fine-grained compat warnings, because we don't want to encourage subsetting the language (which sounds like exactly what you're trying to do here). We generally don't think it's Clang's business to enforce coding style

[PATCH] D53891: [LTO] Pass down LTOUnit codegen flag to bitcode writer

2018-11-20 Thread Teresa Johnson via Phabricator via cfe-commits
tejohnson updated this revision to Diff 174835. tejohnson added a comment. Update to use new module flag Repository: rC Clang https://reviews.llvm.org/D53891 Files: include/clang/Driver/Options.td include/clang/Driver/SanitizerArgs.h include/clang/Frontend/CodeGenOptions.def

[PATCH] D52311: [clangd] Add support for hierarchical documentSymbol

2018-11-20 Thread Sam McCall via Phabricator via cfe-commits
sammccall added a comment. Very nice! Mostly just a few style/structure nits. Comment at: clangd/AST.cpp:69 +std::string printName(const NamedDecl ) { + const NamedDecl *NameSource = + std::string Name = llvm::to_string(NameSource->getDeclName()); just use

[PATCH] D54745: [clang-tidy] Don't generate incorrect fixes for class with deleted copy constructor in smart_ptr check.

2018-11-20 Thread Jonas Toth via Phabricator via cfe-commits
JonasToth added a comment. IMHO this patch is fine, but i think a language expert (not me :D) should take a look (@aaron.ballman ?) as its complicated :) Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D54745 ___ cfe-commits mailing

[PATCH] D54395: [clang-tidy] implement utility-function to add 'const' to variables

2018-11-20 Thread Jonas Toth via Phabricator via cfe-commits
JonasToth added inline comments. Comment at: unittests/clang-tidy/AddConstTest.cpp:733 + StringRef T = "template void f(T v) \n"; + StringRef S = "{ T target = v; }"; + auto Cat = [](StringRef S) { return (T + S).str(); }; alexfh wrote: > It would be

[PATCH] D54395: [clang-tidy] implement utility-function to add 'const' to variables

2018-11-20 Thread Jonas Toth via Phabricator via cfe-commits
JonasToth updated this revision to Diff 174828. JonasToth added a comment. add tests for different template instantiations Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D54395 Files: clang-tidy/performance/ForRangeCopyCheck.cpp

[PATCH] D48866: [clang-tidy] Add incorrect-pointer-cast checker

2018-11-20 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: docs/ReleaseNotes.rst:60 +- New :doc:`misc-incorrect-pointer-cast + ` check hgabii wrote: > Eugene.Zelenko wrote: > > Will be good idea to rebase from trunk and use alphabetical order. > It is rebased. I could

[PATCH] D53210: Revert 344389 "Revert r344375 "[Driver] check for exit code from SIGPIPE""

2018-11-20 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers added a comment. Hi @richard.barton.arm , this has landed already. If you click "show older" you'll see the UI element that shows this landed as r344536 (Oct 15 2018). If your clang version is later than r344536 (what will become clang-8) and you still see this, please open a

[PATCH] D48866: [clang-tidy] Add incorrect-pointer-cast checker

2018-11-20 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added a comment. `Warn for cases when the pointed to type is wider than the allocated type.` What does that mean? Is this talking about the size of the allocation, or the alignment? Are you aware of the previous attempts, namely https://reviews.llvm.org/D33826? Please incorporate the

[PATCH] D54764: [OpenMP] Update CHECK-DAG usage in for_codegen.cpp

2018-11-20 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added a comment. In https://reviews.llvm.org/D54764#1304606, @jdenny wrote: > In https://reviews.llvm.org/D54764#1304573, @ABataev wrote: > > > I'm fine with the patch, > > > Thanks for the quick reviews. I'll push soon. > > > the original intention was to handle a possible situation

[PATCH] D48866: [clang-tidy] Add incorrect-pointer-cast checker

2018-11-20 Thread Gábor Horváth via Phabricator via cfe-commits
hgabii marked 9 inline comments as done. hgabii added a comment. I resolved all comments. Comment at: docs/ReleaseNotes.rst:60 +- New :doc:`misc-incorrect-pointer-cast + ` check Eugene.Zelenko wrote: > Will be good idea to rebase from trunk and use

[PATCH] D54764: [OpenMP] Update CHECK-DAG usage in for_codegen.cpp

2018-11-20 Thread Joel E. Denny via Phabricator via cfe-commits
jdenny added a comment. In https://reviews.llvm.org/D54764#1304573, @ABataev wrote: > I'm fine with the patch, Thanks for the quick reviews. I'll push soon. > the original intention was to handle a possible situation where we may have > several debug locations with the same line numbers.

[PATCH] D54768: Don't speculatively emit VTTs for classes unless we are able to correctly emit references to all the functions they will (directly or indirectly) reference.

2018-11-20 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith created this revision. rsmith added a reviewer: rjmccall. Herald added a subscriber: cfe-commits. This fixes a miscompile where we'd emit a VTT for a class that ends up referencing an inline virtual member function that we can't actually emit a body for (because we never instantiated it in

[PATCH] D54765: [OpenMP] Update CHECK-DAG usage in target_parallel_codegen.cpp

2018-11-20 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev accepted this revision. ABataev added a comment. This revision is now accepted and ready to land. LG Repository: rC Clang https://reviews.llvm.org/D54765 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D54764: [OpenMP] Update CHECK-DAG usage in for_codegen.cpp

2018-11-20 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev accepted this revision. ABataev added a comment. This revision is now accepted and ready to land. I'm fine with the patch, the original intention was to handle a possible situation where we may have several debug locations with the same line numbers. Repository: rC Clang

[PATCH] D54550: Mark lambda decl as invalid if a captured variable has an invalid type.

2018-11-20 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added a comment. Thanks! Some simplifications are possible here, but otherwise this looks good. Comment at: clang/lib/Sema/SemaExpr.cpp:14946 + // as invalid as well. + if (const CXXRecordDecl *RD = FieldType->getAsCXXRecordDecl()) { +if (RD->isInvalidDecl()) {

[PATCH] D54765: [OpenMP] Update CHECK-DAG usage in target_parallel_codegen.cpp

2018-11-20 Thread Joel E. Denny via Phabricator via cfe-commits
jdenny created this revision. jdenny added a reviewer: ABataev. Herald added a subscriber: guansong. This patch adjusts a test not to depend on deprecated FileCheck behavior that permits overlapping matches within a block of CHECK-DAG directives. Thus, this patch also removes uses of FileCheck's

[PATCH] D54764: [OpenMP] Update CHECK-DAG usage in for_codegen.cpp

2018-11-20 Thread Joel E. Denny via Phabricator via cfe-commits
jdenny created this revision. jdenny added a reviewer: ABataev. Herald added a subscriber: guansong. This patch adjusts a test not to depend on deprecated FileCheck behavior that permits overlapping matches within a block of CHECK-DAG directives. Thus, this patch also removes uses of FileCheck's

[PATCH] D53210: Revert 344389 "Revert r344375 "[Driver] check for exit code from SIGPIPE""

2018-11-20 Thread Richard Barton via Phabricator via cfe-commits
richard.barton.arm added a comment. Hi @nickdesaulniers I have run into this too recently so would love to see this patch land. Did you get anywhere with those lld test failures? Ta Rich Repository: rC Clang https://reviews.llvm.org/D53210 ___

[PATCH] D51268: [libc++] Implement P0487R1 - Fixing operator>>(basic_istream&, CharT*)

2018-11-20 Thread Louis Dionne via Phabricator via cfe-commits
ldionne accepted this revision. ldionne added a comment. LGTM Repository: rCXX libc++ https://reviews.llvm.org/D51268 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D54757: [clang-tidy] new check: bugprone-branch-clone

2018-11-20 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added inline comments. Comment at: clang-tidy/bugprone/BranchCloneCheck.cpp:43 + + for (unsigned i = 0; i < LHS.size(); i++) { +if (!areStatementsIdentical(LHS[i]->stripLabelLikeStatements(), Eugene.Zelenko wrote: > Please use size_t. Also ```

r347339 - [clang][Parse] Diagnose useless null statements / empty init-statements

2018-11-20 Thread Roman Lebedev via cfe-commits
Author: lebedevri Date: Tue Nov 20 10:59:05 2018 New Revision: 347339 URL: http://llvm.org/viewvc/llvm-project?rev=347339=rev Log: [clang][Parse] Diagnose useless null statements / empty init-statements Summary: clang has `-Wextra-semi` (D43162), which is not dictated by the currently selected

[PATCH] D52695: [clang][Parse] Diagnose useless null statements (PR39111)

2018-11-20 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC347339: [clang][Parse] Diagnose useless null statements / empty init-statements (authored by lebedevri, committed by ). Changed prior to commit: https://reviews.llvm.org/D52695?vs=174624=174812#toc

[PATCH] D54760: [clangd] Cleanup: make the diags callback global in TUScheduler

2018-11-20 Thread Sam McCall via Phabricator via cfe-commits
sammccall added a comment. Nice! The biggest suggestion I have is merging the callback into ASTCallbacks. That's awkward in initialization (`makeUpdateCallbacks` probably needs to be called unconditionally with a maybe-null pointer) but it seems like a natural grouping in all the places it

[PATCH] D54641: [compiler-rt] [cmake] Fix detecting terminfo library

2018-11-20 Thread Michał Górny via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rCRT347338: [cmake] Fix detecting terminfo library (authored by mgorny, committed by ). Repository: rCRT Compiler Runtime https://reviews.llvm.org/D54641 Files: cmake/config-ix.cmake Index:

[PATCH] D54757: [clang-tidy] new check: bugprone-branch-clone

2018-11-20 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tidy/bugprone/BranchCloneCheck.cpp:19 + +namespace { + Please use anonymous namespaces only for type declarations. See LLV coding style guide. Comment at:

[PATCH] D54560: [analyzer] MoveChecker Pt.3: Improve warning messages a bit.

2018-11-20 Thread Umann Kristóf via Phabricator via cfe-commits
Szelethus added inline comments. Comment at: lib/StaticAnalyzer/Checkers/MoveChecker.cpp:385-386 + } + // Provide the caller with the classification of the object + // we've obtained here accidentally, for later use. + return OK; NoQ wrote: > Szelethus

[PATCH] D52695: [clang][Parse] Diagnose useless null statements (PR39111)

2018-11-20 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added a comment. In https://reviews.llvm.org/D52695#1304225, @aaron.ballman wrote: > Aside from some small nits, LGTM! Thank you for the review! Will address nits and land. Repository: rC Clang https://reviews.llvm.org/D52695 ___

[PATCH] D54355: Use is.constant intrinsic for __builtin_constant_p

2018-11-20 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers added inline comments. Comment at: lib/AST/ExprConstant.cpp:11391 llvm_unreachable("Invalid StmtClass!"); } @void , I assume this unreachable is the one reported by @uweigand ? Does the above switch need a case statement added?

[PATCH] D53157: Teach the IRBuilder about constrained fadd and friends

2018-11-20 Thread Ulrich Weigand via Phabricator via cfe-commits
uweigand added a comment. In https://reviews.llvm.org/D53157#1303193, @andrew.w.kaylor wrote: > I agree that it's preferable to re-use these existing options if possible. I > have some concerns that -ftrapping-math has a partial implementation in place > that doesn't seem to be well aligned

[PATCH] D54760: [clangd] Cleanup: make the diags callback global in TUScheduler

2018-11-20 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added a comment. The tests still model the old callbacks using callbacks, unfortunately I see no good way to test same things in any other way. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D54760 ___ cfe-commits

[PATCH] D54760: [clangd] Cleanup: make the diags callback global in TUScheduler

2018-11-20 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov created this revision. ilya-biryukov added a reviewer: sammccall. Herald added subscribers: kadircet, arphaman, jkorous, MaskRay, ioeric, javed.absar. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D54760 Files: clangd/ClangdServer.cpp clangd/ClangdServer.h

[PATCH] D53157: Teach the IRBuilder about constrained fadd and friends

2018-11-20 Thread Ulrich Weigand via Phabricator via cfe-commits
uweigand added a comment. OK, let me try to expand on my point 3 above, which appears to have confused everybody :-) First, let's distinguish two separate requirements: those on floating-point operations that explicitly run in regions with non-default control modes, and those on

r347322 - [NFC] Remove MS line endings in diagnostics file.

2018-11-20 Thread Erich Keane via cfe-commits
Author: erichkeane Date: Tue Nov 20 08:32:46 2018 New Revision: 347322 URL: http://llvm.org/viewvc/llvm-project?rev=347322=rev Log: [NFC] Remove MS line endings in diagnostics file. Change-Id: I74704acf052e2e8fe707f18230bc5655c2bf2a91 Modified:

[PATCH] D54675: [AST] Store the expressions in ParenListExpr in a trailing array

2018-11-20 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL347320: [AST] Store the expressions in ParenListExpr in a trailing array (authored by brunoricci, committed by ). Herald added a subscriber: llvm-commits. Changed prior to commit:

[PATCH] D54675: [AST] Store the expressions in ParenListExpr in a trailing array

2018-11-20 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC347320: [AST] Store the expressions in ParenListExpr in a trailing array (authored by brunoricci, committed by ). Repository: rC Clang https://reviews.llvm.org/D54675 Files:

r347320 - [AST] Store the expressions in ParenListExpr in a trailing array

2018-11-20 Thread Bruno Ricci via cfe-commits
Author: brunoricci Date: Tue Nov 20 08:20:40 2018 New Revision: 347320 URL: http://llvm.org/viewvc/llvm-project?rev=347320=rev Log: [AST] Store the expressions in ParenListExpr in a trailing array Use the newly available space in the bit-fields of Stmt and store the expressions in a trailing

[PATCH] D54757: [clang-tidy] new check: bugprone-branch-clone

2018-11-20 Thread Donát Nagy via Phabricator via cfe-commits
donat.nagy created this revision. donat.nagy added reviewers: alexfh, hokein, aaron.ballman, xazax.hun, whisperity. Herald added subscribers: cfe-commits, gamesh411, Szelethus, dkrupp, rnkovacs, mgorny. Implement a check for detecting if/else if/else chains where two or more branches are Type I

r347319 - [AST][NFC] Factor out some repeated code in ArraySubscriptExpr.

2018-11-20 Thread Bruno Ricci via cfe-commits
Author: brunoricci Date: Tue Nov 20 08:09:45 2018 New Revision: 347319 URL: http://llvm.org/viewvc/llvm-project?rev=347319=rev Log: [AST][NFC] Factor out some repeated code in ArraySubscriptExpr. Factor out the test for whether the LHS is the base of the array subscript expression into a private

r347317 - [AST][NFC] Pack ArraySubscriptExpr

2018-11-20 Thread Bruno Ricci via cfe-commits
Author: brunoricci Date: Tue Nov 20 08:03:33 2018 New Revision: 347317 URL: http://llvm.org/viewvc/llvm-project?rev=347317=rev Log: [AST][NFC] Pack ArraySubscriptExpr Use the newly available space in the bit-fields of Stmt. This saves one pointer per ArraySubscriptExpr. Modified:

[PATCH] D54756: [DebugInfo] NFC Clang test changes for DISubprogram flags

2018-11-20 Thread Paul Robinson via Phabricator via cfe-commits
probinson created this revision. probinson added reviewers: dblaikie, aprantl. probinson added a project: debug-info. Herald added a subscriber: eraman. See https://reviews.llvm.org/D54755 Repository: rC Clang https://reviews.llvm.org/D54756 Files:

[PATCH] D53157: Teach the IRBuilder about constrained fadd and friends

2018-11-20 Thread Kevin P. Neal via Phabricator via cfe-commits
kpn added a comment. In https://reviews.llvm.org/D53157#1303398, @cameron.mcinally wrote: > If we all agree upon that, then we simply have to treat the functions that > modify the FPEnv, e.g. fesetexcept(...), as barriers. That way it does not > matter if a FENV_ACCESS=OFF function is

[PATCH] D54704: [clang-tidy] Don't generate incorrect fixes for class constructed from list-initialized arguments

2018-11-20 Thread Haojian Wu via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL347315: [clang-tidy] Dont generate incorrect fixes for class constructed from list… (authored by hokein, committed by ). Herald added a subscriber: llvm-commits. Repository: rL LLVM

[clang-tools-extra] r347315 - [clang-tidy] Don't generate incorrect fixes for class constructed from list-initialized arguments

2018-11-20 Thread Haojian Wu via cfe-commits
Author: hokein Date: Tue Nov 20 07:45:15 2018 New Revision: 347315 URL: http://llvm.org/viewvc/llvm-project?rev=347315=rev Log: [clang-tidy] Don't generate incorrect fixes for class constructed from list-initialized arguments Summary: Currently the smart_ptr check (modernize-make-unique)

[PATCH] D54704: [clang-tidy] Don't generate incorrect fixes for class constructed from list-initialized arguments

2018-11-20 Thread Haojian Wu via Phabricator via cfe-commits
hokein added a comment. In https://reviews.llvm.org/D54704#1304176, @aaron.ballman wrote: > > Currently the smart_ptr check (modernize-make-unique) generates the fixes > > that cannot compile for cases like below -- because brace list can not be > > deduced in make_unique. > > > > class Bar

[PATCH] D54704: [clang-tidy] Don't generate incorrect fixes for class constructed from list-initialized arguments

2018-11-20 Thread Haojian Wu via Phabricator via cfe-commits
hokein updated this revision to Diff 174771. hokein marked 2 inline comments as done. hokein added a comment. address comments. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D54704 Files: clang-tidy/modernize/MakeSmartPtrCheck.cpp test/clang-tidy/modernize-make-unique.cpp

[PATCH] D52276: [clangd] Add type boosting in code completion

2018-11-20 Thread Sam McCall via Phabricator via cfe-commits
sammccall added inline comments. Comment at: clangd/Quality.cpp:373 + if (TypeMatchesPreferred) +Score *= 2.0; + is 2 really enough? Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D52276 ___

[PATCH] D52276: [clangd] Add type boosting in code completion

2018-11-20 Thread Sam McCall via Phabricator via cfe-commits
sammccall added inline comments. Comment at: clangd/Quality.h:98 + /// Whether the item matches the type expected in the completion context. + bool TypeMatchesPreferred = false; /// FIXME: unify with index proximity score - signals should be you've inserted

Re: r347294 - Use is.constant intrinsic for __builtin_constant_p

2018-11-20 Thread Nico Weber via cfe-commits
I reverted this in r347314 for breaking many bots on lab.llvm.org:8011/console I've also put a standalone repro at https://bugs.chromium.org/p/chromium/issues/detail?id=907099#c2. On Tue, Nov 20, 2018 at 3:56 AM Bill Wendling via cfe-commits < cfe-commits@lists.llvm.org> wrote: > Author: void >

r347314 - Revert 347294, it turned many bots on lab.llvm.org:8011/console red.

2018-11-20 Thread Nico Weber via cfe-commits
Author: nico Date: Tue Nov 20 07:27:43 2018 New Revision: 347314 URL: http://llvm.org/viewvc/llvm-project?rev=347314=rev Log: Revert 347294, it turned many bots on lab.llvm.org:8011/console red. Modified: cfe/trunk/include/clang/AST/Expr.h cfe/trunk/lib/AST/ASTImporter.cpp

r347312 - Update the documentation for attribute feature tests.

2018-11-20 Thread Aaron Ballman via cfe-commits
Author: aaronballman Date: Tue Nov 20 07:23:07 2018 New Revision: 347312 URL: http://llvm.org/viewvc/llvm-project?rev=347312=rev Log: Update the documentation for attribute feature tests. This clarifies that __has_cpp_attribute is no longer always an extension since it's now available in C++2a.

[PATCH] D52274: [clangd] Collect and store expected types in the index

2018-11-20 Thread Sam McCall via Phabricator via cfe-commits
sammccall added inline comments. Comment at: clangd/index/Index.cpp:118 +static void own(Symbol , UniqueStringSaver , +BumpPtrAllocator ) { visitStrings(S, [&](StringRef ) { V = Strings.save(V); }); why these changes?

[PATCH] D47360: Implement as a copy of .

2018-11-20 Thread Arthur O'Dwyer via Phabricator via cfe-commits
Quuxplusone added a comment. Herald added subscribers: libcxx-commits, jfb. @ericwf ping? (and https://reviews.llvm.org/D47344 https://reviews.llvm.org/D47111 https://reviews.llvm.org/D47358) Repository: rCXX libc++ https://reviews.llvm.org/D47360

[PATCH] D54565: Introduce `-Wc++14-compat-ctad` as a subgroup of `-Wc++14-compat`

2018-11-20 Thread Arthur O'Dwyer via Phabricator via cfe-commits
Quuxplusone added a comment. @lebedev.ri ping? Repository: rC Clang https://reviews.llvm.org/D54565 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D54450: Get the correct range of tokens for preprocessor conditions

2018-11-20 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. Ping. https://reviews.llvm.org/D54450 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D52695: [clang][Parse] Diagnose useless null statements (PR39111)

2018-11-20 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman accepted this revision. aaron.ballman added a comment. This revision is now accepted and ready to land. Aside from some small nits, LGTM! Comment at: docs/ReleaseNotes.rst:53 +- ``-Wextra-semi-stmt`` is a new diagnostic, which is, much like + ``-Wextra-semi``,

[PATCH] D52273: [clangd] Initial implementation of expected types

2018-11-20 Thread Sam McCall via Phabricator via cfe-commits
sammccall added inline comments. Comment at: clangd/ExpectedTypes.h:32 +/// this allows the representation to be stored in the index and compared with +/// types coming from a different AST later. +class OpaqueType { ilya-biryukov wrote: > sammccall wrote: > >

[PATCH] D54704: [clang-tidy] Don't generate incorrect fixes for class constructed from list-initialized arguments

2018-11-20 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman accepted this revision. aaron.ballman added a comment. This revision is now accepted and ready to land. > Currently the smart_ptr check (modernize-make-unique) generates the fixes > that cannot compile for cases like below -- because brace list can not be > deduced in make_unique.

[PATCH] D54753: [clang-format] JS: don't treat is: as a type matcher

2018-11-20 Thread Krasimir Georgiev via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC347307: [clang-format] JS: dont treat is: as a type matcher (authored by krasimir, committed by ). Changed prior to commit: https://reviews.llvm.org/D54753?vs=174759=174764#toc Repository: rC Clang

r347307 - [clang-format] JS: don't treat is: as a type matcher

2018-11-20 Thread Krasimir Georgiev via cfe-commits
Author: krasimir Date: Tue Nov 20 06:22:43 2018 New Revision: 347307 URL: http://llvm.org/viewvc/llvm-project?rev=347307=rev Log: [clang-format] JS: don't treat is: as a type matcher Summary: Clang-format is treating all occurences of `is` in js as type matchers. In some cases this is wrong, as

[PATCH] D53702: [ASTImporter] Set redecl chain of functions before any other import

2018-11-20 Thread Gabor Marton via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC347306: [ASTImporter] Set redecl chain of functions before any other import (authored by martong, committed by ). Changed prior to commit: https://reviews.llvm.org/D53702?vs=171093=174763#toc

r347306 - [ASTImporter] Set redecl chain of functions before any other import

2018-11-20 Thread Gabor Marton via cfe-commits
Author: martong Date: Tue Nov 20 06:19:39 2018 New Revision: 347306 URL: http://llvm.org/viewvc/llvm-project?rev=347306=rev Log: [ASTImporter] Set redecl chain of functions before any other import Summary: FunctionDecl import starts with a lookup and then we create a new Decl. Then in case of

[PATCH] D54560: [analyzer] MoveChecker Pt.3: Improve warning messages a bit.

2018-11-20 Thread Csaba Dabis via Phabricator via cfe-commits
Charusso added a comment. In https://reviews.llvm.org/D54560#1301870, @NoQ wrote: > Write down full messages in tests. When the message was updated from `'x' is > moved'` to `Object 'x' is moved`, the tests were not updated because they > kept passing because the former is still a sub-string

[PATCH] D54745: [clang-tidy] Don't generate incorrect fixes for class with deleted copy constructor in smart_ptr check.

2018-11-20 Thread Haojian Wu via Phabricator via cfe-commits
hokein added a comment. Thanks for the review. In https://reviews.llvm.org/D54745#1303972, @JonasToth wrote: > Does make_unique require the copy constructor if it could move? No, in that case, move constructor will be used. I have updated the patch to include these cases. > And would the

[PATCH] D54745: [clang-tidy] Don't generate incorrect fixes for class with deleted copy constructor in smart_ptr check.

2018-11-20 Thread Haojian Wu via Phabricator via cfe-commits
hokein updated this revision to Diff 174760. hokein marked 2 inline comments as done. hokein added a comment. Address review comments, handle move constructor as well. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D54745 Files: clang-tidy/modernize/MakeSmartPtrCheck.cpp

[PATCH] D54753: [clang-format] JS: don't treat is: as a type matcher

2018-11-20 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir created this revision. Herald added a subscriber: cfe-commits. Clang-format is treating all occurences of `is` in js as type matchers. In some cases this is wrong, as it might be a dict key. Repository: rC Clang https://reviews.llvm.org/D54753 Files: lib/Format/TokenAnnotator.cpp

[PATCH] D53076: [analyzer] Enhance ConditionBRVisitor to write out more information

2018-11-20 Thread Csaba Dabis via Phabricator via cfe-commits
Charusso added inline comments. Comment at: test/Analysis/diagnostics/macros.cpp:33 void testDoubleMacro(double d) { - if (d == DBL_MAX) { // expected-note {{Taking true branch}} + if (d == DBL_MAX) { // expected-note {{Assuming 'd' is equal to DBL_MAX}} +

  1   2   >