[PATCH] D72463: [Driver][X86] Add -malign-branch* and -malign-branch-within-32B-boundaries

2020-01-10 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay updated this revision to Diff 237251. MaskRay added a comment. -malign-branch-boundary= is the primary option. So swap the roles Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D72463/new/ https://reviews.llvm.org/D72463 Files: clang/includ

[clang-tools-extra] 164da67 - Restore order in clang-tidy section of release notes

2020-01-10 Thread Hans Wennborg via cfe-commits
Author: Hans Wennborg Date: 2020-01-10T09:19:58+01:00 New Revision: 164da673009ba6c100ce45b6fa9a5dfd3b0b8e38 URL: https://github.com/llvm/llvm-project/commit/164da673009ba6c100ce45b6fa9a5dfd3b0b8e38 DIFF: https://github.com/llvm/llvm-project/commit/164da673009ba6c100ce45b6fa9a5dfd3b0b8e38.diff

[PATCH] D72450: [clangd] Improve type printing in hover

2020-01-10 Thread Sam McCall via Phabricator via cfe-commits
sammccall accepted this revision. sammccall added a comment. This revision is now accepted and ready to land. Nice! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D72450/new/ https://reviews.llvm.org/D72450

[PATCH] D72463: [Driver][X86] Add -malign-branch* and -malign-branch-within-32B-boundaries

2020-01-10 Thread pre-merge checks [bot] via Phabricator via cfe-commits
merge_guards_bot added a comment. {icon check-circle color=green} Unit tests: pass. 61743 tests passed, 0 failed and 780 were skipped. {icon times-circle color=red} clang-tidy: fail. Please fix clang-tidy findings

[PATCH] D72463: [Driver][X86] Add -malign-branch* and -malign-branch-within-32B-boundaries

2020-01-10 Thread Kan Shengchen via Phabricator via cfe-commits
skan added a comment. In D72227 you wrote > I think options should follow these principles: > > 1. Different options are position independent. -mA -mB should be the same as > -mB -mA. > 2. -mA and -mno-A are position dependent and the last one wins. Sometimes,

[PATCH] D72463: [Driver][X86] Add -malign-branch* and -malign-branch-within-32B-boundaries

2020-01-10 Thread Kan Shengchen via Phabricator via cfe-commits
skan added a comment. Add revison D72225 as parent? Comment at: clang/lib/Driver/ToolChains/Clang.cpp:2028 +if (Value.getAsInteger(10, AlignBranchBoundary) || +AlignBranchBoundary < 16 || !llvm::isPowerOf2_64(AlignBranchBoundary)) +

[PATCH] D71082: Allow system header to provide their own implementation of some builtin

2020-01-10 Thread serge via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG921f871ac438: Allow system header to provide their own implementation of some builtin (authored by serge-sans-paille). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.ll

[PATCH] D72463: [Driver][X86] Add -malign-branch* and -malign-branch-within-32B-boundaries

2020-01-10 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay updated this revision to Diff 237253. MaskRay marked 5 inline comments as done. MaskRay added a comment. Delete a `AlignBranch = StringRef()` Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D72463/new/ https://reviews.llvm.org/D72463 Files:

[clang-tools-extra] ffd0f11 - [clangd] Improve type printing in hover

2020-01-10 Thread Kadir Cetinkaya via cfe-commits
Author: Kadir Cetinkaya Date: 2020-01-10T09:51:20+01:00 New Revision: ffd0f116754c36146bb21a01b047782ce8a01e2e URL: https://github.com/llvm/llvm-project/commit/ffd0f116754c36146bb21a01b047782ce8a01e2e DIFF: https://github.com/llvm/llvm-project/commit/ffd0f116754c36146bb21a01b047782ce8a01e2e.dif

[clang-tools-extra] abfa27e - [clangd] Fix markdown rendering in VSCode

2020-01-10 Thread Kadir Cetinkaya via cfe-commits
Author: Kadir Cetinkaya Date: 2020-01-10T09:51:20+01:00 New Revision: abfa27e4f04dd84774bcfe15783942e21be391a5 URL: https://github.com/llvm/llvm-project/commit/abfa27e4f04dd84774bcfe15783942e21be391a5 DIFF: https://github.com/llvm/llvm-project/commit/abfa27e4f04dd84774bcfe15783942e21be391a5.dif

[PATCH] D72450: [clangd] Improve type printing in hover

2020-01-10 Thread Kadir Cetinkaya via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGffd0f116754c: [clangd] Improve type printing in hover (authored by kadircet). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D72450/new/ https://reviews.llvm.

[PATCH] D72463: [Driver][X86] Add -malign-branch* and -malign-branch-within-32B-boundaries

2020-01-10 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added inline comments. Comment at: clang/lib/Driver/ToolChains/Clang.cpp:2040 +if (Value.getAsInteger(10, AlignBranchBoundary) || +AlignBranchBoundary < 16 || !llvm::isPowerOf2_64(AlignBranchBoundary)) { + D.Diag(diag::err_drv_invalid_argument_to_option)

[PATCH] D72462: [clangd] Fix markdown rendering in VSCode

2020-01-10 Thread Kadir Cetinkaya via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGabfa27e4f04d: [clangd] Fix markdown rendering in VSCode (authored by kadircet). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D72462/new/ https://reviews.llv

[PATCH] D72463: [Driver][X86] Add -malign-branch* and -malign-branch-within-32B-boundaries

2020-01-10 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay marked an inline comment as done. MaskRay added a comment. The commutative property (independence of options) makes option composition easier. clangDriver makes heavy use of `getLastArg` and `hasArg`. Without the commutative property, it would now be able to shuffle code around. The `-m

[PATCH] D72463: [Driver][X86] Add -malign-branch* and -malign-branch-within-32B-boundaries

2020-01-10 Thread pre-merge checks [bot] via Phabricator via cfe-commits
merge_guards_bot added a comment. {icon times-circle color=red} Unit tests: fail. 61741 tests passed, 2 failed and 780 were skipped. failed: Clang.Driver/x86-malign-branch.c failed: Clang.Driver/x86-malign-branch.s {icon times-circle color=red} clang-tidy: fail. Please fix clang-tidy findin

[PATCH] D72463: [Driver][X86] Add -malign-branch* and -malign-branch-within-32B-boundaries

2020-01-10 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. In D72463#1813658 , @skan wrote: > Add revison D72225 as parent? `-x86-align-branch-prefix-size=` does not work without D72225 , but I think the two patches can

[PATCH] D70524: Support DebugInfo generation for auto return type for C++ functions.

2020-01-10 Thread Awanish Pandey via Phabricator via cfe-commits
awpandey updated this revision to Diff 237264. awpandey added a comment. @dblaikie I have added an LLVM test case and I will commit it like a different patch. I have also updated the clang test case. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D70524/new/ https://reviews.llvm.org/D70

[PATCH] D71533: [clangd] Show template arguments in type hierarchy when possible

2020-01-10 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet accepted this revision. kadircet added a comment. This revision is now accepted and ready to land. Thanks, LGTM! Comment at: clang-tools-extra/clangd/XRefs.cpp:715 + if (auto *CTSD = dyn_cast(CXXRD)) { +if (CTSD->isInvalidDecl()) { + CXXRD = CTSD->getSpeciali

[PATCH] D72494: [clangd] Fix targetDecl() on certain usage of ObjC properties.

2020-01-10 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov requested changes to this revision. ilya-biryukov added a comment. This revision now requires changes to proceed. Could you also add a test (and possibly support this in the visitors) for `findExplicitReferences`? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D72494: [clangd] Fix targetDecl() on certain usage of ObjC properties.

2020-01-10 Thread Sam McCall via Phabricator via cfe-commits
sammccall created this revision. sammccall added reviewers: dgoldman, kadircet. Herald added subscribers: cfe-commits, usaxena95, jfb, arphaman, jkorous, MaskRay, ilya-biryukov. Herald added a project: clang. ilya-biryukov requested changes to this revision. ilya-biryukov added a comment. This rev

[clang] e44dedd - [CMake] Support running libc++abi tests in CrossWinToARMLinux cache file

2020-01-10 Thread Sergej Jaskiewicz via cfe-commits
Author: Sergej Jaskiewicz Date: 2020-01-10T12:59:05+03:00 New Revision: e44dedd3631c20bc4a1e62b68919a11168d39354 URL: https://github.com/llvm/llvm-project/commit/e44dedd3631c20bc4a1e62b68919a11168d39354 DIFF: https://github.com/llvm/llvm-project/commit/e44dedd3631c20bc4a1e62b68919a11168d39354.d

[PATCH] D72459: [CMake] Support running libc++abi tests in CrossWinToARMLinux cache file

2020-01-10 Thread Sergej Jaskiewicz via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGe44dedd3631c: [CMake] Support running libc++abi tests in CrossWinToARMLinux cache file (authored by broadwaylamb). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.o

[PATCH] D72494: [clangd] Fix targetDecl() on certain usage of ObjC properties.

2020-01-10 Thread pre-merge checks [bot] via Phabricator via cfe-commits
merge_guards_bot added a comment. {icon check-circle color=green} Unit tests: pass. 61742 tests passed, 0 failed and 780 were skipped. {icon times-circle color=red} clang-tidy: fail. Please fix clang-tidy findings

[PATCH] D71510: [clang][checkers] Added new checker 'error-return-checker'.

2020-01-10 Thread Balázs Kéri via Phabricator via cfe-commits
balazske added a reviewer: NoQ. balazske added a comment. Checker was tested with tmux, no problems found (there are false positives but not easy to fix). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D71510/new/ https://reviews.llvm.org/D71510

[PATCH] D72463: [Driver][X86] Add -malign-branch* and -malign-branch-within-32B-boundaries

2020-01-10 Thread Kan Shengchen via Phabricator via cfe-commits
skan added inline comments. Comment at: clang/lib/Driver/ToolChains/Clang.cpp:2040 +if (Value.getAsInteger(10, AlignBranchBoundary) || +AlignBranchBoundary < 16 || !llvm::isPowerOf2_64(AlignBranchBoundary)) { + D.Diag(diag::err_drv_invalid_argument_to_option) --

[PATCH] D72497: [CodeComplete] Suggest 'return nullptr' in functions returning pointers

2020-01-10 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov created this revision. ilya-biryukov added a reviewer: kadircet. Herald added a project: clang. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D72497 Files: clang/lib/Sema/SemaCodeComplete.cpp clang/test/CodeCompletion/patterns.cpp Index: clang/test/CodeComple

[PATCH] D72496: [ARM,MVE] Make `vqrshrun` generate the right instruction.

2020-01-10 Thread Simon Tatham via Phabricator via cfe-commits
simon_tatham created this revision. simon_tatham added reviewers: dmgreen, MarkMurrayARM, miyuki, ostannard. Herald added subscribers: cfe-commits, kristof.beyls. Herald added a project: clang. A copy-paste error in `arm_mve.td` meant that the MVE `vqrshrun` intrinsic family was generating the `vq

[PATCH] D72497: [CodeComplete] Suggest 'return nullptr' in functions returning pointers

2020-01-10 Thread pre-merge checks [bot] via Phabricator via cfe-commits
merge_guards_bot added a comment. {icon check-circle color=green} Unit tests: pass. 61741 tests passed, 0 failed and 780 were skipped. {icon times-circle color=red} clang-tidy: fail. Please fix clang-tidy findings

[PATCH] D72463: [Driver][X86] Add -malign-branch* and -malign-branch-within-32B-boundaries

2020-01-10 Thread Kan Shengchen via Phabricator via cfe-commits
skan added a comment. In D72463#1813669 , @MaskRay wrote: > The commutative property (independence of options) makes option composition > easier. clangDriver makes heavy use of `getLastArg` and `hasArg`. Without the > commutative property, it would now b

[PATCH] D72463: [Driver][X86] Add -malign-branch* and -malign-branch-within-32B-boundaries

2020-01-10 Thread Kan Shengchen via Phabricator via cfe-commits
skan added inline comments. Comment at: clang/include/clang/Basic/DiagnosticDriverKinds.td:254 +def err_drv_invalid_malign_branch_EQ : Error< + "invalid argument '%0' to -malign-branch=; must be one of: %1">; + skan wrote: > The error information "must be one of

[PATCH] D72496: [ARM,MVE] Make `vqrshrun` generate the right instruction.

2020-01-10 Thread Dave Green via Phabricator via cfe-commits
dmgreen accepted this revision. dmgreen added a comment. This revision is now accepted and ready to land. Yeah, I said these would be tough to read! LGTM Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D72496/new/ https://reviews.llvm.org/D72496 __

[PATCH] D72498: [clangd] Print underlying type for decltypes in hover

2020-01-10 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet created this revision. kadircet added a reviewer: sammccall. Herald added subscribers: cfe-commits, usaxena95, arphaman, jkorous, MaskRay, ilya-biryukov. Herald added a project: clang. Fixes https://github.com/clangd/clangd/issues/249 Repository: rG LLVM Github Monorepo https://revi

[clang] 1ccee0e - [ARM, MVE] Make `vqrshrun` generate the right instruction.

2020-01-10 Thread Simon Tatham via cfe-commits
Author: Simon Tatham Date: 2020-01-10T11:25:05Z New Revision: 1ccee0e86386762bd742fd067391b6c4be089806 URL: https://github.com/llvm/llvm-project/commit/1ccee0e86386762bd742fd067391b6c4be089806 DIFF: https://github.com/llvm/llvm-project/commit/1ccee0e86386762bd742fd067391b6c4be089806.diff LOG:

[PATCH] D72496: [ARM,MVE] Make `vqrshrun` generate the right instruction.

2020-01-10 Thread Simon Tatham via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG1ccee0e86386: [ARM,MVE] Make `vqrshrun` generate the right instruction. (authored by simon_tatham). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D72496/new/

[PATCH] D72498: [clangd] Print underlying type for decltypes in hover

2020-01-10 Thread Sam McCall via Phabricator via cfe-commits
sammccall accepted this revision. sammccall added inline comments. This revision is now accepted and ready to land. Comment at: clang-tools-extra/clangd/Hover.cpp:351 +// TypePrinter doesn't resolve decltypes, so resolve them here. We are going +// to include decltype(X)

[PATCH] D72498: [clangd] Print underlying type for decltypes in hover

2020-01-10 Thread pre-merge checks [bot] via Phabricator via cfe-commits
merge_guards_bot added a comment. {icon check-circle color=green} Unit tests: pass. 61742 tests passed, 0 failed and 780 were skipped. {icon check-circle color=green} clang-tidy: pass. {icon check-circle color=green} clang-format: pass. Build artifacts

[PATCH] D72499: [clangd] (DO NOT COMMIT) hovering on "md" raw strings displays those.

2020-01-10 Thread Sam McCall via Phabricator via cfe-commits
sammccall created this revision. sammccall added a reviewer: kadircet. Herald added subscribers: cfe-commits, usaxena95, arphaman, jkorous, MaskRay, ilya-biryukov. Herald added a project: clang. This is useful for testing markdown rendering in hover of editors. It shoudn't be checked in (it'd be

[PATCH] D72499: [clangd] (DO NOT COMMIT) hovering on "md" raw strings displays those.

2020-01-10 Thread pre-merge checks [bot] via Phabricator via cfe-commits
merge_guards_bot added a comment. {icon check-circle color=green} Unit tests: pass. 61742 tests passed, 0 failed and 780 were skipped. {icon check-circle color=green} clang-tidy: pass. {icon times-circle color=red} clang-format: fail. Please format your changes with clang-format by running `gi

[PATCH] D72494: [clangd] Fix targetDecl() on certain usage of ObjC properties.

2020-01-10 Thread Sam McCall via Phabricator via cfe-commits
sammccall added a comment. In D72494#1813719 , @ilya-biryukov wrote: > Could you also add a test (and possibly support this in the visitors) for > `findExplicitReferences`? I've written tests, but it doesn't work and it's not obvious to me yet how to

[PATCH] D72500: [clangd] Show hower info for expressions

2020-01-10 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet created this revision. kadircet added a reviewer: sammccall. Herald added subscribers: cfe-commits, usaxena95, arphaman, jkorous, MaskRay, ilya-biryukov. Herald added a project: clang. This currently populates only the Name with the expression's type and Value if expression is evaluatabl

[PATCH] D72498: [clangd] Print underlying type for decltypes in hover

2020-01-10 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet updated this revision to Diff 237284. kadircet marked an inline comment as done. kadircet added a comment. - Update comment - Iteratively resolve underlying decltypes. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D72498/new/ https://review

[PATCH] D72494: [clangd] Fix targetDecl() on certain usage of ObjC properties.

2020-01-10 Thread Sam McCall via Phabricator via cfe-commits
sammccall added a comment. In D72494#1813875 , @sammccall wrote: > In D72494#1813719 , @ilya-biryukov > wrote: > > > Could you also add a test (and possibly support this in the visitors) for > > `findExplicitRefer

[PATCH] D72500: [clangd] Show hower info for expressions

2020-01-10 Thread pre-merge checks [bot] via Phabricator via cfe-commits
merge_guards_bot added a comment. {icon question-circle color=gray} Unit tests: unknown. {icon question-circle color=gray} clang-tidy: unknown. {icon question-circle color=gray} clang-format: unknown. Build artifacts : diff

[PATCH] D72498: [clangd] Print underlying type for decltypes in hover

2020-01-10 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added a comment. Could it be the case that we want to show the canonical types (i.e. without all syntax sugar)? Maybe we want both the normal type and the canonical type? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D72498/new/ https

[PATCH] D72498: [clangd] Print underlying type for decltypes in hover

2020-01-10 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added a comment. This does not work for more complicated types, though? E.g. `decltype(a+b)* a` or `vector a`? Why do we prefer to drop `decltype()`, yet show the typedefs? Both could lead to complicated types, arguably decltypes can be even worse than typedefs. Repository: rG

[PATCH] D72498: [clangd] Print underlying type for decltypes in hover

2020-01-10 Thread pre-merge checks [bot] via Phabricator via cfe-commits
merge_guards_bot added a comment. {icon check-circle color=green} Unit tests: pass. 61742 tests passed, 0 failed and 780 were skipped. {icon check-circle color=green} clang-tidy: pass. {icon check-circle color=green} clang-format: pass. Build artifacts

[clang] 57a51b6 - [CodeComplete] Suggest 'return nullptr' in functions returning pointers

2020-01-10 Thread Ilya Biryukov via cfe-commits
Author: Ilya Biryukov Date: 2020-01-10T13:28:13+01:00 New Revision: 57a51b689e7b99c694a028104b0b5a69b80fd002 URL: https://github.com/llvm/llvm-project/commit/57a51b689e7b99c694a028104b0b5a69b80fd002 DIFF: https://github.com/llvm/llvm-project/commit/57a51b689e7b99c694a028104b0b5a69b80fd002.diff

[PATCH] D72497: [CodeComplete] Suggest 'return nullptr' in functions returning pointers

2020-01-10 Thread Ilya Biryukov via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG57a51b689e7b: [CodeComplete] Suggest 'return nullptr' in functions returning pointers (authored by ilya-biryukov). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.o

[PATCH] D71612: [analyzer] Add PlacementNewChecker

2020-01-10 Thread Gabor Marton via Phabricator via cfe-commits
martong updated this revision to Diff 237290. martong added a comment. - Declare ElementCountNL in if stmt - Use makeArrayIndex instead makeIntVal Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D71612/new/ https://reviews.llvm.org/D71612 Files: cl

[PATCH] D71612: [analyzer] Add PlacementNewChecker

2020-01-10 Thread Gabor Marton via Phabricator via cfe-commits
martong marked 2 inline comments as done. martong added a comment. > Can we enable the check by default then? What pieces are missing? Like, the > symbolic extent/offset case is not a must. I think we have everything except > maybe some deeper testing. I'd rather spend some time on the above exe

[PATCH] D44352: [Concepts] Type Constraints

2020-01-10 Thread Saar Raz via Phabricator via cfe-commits
saar.raz added a comment. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D44352/new/ https://reviews.llvm.org/D44352 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bi

[clang] 76e9c2a - [FPEnv] Generate constrained FP comparisons from clang

2020-01-10 Thread Ulrich Weigand via cfe-commits
Author: Ulrich Weigand Date: 2020-01-10T14:33:10+01:00 New Revision: 76e9c2a9870e36415eb343d28942a42296f85597 URL: https://github.com/llvm/llvm-project/commit/76e9c2a9870e36415eb343d28942a42296f85597 DIFF: https://github.com/llvm/llvm-project/commit/76e9c2a9870e36415eb343d28942a42296f85597.diff

[PATCH] D71467: [FPEnv] Generate constrained FP comparisons from clang

2020-01-10 Thread Ulrich Weigand via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG76e9c2a9870e: [FPEnv] Generate constrained FP comparisons from clang (authored by uweigand). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D71467/new/ https:

[PATCH] D72498: [clangd] Print underlying type for decltypes in hover

2020-01-10 Thread Sam McCall via Phabricator via cfe-commits
sammccall added a comment. Yeah we discussed that case offline and I should have mentioned. Resolving this in places other than the top-level would be nice and probably worthy of a comment at least. But this special case seems common enough to be worth having. The only place fully resolving coul

[PATCH] D72500: [clangd] Show hower info for expressions

2020-01-10 Thread Sam McCall via Phabricator via cfe-commits
sammccall added a comment. Basing this on the hover for the type doesn't seem right. e.g. `int` should be the `Type` rather than the `Name`. Rather than printing the value if evaluable, I think we should only show the hover if evaluable. There's a cost to showing it and the value of just the ty

[PATCH] D72448: [clang-tidy] readability-redundant-string-init now flags redundant initialisation in Field Decls and Constructor Initialisers

2020-01-10 Thread Nathan James via Phabricator via cfe-commits
njames93 updated this revision to Diff 237297. njames93 edited the summary of this revision. njames93 added a comment. Checks for string initialisations which are spelt with braces Ensures the check will detect and fix brace initializations Example: std::string a{""}; std::string b = {""}; CxxC

[PATCH] D72498: [clangd] Print underlying type for decltypes in hover

2020-01-10 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet marked an inline comment as not done. kadircet added a comment. In D72498#1813899 , @ilya-biryukov wrote: > This does not work for more complicated types, though? > E.g. `decltype(a+b)* a` or `vector a`? yes, and I think we should have a more

[PATCH] D68720: Support -fstack-clash-protection for x86

2020-01-10 Thread serge via Phabricator via cfe-commits
serge-sans-paille updated this revision to Diff 237298. serge-sans-paille added a comment. Take review into account. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D68720/new/ https://reviews.llvm.org/D68720 Files: clang/docs/ClangCommandLineRefer

[PATCH] D71566: New checks for fortified sprintf

2020-01-10 Thread serge via Phabricator via cfe-commits
serge-sans-paille added a comment. @erik.pilkington up? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D71566/new/ https://reviews.llvm.org/D71566 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D72498: [clangd] Print underlying type for decltypes in hover

2020-01-10 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added a comment. In D72498#1813962 , @sammccall wrote: > It's particularly unclear to me why typeprinter descends into auto but prints > decltype, but Kadir says that seems to be intentional. Also don't see why they choose to have this inc

[PATCH] D68720: Support -fstack-clash-protection for x86

2020-01-10 Thread serge via Phabricator via cfe-commits
serge-sans-paille marked 9 inline comments as done. serge-sans-paille added inline comments. Comment at: clang/lib/CodeGen/CGStmt.cpp:2254 +CGM.getDiags().Report(S.getAsmLoc(), + diag::warn_fe_stack_clash_protection_inline_asm); + } -

[PATCH] D72498: [clangd] Print underlying type for decltypes in hover

2020-01-10 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added a comment. In D72498#1813963 , @kadircet wrote: > I think typedef and decltype have different nature, the latter is a lot more > obscure than the former, that was the reason why I handled decltypes > specifically. I tend to disagree

[PATCH] D72498: [clangd] Print underlying type for decltypes in hover

2020-01-10 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added a comment. In D72498#1813962 , @sammccall wrote: > Maybe we want both the normal type and the canonical type? > > Canonical types are often *really* ugly, especially with STL types (we don't > have the "as written" form). And presentin

[PATCH] D72498: [clangd] Print underlying type for decltypes in hover

2020-01-10 Thread Sam McCall via Phabricator via cfe-commits
sammccall added a comment. I think i'm also comfortable with marking the linked bug as wontfix. It's a contrived example that makes clangd look silly (why decltype(a) instead of int?) but also the user look silly (why hover the variable rather than the decltype?). Real examples are certainly mo

[PATCH] D72378: [clang-tidy] Add `bugprone-reserved-identifier`

2020-01-10 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added a comment. Please rebase from trunk. I sorted Clang-tidy entries in Release Notes and aliases have own subsubsection. Please keep alphabetical order there. Comment at: clang-tools-extra/docs/clang-tidy/checks/cert-dcl51-cpp.rst:6 +cert-dcl51-cpp +=

[PATCH] D72217: [clang-tidy] Added readability-qualified-auto check

2020-01-10 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added a comment. Please rebase from trunk. I sorted Clang-tidy entries in Release Notes and aliases have own subsubsection. Please keep alphabetical order there. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D72217/new/ https://reviews.llvm.org/D72217 _

[PATCH] D72505: [ASTMatchers] extract public matchers from const-analysis into own patch

2020-01-10 Thread Jonas Toth via Phabricator via cfe-commits
JonasToth created this revision. JonasToth added a reviewer: aaron.ballman. Herald added a project: clang. Herald added a subscriber: cfe-commits. JonasToth added a child revision: D54943: [clang-tidy] implement const-transformation for cppcoreguidelines-const-correctness. The analysis for const-

[PATCH] D72276: [clang-format] Add IndentCaseBlocks option

2020-01-10 Thread Nicolas Capens via Phabricator via cfe-commits
capn added a comment. Ping. Please land on my behalf. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D72276/new/ https://reviews.llvm.org/D72276 ___ cfe-commits mailing list cfe-commits@lists.llvm.org ht

[PATCH] D72488: [clang-tidy] Add check for CERT-OOP57-CPP

2020-01-10 Thread Nathan James via Phabricator via cfe-commits
njames93 added inline comments. Comment at: clang-tools-extra/docs/ReleaseNotes.rst:70 +- The 'bugprone-suspicous-constructor-and-assignment' check was renamed to :doc:`cert-not-trivial-types-libc-memory-calls + ` Eugene.Zelenko wrote: > Is this relevant? nop

[PATCH] D72488: [clang-tidy] Add check for CERT-OOP57-CPP

2020-01-10 Thread Nathan James via Phabricator via cfe-commits
njames93 updated this revision to Diff 237315. njames93 marked 4 inline comments as done. njames93 added a comment. Added a way to specify custom mem set copy and compare functions plus nit fixes Can now use the options MemSetNames, MemCpyNames and MemCmpNames to specify custom functions to flag

[clang] cdd05f2 - [NFC] format unittest for ExprMutAnalyzer

2020-01-10 Thread Jonas Toth via cfe-commits
Author: Jonas Toth Date: 2020-01-10T16:10:55+01:00 New Revision: cdd05f2aea3b950a4e2c496175117e6b47b2a050 URL: https://github.com/llvm/llvm-project/commit/cdd05f2aea3b950a4e2c496175117e6b47b2a050 DIFF: https://github.com/llvm/llvm-project/commit/cdd05f2aea3b950a4e2c496175117e6b47b2a050.diff LO

[PATCH] D72488: [clang-tidy] Add check for CERT-OOP57-CPP

2020-01-10 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added a comment. Please describe options in documentation. See other checks documentation as example. Comment at: clang-tools-extra/docs/ReleaseNotes.rst:112 + + This check flags use of the c standard library functions ``memset``, ``memcpy``, + ``memmove``,

[PATCH] D54943: [clang-tidy] implement const-transformation for cppcoreguidelines-const-correctness

2020-01-10 Thread Jonas Toth via Phabricator via cfe-commits
JonasToth updated this revision to Diff 237317. JonasToth added a comment. - fix unit tests for exprmutanalyzer, whitespace was the problem - Merge branch 'master' into feature_transform_const.patch Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D5494

[PATCH] D72508: [clangd] Support pseudo-obj expr, opaque values, and property references in findExplicitReferences()

2020-01-10 Thread Sam McCall via Phabricator via cfe-commits
sammccall marked an inline comment as done. sammccall added inline comments. Comment at: clang-tools-extra/clangd/unittests/FindTargetTests.cpp:570 auto AST = TU.build(); +EXPECT_THAT(AST.getDiagnostics(), ::testing::IsEmpty()) << Code; For consistency

[PATCH] D72508: [clangd] Support pseudo-obj expr, opaque values, and property references in findExplicitReferences()

2020-01-10 Thread Sam McCall via Phabricator via cfe-commits
sammccall created this revision. sammccall added reviewers: ilya-biryukov, dgoldman. Herald added subscribers: cfe-commits, usaxena95, kadircet, jfb, arphaman, jkorous, MaskRay. Herald added a project: clang. sammccall added a parent revision: D72494: [clangd] Fix targetDecl() on certain usage of

[PATCH] D72508: [clangd] Support pseudo-obj expr, opaque values, and property references in findExplicitReferences()

2020-01-10 Thread pre-merge checks [bot] via Phabricator via cfe-commits
merge_guards_bot added a comment. {icon question-circle color=gray} Unit tests: unknown. {icon question-circle color=gray} clang-tidy: unknown. {icon question-circle color=gray} clang-format: unknown. Build artifacts : diff

[PATCH] D72494: [clangd] Fix targetDecl() on certain usage of ObjC properties.

2020-01-10 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet accepted this revision. kadircet added a comment. LGTM, thanks! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D72494/new/ https://reviews.llvm.org/D72494 ___ cfe-commits mailing list cfe-commit

[PATCH] D72414: Add new AST matcher `hasAnyCapture`

2020-01-10 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/include/clang/ASTMatchers/ASTMatchers.h:4056 +/// matches [this](){}; +AST_MATCHER(LambdaExpr, capturesThis) { + for (const LambdaCapture &Capture : Node.captures()) { rhiro wrote: > aaron.ballman wrote: >

[PATCH] D57054: [MachineOutliner][ARM][RFC] Add Machine Outliner support for ARM

2020-01-10 Thread Sam Parker via Phabricator via cfe-commits
samparker added a comment. > Even if you only decrease the size you can have a distance increase due to > aligment constraints Ah... thanks for raising this. I'll look into it. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D57054/new/ https://revi

[PATCH] D72505: [ASTMatchers] extract public matchers from const-analysis into own patch

2020-01-10 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/include/clang/ASTMatchers/ASTMatchers.h:4207-4208 + if (const auto *Call = dyn_cast(&Node)) { +if (const Decl *Callee = Call->getCalleeDecl()) { + if (const auto *Value = dyn_cast(Callee)) { +QualType QT = V

[PATCH] D72217: [clang-tidy] Added readability-qualified-auto check

2020-01-10 Thread Nathan James via Phabricator via cfe-commits
njames93 updated this revision to Diff 237329. njames93 added a comment. Rebase onto trunk Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D72217/new/ https://reviews.llvm.org/D72217 Files: clang-tools-extra/clang-tidy/llvm/LLVMTidyModule.cpp cla

[PATCH] D70568: [Support] Possibly use exception handler in the Crash Recovery Context in the same way as global exceptions

2020-01-10 Thread Hans Wennborg via Phabricator via cfe-commits
hans accepted this revision. hans added a comment. This revision is now accepted and ready to land. Looks good to me. Thanks for pushing this forward! (Only one very minor comment.) Comment at: llvm/unittests/Support/CrashRecoveryTest.cpp:72 + sys::RemoveFileOnSignal(Filename

[clang] bdd88b7 - Add support for __declspec(guard(nocf))

2020-01-10 Thread David Chisnall via cfe-commits
Author: Andrew Paverd Date: 2020-01-10T16:04:12Z New Revision: bdd88b7ed3956534a0a71b1ea2bc88c69d48f9b7 URL: https://github.com/llvm/llvm-project/commit/bdd88b7ed3956534a0a71b1ea2bc88c69d48f9b7 DIFF: https://github.com/llvm/llvm-project/commit/bdd88b7ed3956534a0a71b1ea2bc88c69d48f9b7.diff LOG:

[PATCH] D72167: Add support for __declspec(guard(nocf))

2020-01-10 Thread David Chisnall via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGbdd88b7ed395: Add support for __declspec(guard(nocf)) (authored by ajpaverd, committed by theraven). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D72167/new/

[PATCH] D71612: [analyzer] Add PlacementNewChecker

2020-01-10 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added a comment. In D71612#1813937 , @martong wrote: > I am going to execute the analysis on LLVM/Clang as you suggested, so then > we'll see what the experiment will bring us. And then we could enable it by > default I think. BTW how can we do that?

[PATCH] D72505: [ASTMatchers] extract public matchers from const-analysis into own patch

2020-01-10 Thread Jonas Toth via Phabricator via cfe-commits
JonasToth updated this revision to Diff 237338. JonasToth added a comment. - address review comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D72505/new/ https://reviews.llvm.org/D72505 Files: clang/docs/LibASTMatchersReference.html clang/

[PATCH] D72505: [ASTMatchers] extract public matchers from const-analysis into own patch

2020-01-10 Thread Jonas Toth via Phabricator via cfe-commits
JonasToth marked 3 inline comments as done. JonasToth added inline comments. Comment at: clang/include/clang/ASTMatchers/ASTMatchers.h:4243 + if (FProto) { +QualType ParamType = FProto->getParamType(ParamIndex); +if (ParamMatcher.matches(ParamType, Finder, &P

[PATCH] D70568: [Support] Possibly use exception handler in the Crash Recovery Context in the same way as global exceptions

2020-01-10 Thread Alexandre Ganea via Phabricator via cfe-commits
aganea marked an inline comment as done. aganea added a comment. Thanks for taking the time @hans! Comment at: llvm/unittests/Support/CrashRecoveryTest.cpp:72 + sys::RemoveFileOnSignal(Filename); + llvm::sys::AddSignalHandler(incrementGlobalWithCookie, nullptr); + GlobalInt

[PATCH] D69825: [Clang][Driver] Re-use the calling process instead of creating a new process for the cc1 invocation

2020-01-10 Thread Hans Wennborg via Phabricator via cfe-commits
hans added inline comments. Comment at: clang/tools/driver/driver.cpp:267 + + StringRef SpawnCC1Str = ::getenv("CLANG_SPAWN_CC1"); + if (!SpawnCC1Str.empty()) { aganea wrote: > hans wrote: > > Maybe just do the "!!" thing like for the environment variables abov

[PATCH] D68720: Support -fstack-clash-protection for x86

2020-01-10 Thread Sylvestre Ledru via Phabricator via cfe-commits
sylvestre.ledru added a comment. @craig.topper do you think there is a chance that this change could be part of clang-10 ? Thanks Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D68720/new/ https://reviews.llvm.org/D68720 _

[PATCH] D72498: [clangd] Print underlying type for decltypes in hover

2020-01-10 Thread liu hui via Phabricator via cfe-commits
lh123 added a comment. In D72498#1814008 , @sammccall wrote: > I think i'm also comfortable with marking the linked bug as wontfix. The previous example is just minimal repo. template auto sum(T1 &t1, T2 &t2) ->decltype(t1 + t2)) { ret

[PATCH] D71973: [clang-tidy] Add bugprone-suspicious-memory-comparison check

2020-01-10 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang-tools-extra/clang-tidy/bugprone/SuspiciousMemoryComparisonCheck.cpp:30 + uint64_t ComparedBits, uint64_t &TotalSize) { + const auto IsNotEmptyBase = [](const CXXBaseSpecifier &Base) { +return

[PATCH] D72508: [clangd] Support pseudo-obj expr, opaque values, and property references in findExplicitReferences()

2020-01-10 Thread David Goldman via Phabricator via cfe-commits
dgoldman requested changes to this revision. dgoldman added inline comments. This revision now requires changes to proceed. Comment at: clang-tools-extra/clangd/FindTarget.cpp:624 + /*IsDecl=*/false, + // Select the getter, setter, or @property depending on the

[PATCH] D72494: [clangd] Fix targetDecl() on certain usage of ObjC properties.

2020-01-10 Thread David Goldman via Phabricator via cfe-commits
dgoldman accepted this revision. dgoldman added a comment. LGMT, thanks for fixing Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D72494/new/ https://reviews.llvm.org/D72494 ___ cfe-commits mailing list

[PATCH] D72505: [ASTMatchers] extract public matchers from const-analysis into own patch

2020-01-10 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. LGTM aside from a testing request. Comment at: clang/include/clang/ASTMatchers/ASTMatchers.h:4243 + if (FProto) { +QualType ParamType = FProto->get

[PATCH] D68720: Support -fstack-clash-protection for x86

2020-01-10 Thread Craig Topper via Phabricator via cfe-commits
craig.topper added inline comments. Comment at: clang/lib/CodeGen/CGStmt.cpp:2254 +CGM.getDiags().Report(S.getAsmLoc(), + diag::warn_fe_stack_clash_protection_inline_asm); + } serge-sans-paille wrote: > craig.topper wrote

[PATCH] D54943: [clang-tidy] implement const-transformation for cppcoreguidelines-const-correctness

2020-01-10 Thread Jonas Toth via Phabricator via cfe-commits
JonasToth updated this revision to Diff 237345. JonasToth added a comment. - test if references to pointers are ignored if pointers are ignored as values - add different possible auto constellations - document the problematic cases for 'auto' deductions I think a first pass of review might make s

[clang] 5e7beb0 - [analyzer] Add PlacementNewChecker

2020-01-10 Thread Gabor Marton via cfe-commits
Author: Gabor Marton Date: 2020-01-10T17:59:06+01:00 New Revision: 5e7beb0a4146267f1d65c57543e67ca158aca4aa URL: https://github.com/llvm/llvm-project/commit/5e7beb0a4146267f1d65c57543e67ca158aca4aa DIFF: https://github.com/llvm/llvm-project/commit/5e7beb0a4146267f1d65c57543e67ca158aca4aa.diff

[PATCH] D72378: [clang-tidy] Add `bugprone-reserved-identifier`

2020-01-10 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D72378#1812620 , @logan-5 wrote: > In D72378#1810763 , @aaron.ballman > wrote: > > > This check is missing a whole lot of reserved identifiers. For instance, in > > C++ it is miss

[PATCH] D71612: [analyzer] Add PlacementNewChecker

2020-01-10 Thread Gabor Marton via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG5e7beb0a4146: [analyzer] Add PlacementNewChecker (authored by martong). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D71612/new/ https://reviews.llvm.org/D7

  1   2   3   >