[PATCH] D80079: [clang-format] [NFC] isCpp() is inconsistently used to mean both C++ and Objective C, add language specific isXXX() functions

2020-05-18 Thread Sam McCall via Phabricator via cfe-commits
sammccall added inline comments. Comment at: clang/include/clang/Format/Format.h:1632 + bool isCppOnly() const { return Language == LK_Cpp; } + bool isObjectiveC() const { return Language == LK_ObjC; } + bool isCpp() const { return isCppOnly() || isObjectiveC(); }

[PATCH] D79862: [clangd-remote] Replace YAML serialization with proper Protobuf messages

2020-05-18 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev updated this revision to Diff 264554. kbobyrev added a comment. Inline HeaderCode and MainCode. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D79862/new/ https://reviews.llvm.org/D79862 Files:

[PATCH] D79862: [clangd-remote] Replace YAML serialization with proper Protobuf messages

2020-05-18 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev updated this revision to Diff 264553. kbobyrev added a comment. Don't complicate SymbolCollectorTest, use TestTU. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D79862/new/ https://reviews.llvm.org/D79862 Files:

[PATCH] D79961: [PGO] Fix computation of fuction Hash

2020-05-18 Thread Hans Wennborg via Phabricator via cfe-commits
hans added a comment. Nice fix, and nice test :-) May I ask how you found this? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D79961/new/ https://reviews.llvm.org/D79961 ___ cfe-commits mailing list

[PATCH] D79704: [Analyzer] [NFC] Parameter Regions

2020-05-18 Thread Balogh , Ádám via Phabricator via cfe-commits
baloghadamsoftware marked an inline comment as done. baloghadamsoftware added a comment. In D79704#2040798 , @NoQ wrote: > > It turns out that parameter regions are never created for functions without > > `Decl` because of the first lines in > >

[PATCH] D79325: [clang-format] [PR42164] Add Option to Break before While

2020-05-18 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir accepted this revision. krasimir added a comment. This revision is now accepted and ready to land. Thank you! CHANGES SINCE LAST ACTION https://reviews.llvm.org/D79325/new/ https://reviews.llvm.org/D79325 ___ cfe-commits mailing list

[PATCH] D80079: [clang-format] [NFC] isCpp() is inconsistently used to mean both C++ and Objective C, add language specific isXXX() functions

2020-05-18 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay added a comment. - I personally find the current form (Style.Language == LK_XXX) very verbose and difficult to read, especially when its in the middle of a large clause. - Its clear to me that isCpp() is not understood, its name doesn't quite suggest what it does and as such

[PATCH] D79961: [PGO] Fix computation of fuction Hash

2020-05-18 Thread serge via Phabricator via cfe-commits
serge-sans-paille updated this revision to Diff 264552. serge-sans-paille edited the summary of this revision. serge-sans-paille added a comment. Updated summary + removed namespace. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D79961/new/

[PATCH] D80109: [AST][RecoveryExpr] Preserve type for broken member call expr.

2020-05-18 Thread Haojian Wu via Phabricator via cfe-commits
hokein created this revision. hokein added a reviewer: sammccall. Herald added a project: clang. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D80109 Files: clang/lib/Sema/SemaOverload.cpp clang/test/AST/ast-dump-recovery.cpp Index: clang/test/AST/ast-dump-recovery.cpp

[PATCH] D79950: [clangd] Avoid wasteful data structures in RefSlab::Builder

2020-05-18 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev accepted this revision. kbobyrev added a comment. This revision is now accepted and ready to land. LGTM with a couple of nits. Thank you for the patch, this is a good idea! Comment at: clang-tools-extra/clangd/index/Ref.cpp:11 +#include "llvm/ADT/STLExtras.h"

[PATCH] D76077: [ARM] Add __bf16 as new Bfloat16 C Type

2020-05-18 Thread Ties Stuij via Phabricator via cfe-commits
stuij updated this revision to Diff 264560. stuij added a comment. addressing review comments and adding Simon Tatham to contributers Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D76077/new/ https://reviews.llvm.org/D76077 Files:

[PATCH] D80079: [clang-format] [NFC] isCpp() is inconsistently used to mean both C++ and Objective C, add language specific isXXX() functions

2020-05-18 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay marked 2 inline comments as done. MyDeveloperDay added inline comments. Comment at: clang/lib/Format/TokenAnnotator.cpp:3443 - Style.Language == FormatStyle::LK_TextProto) { + } else if (Style.isCpp() || Style.isProtoBuf() || Style.isTableGen() || +

[PATCH] D76077: [ARM] Add __bf16 as new Bfloat16 C Type

2020-05-18 Thread Ties Stuij via Phabricator via cfe-commits
stuij updated this revision to Diff 264562. stuij added a comment. redo: addressing review comments and adding Simon Tatham to contributers Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D76077/new/ https://reviews.llvm.org/D76077 Files:

[PATCH] D80109: [AST][RecoveryExpr] Preserve type for broken member call expr.

2020-05-18 Thread Haojian Wu via Phabricator via cfe-commits
hokein marked an inline comment as done. hokein added inline comments. Comment at: clang/lib/Sema/SemaOverload.cpp:14105 case OR_No_Viable_Function: CandidateSet.NoteCandidates( It is a bit sad that the broken function call cases (too many/few

[clang-tools-extra] 4f0cc10 - [NFC][clang-tidy] use hasOperands in place of hasEitherOperand

2020-05-18 Thread Nathan James via cfe-commits
Author: Nathan James Date: 2020-05-18T10:11:22+01:00 New Revision: 4f0cc10bf5d0009a9d00565fedb34933c2adf8f6 URL: https://github.com/llvm/llvm-project/commit/4f0cc10bf5d0009a9d00565fedb34933c2adf8f6 DIFF: https://github.com/llvm/llvm-project/commit/4f0cc10bf5d0009a9d00565fedb34933c2adf8f6.diff

[PATCH] D79992: [WIP][clangd] Patch PP directives to use stale preambles while building ASTs

2020-05-18 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet updated this revision to Diff 264567. kadircet added a comment. - Only store defines - Make use of source text directly instead of printing tokens Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D79992/new/ https://reviews.llvm.org/D79992

[PATCH] D80025: [ASTMatcher] Correct memoization bug ignoring direction (descendants or ancestors)

2020-05-18 Thread Nathan James via Phabricator via cfe-commits
njames93 added a comment. This needs rebasing against trunk Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D80025/new/ https://reviews.llvm.org/D80025 ___ cfe-commits mailing list

[PATCH] D80025: [ASTMatcher] Correct memoization bug ignoring direction (descendants or ancestors)

2020-05-18 Thread Manuel Klimek via Phabricator via cfe-commits
klimek added inline comments. Comment at: clang/lib/ASTMatchers/ASTMatchFinder.cpp:46-49 +enum class MatchDirection { + Ancestors, + Descendants +}; Nice find! Why don't we need more states though? 1. wouldn't hasParent() followed by a hasAncestor() also

[clang-tools-extra] 968d293 - [clang-tidy] NFC: Cleanup Python scripts

2020-05-18 Thread Kirill Bobyrev via cfe-commits
Author: Kirill Bobyrev Date: 2020-05-18T12:21:27+02:00 New Revision: 968d293063bc008ff93ff8fcf363039ce61574a2 URL: https://github.com/llvm/llvm-project/commit/968d293063bc008ff93ff8fcf363039ce61574a2 DIFF:

[PATCH] D79330: [Analyzer][VLASizeChecker] Check for VLA size overflow.

2020-05-18 Thread Balázs Kéri via Phabricator via cfe-commits
balazske updated this revision to Diff 264572. balazske added a comment. Rebase, added checker name to overflow test. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D79330/new/ https://reviews.llvm.org/D79330 Files:

[PATCH] D78985: [clang-tidy] NFC: Cleanup Python scripts

2020-05-18 Thread Kirill Bobyrev via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG968d293063bc: [clang-tidy] NFC: Cleanup Python scripts (authored by kbobyrev). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D78985/new/

[PATCH] D80115: [clang-format] [PR45816] Add AlignConsecutiveBitFields

2020-05-18 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay created this revision. MyDeveloperDay added reviewers: krasimir, mitchell-stellar, JakeMerdichAMD, curdeius, owenpan. MyDeveloperDay added projects: clang, clang-format. MyDeveloperDay updated this revision to Diff 264575. MyDeveloperDay added a comment. MyDeveloperDay edited the

[PATCH] D80115: [clang-format] [PR45816] Add AlignConsecutiveBitFields

2020-05-18 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay updated this revision to Diff 264575. MyDeveloperDay added a comment. clang-format CHANGES SINCE LAST ACTION https://reviews.llvm.org/D80115/new/ https://reviews.llvm.org/D80115 Files: clang/docs/ClangFormatStyleOptions.rst clang/docs/ReleaseNotes.rst

[PATCH] D76793: [Matrix] Implement + and - operators for MatrixType.

2020-05-18 Thread Florian Hahn via Phabricator via cfe-commits
fhahn added a comment. ping :) this patch should be ready to be reviewed independently (it's marked as dependent on D76791 in Phab, but it can be applied independently and changing the relationship in Phab will trigger a bunch of unnecessary emails)

[clang] a6a237f - [OpenCL] Added addrspace_cast operator in C++ mode.

2020-05-18 Thread Anastasia Stulova via cfe-commits
Author: Anastasia Stulova Date: 2020-05-18T12:07:54+01:00 New Revision: a6a237f2046ad8993db30481c8b61aeb2f73a5ad URL: https://github.com/llvm/llvm-project/commit/a6a237f2046ad8993db30481c8b61aeb2f73a5ad DIFF:

[PATCH] D60193: [OpenCL] Added addrspace_cast operator

2020-05-18 Thread Anastasia Stulova via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGa6a237f2046a: [OpenCL] Added addrspace_cast operator in C++ mode. (authored by Anastasia). Herald added a project: clang. Changed prior to commit: https://reviews.llvm.org/D60193?vs=263085=264581#toc

[PATCH] D80016: [analyzer] StdLibraryFunctionsChecker: Add support to lookup types

2020-05-18 Thread Balázs Kéri via Phabricator via cfe-commits
balazske added inline comments. Comment at: clang/lib/StaticAnalyzer/Checkers/StdLibraryFunctionsChecker.cpp:747 + : *FilePtrTy) +: None; + The `Optional` can be left out from the right side expressions (in the `?`

[clang] 87b235d - Turn -Wmax-tokens off by default

2020-05-18 Thread Hans Wennborg via cfe-commits
Author: Hans Wennborg Date: 2020-05-18T13:21:46+02:00 New Revision: 87b235db63a3d8d5b82d60ef6202b92b94a7d9d2 URL: https://github.com/llvm/llvm-project/commit/87b235db63a3d8d5b82d60ef6202b92b94a7d9d2 DIFF: https://github.com/llvm/llvm-project/commit/87b235db63a3d8d5b82d60ef6202b92b94a7d9d2.diff

[PATCH] D80117: [analyzer] Introduce reasoning about symbolic remainder operator

2020-05-18 Thread Valeriy Savchenko via Phabricator via cfe-commits
vsavchenko created this revision. vsavchenko added reviewers: NoQ, dcoughlin, xazax.hun, ASDenysPetrov. Herald added subscribers: cfe-commits, martong, Charusso, dkrupp, donat.nagy, Szelethus, mikhail.ramalho, a.sidorin, rnkovacs, szepet, baloghadamsoftware. Herald added a project: clang. New

[PATCH] D78442: Create a warning flag for 'warn_conv_*_not_used'

2020-05-18 Thread Ronald Wampler via Phabricator via cfe-commits
rdwampler added a comment. Ping. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D78442/new/ https://reviews.llvm.org/D78442 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D79708: [clang][BFloat] add NEON emitter for bfloat

2020-05-18 Thread Ties Stuij via Phabricator via cfe-commits
stuij updated this revision to Diff 264587. stuij added a comment. adhere to patch attribution conventions Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D79708/new/ https://reviews.llvm.org/D79708 Files: clang/include/clang/Basic/arm_bf16.td

[PATCH] D79711: [ARM][BFloat] Add poly64_t on AArch32.

2020-05-18 Thread Ties Stuij via Phabricator via cfe-commits
stuij updated this revision to Diff 264586. stuij added a comment. adhere to attribution conventions Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D79711/new/ https://reviews.llvm.org/D79711 Files: clang/include/clang/Basic/TargetBuiltins.h

[PATCH] D79710: [clang][BFloat] add create/set/get/dup intrinsics

2020-05-18 Thread Ties Stuij via Phabricator via cfe-commits
stuij updated this revision to Diff 264588. stuij added a comment. adhere to patch attribution conventions: change author to Ties, add all the contributors Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D79710/new/ https://reviews.llvm.org/D79710

[PATCH] D80014: Turn -Wmax-tokens off by default

2020-05-18 Thread Hans Wennborg via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG87b235db63a3: Turn -Wmax-tokens off by default (authored by hans). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D80014/new/ https://reviews.llvm.org/D80014

[PATCH] D79903: FastMathFlags.allowContract should be init from FPFeatures.allowFPContractAcrossStatement

2020-05-18 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added inline comments. Comment at: clang/lib/Frontend/CompilerInvocation.cpp:2943 + if (Opts.FastRelaxedMath) +Opts.setDefaultFPContractMode(LangOptions::FPM_Fast); Opts.HexagonQdsp6Compat = Args.hasArg(OPT_mqdsp6_compat); mibintc wrote: >

[PATCH] D68115: Zero initialize padding in unions

2020-05-18 Thread Thorsten via Phabricator via cfe-commits
tschuett added a comment. I watched the talk, but I still prefer compile-time errors over runtime crashes. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D68115/new/ https://reviews.llvm.org/D68115 ___

[PATCH] D80025: [ASTMatcher] Correct memoization bug ignoring direction (descendants or ancestors)

2020-05-18 Thread Loïc Joly via Phabricator via cfe-commits
loic-joly-sonarsource updated this revision to Diff 264709. loic-joly-sonarsource added a comment. Take into account transitive/non transitive request Clarify unit tests CHANGES SINCE LAST ACTION https://reviews.llvm.org/D80025/new/ https://reviews.llvm.org/D80025 Files:

[PATCH] D74572: [BPF] preserve debuginfo types for builtin __builtin__btf_type_id()

2020-05-18 Thread David Blaikie via Phabricator via cfe-commits
dblaikie added subscribers: JDevlieghere, probinson, aprantl, echristo, dblaikie. dblaikie added a comment. This seems like a fairly invasive way to preserve certain DWARF types. Are you in a position to make source changes to help here? Would it be reasonable to annotate these types with

[PATCH] D74572: [BPF] preserve debuginfo types for builtin __builtin__btf_type_id()

2020-05-18 Thread David Blaikie via Phabricator via cfe-commits
dblaikie added a comment. I think it'd probably be good to revert this/other patches, and maybe have a design discussion on cfe-dev. Could you do that? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D74572/new/ https://reviews.llvm.org/D74572

[PATCH] D80055: Diagnose union tail padding

2020-05-18 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added a comment. I'm not convinced that this is an especially useful diagnostic (much like with `-Wpadded`), but I'm also not opposed if you are aware of cases where it would be used. It seems worth pointing out that, at least in C, merely assigning to a union member results in all

[PATCH] D79456: [clangd] Complete filenames after < / ".

2020-05-18 Thread Sam McCall via Phabricator via cfe-commits
sammccall updated this revision to Diff 264721. sammccall added a comment. Address comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D79456/new/ https://reviews.llvm.org/D79456 Files: clang-tools-extra/clangd/ClangdLSPServer.cpp

[PATCH] D79456: [clangd] Complete filenames after < / ".

2020-05-18 Thread Sam McCall via Phabricator via cfe-commits
sammccall marked 3 inline comments as done. sammccall added a comment. *finally* getting back to this... Comment at: clang-tools-extra/clangd/CodeComplete.cpp:1922 + Line.consume_front("include") || Line.consume_front("import") || + Line.consume_front("import_next"); +

[PATCH] D80055: Diagnose union tail padding

2020-05-18 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
dexonsmith added inline comments. Comment at: clang/test/CodeGen/union-tail-padding.c:28-36 +union Front { + int i; + long long ll; +}; + +union Front front1; +union Front front2 = {};// expected-warning {{Initializing union 'Front' field 'i' only initializes the

[clang] 9d69072 - [analyzer][NFC] Introduce CXXDeallocatorCall, deploy it in MallocChecker

2020-05-18 Thread Kirstóf Umann via cfe-commits
Author: Kirstóf Umann Date: 2020-05-19T00:18:38+02:00 New Revision: 9d69072fb80755a0029a01c74892b4bf03f20f65 URL: https://github.com/llvm/llvm-project/commit/9d69072fb80755a0029a01c74892b4bf03f20f65 DIFF: https://github.com/llvm/llvm-project/commit/9d69072fb80755a0029a01c74892b4bf03f20f65.diff

[PATCH] D79627: [AST] Fix an assertion violation in FieldDecl::getParent.

2020-05-18 Thread Sam McCall via Phabricator via cfe-commits
sammccall accepted this revision. sammccall added a subscriber: rsmith. sammccall added a comment. This revision is now accepted and ready to land. Sorry for stalling this. This is a sad situation, the API is actively misleading about the invariants. Even the new API isn't very safe:

[PATCH] D80154: [AST] Fix recovery-AST crash: dependent overloaded call exprs are now possible.

2020-05-18 Thread Sam McCall via Phabricator via cfe-commits
sammccall added a comment. (Haha, I tried to send this 5 hours ago and found it waiting for me to confirm that clang-format could add a single space...) Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D80154/new/ https://reviews.llvm.org/D80154

[clang] ef649e8 - Revert "[CUDA][HIP] Workaround for resolving host device function against wrong-sided function"

2020-05-18 Thread Artem Belevich via cfe-commits
Author: Artem Belevich Date: 2020-05-18T12:22:55-07:00 New Revision: ef649e8fd5d1748764a9afca3ce0b80113a6a239 URL: https://github.com/llvm/llvm-project/commit/ef649e8fd5d1748764a9afca3ce0b80113a6a239 DIFF:

[clang-tools-extra] d19265b - [clangd] Avoid wasteful data structures in RefSlab::Builder

2020-05-18 Thread Sam McCall via cfe-commits
Author: Sam McCall Date: 2020-05-18T22:34:59+02:00 New Revision: d19265b31e65c84ad908abce6e7f6e6d15c22258 URL: https://github.com/llvm/llvm-project/commit/d19265b31e65c84ad908abce6e7f6e6d15c22258 DIFF: https://github.com/llvm/llvm-project/commit/d19265b31e65c84ad908abce6e7f6e6d15c22258.diff

[PATCH] D79945: [Sema] Comparison of pointers to complete and incomplete types

2020-05-18 Thread Benson Chu via Phabricator via cfe-commits
pestctrl updated this revision to Diff 264697. pestctrl edited the summary of this revision. pestctrl added a comment. Rebased on top of master Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D79945/new/ https://reviews.llvm.org/D79945 Files:

[PATCH] D79526: [CUDA][HIP] Workaround for resolving host device function against wrong-sided function

2020-05-18 Thread Artem Belevich via Phabricator via cfe-commits
tra added a comment. e03394c6a6ff5832aa43259d4b8345f40ca6a22c Still breaks some of the existing CUDA code (got failures in pytorch and Eigen). I'll revert the patch and will send you a reduced reproducer. Repository: rG

[PATCH] D79862: [clangd-remote] Replace YAML serialization with proper Protobuf messages

2020-05-18 Thread Sam McCall via Phabricator via cfe-commits
sammccall added a comment. Just more stuff about simplifying the tests :-( This is really just about converting between a struct and a proto, if we have to add indexing-related fixtures to shared libraries something seems to have gone a bit off the rails. In the worst case we could just create

[PATCH] D79938: [clangd] Add a flag to preserve type for recovery expression.

2020-05-18 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/CodeComplete.cpp:1072 ParseInput.Contents = std::string(Input.Contents); + // FIXME: setup the recoveryAST and

[PATCH] D79743: [clang][asm goto][slh] Warn if asm goto + SLH

2020-05-18 Thread Zola Bridges via Phabricator via cfe-commits
zbrid marked 3 inline comments as done. zbrid added a comment. > Do you mean runtime crash? If so, I think error should be emit, so that > programmer can remove use of "asm goto" and recompile. This would be a compile time crash. At some point the X86SpeculativeLoadHardening pass in the

[PATCH] D79950: [clangd] Avoid wasteful data structures in RefSlab::Builder

2020-05-18 Thread Sam McCall via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. sammccall marked 2 inline comments as done. Closed by commit rGd19265b31e65: [clangd] Avoid wasteful data structures in RefSlab::Builder (authored by sammccall). Changed prior to commit:

[PATCH] D80025: [ASTMatcher] Correct memoization bug ignoring direction (descendants or ancestors)

2020-05-18 Thread Loïc Joly via Phabricator via cfe-commits
loic-joly-sonarsource added a comment. In D80025#2041247 , @njames93 wrote: > This needs rebasing against trunk I'm doing it Comment at: clang/lib/ASTMatchers/ASTMatchFinder.cpp:46-49 +enum class MatchDirection { + Ancestors, +

[PATCH] D80160: [Tooling] Drop leading/trailing whitespace from compile_flags.txt lines

2020-05-18 Thread Sam McCall via Phabricator via cfe-commits
sammccall created this revision. sammccall added a reviewer: kadircet. Herald added a project: clang. Herald added a subscriber: cfe-commits. These files tend to be hand-authored, and people get very confused. I can't think of any reason that such whitespace would be intended. Repository: rG

[PATCH] D74668: [Clang][BPF] implement __builtin_btf_type_id() builtin function

2020-05-18 Thread David Blaikie via Phabricator via cfe-commits
dblaikie added a comment. (mentioned also on the LLVM side of this D74572 ) If this is in the interests of retaining certain types in the emitted debug info - it seems quite complicated compared to what I'd hope for. Would it be sufficient to support

[PATCH] D80144: [clang-format] @lefticus just taught the world how to use [[unlikely]] but we forgot to teach clang-format

2020-05-18 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay updated this revision to Diff 264717. MyDeveloperDay added a comment. rebase CHANGES SINCE LAST ACTION https://reviews.llvm.org/D80144/new/ https://reviews.llvm.org/D80144 Files: clang/lib/Format/UnwrappedLineParser.cpp clang/unittests/Format/FormatTest.cpp Index:

[clang] e2cc12e - [SveEmitter] Builtins for SVE matrix multiply `mmla`.

2020-05-18 Thread Francesco Petrogalli via cfe-commits
Author: Francesco Petrogalli Date: 2020-05-18T22:02:19Z New Revision: e2cc12e412821b05b4c31b74068976a90f167f1e URL: https://github.com/llvm/llvm-project/commit/e2cc12e412821b05b4c31b74068976a90f167f1e DIFF:

[PATCH] D79526: [CUDA][HIP] Workaround for resolving host device function against wrong-sided function

2020-05-18 Thread Artem Belevich via Phabricator via cfe-commits
tra added a comment. Reduced test case: struct a { __attribute__((device)) a(short); __attribute__((device)) operator unsigned() const; __attribute__((device)) operator int() const; }; struct b { a d; }; void f(b g) { b e = g; } Failure: $ bin/clang++ -x cuda

[PATCH] D79121: Add nomerge function attribute to clang

2020-05-18 Thread Reid Kleckner via Phabricator via cfe-commits
rnk accepted this revision. rnk added a comment. This revision is now accepted and ready to land. I think this looks good and @zequanwu has addressed the concerns of other reviewers. Please wait until Wednesday before pushing in case they raise other concerns. Comment at:

[PATCH] D80153: [AST] Mangle LambdaContextDecl for top level decl

2020-05-18 Thread Zequan Wu via Phabricator via cfe-commits
zequanwu created this revision. zequanwu added reviewers: CaseyCarter, rnk. Herald added a project: clang. Herald added a subscriber: cfe-commits. Bug filed here: https://bugs.llvm.org/show_bug.cgi?id=45213 To resolve it, we could mangle the `LambdaContextDecl` if it is top level decl.

[PATCH] D80154: [AST] Fix recovery-AST crash: dependent overloaded call exprs are now possible.

2020-05-18 Thread Sam McCall via Phabricator via cfe-commits
sammccall created this revision. sammccall added a reviewer: hokein. Herald added a project: clang. Herald added a subscriber: cfe-commits. sammccall added a comment. (Haha, I tried to send this 5 hours ago and found it waiting for me to confirm that clang-format could add a single space...)

[PATCH] D80055: Diagnose union tail padding

2020-05-18 Thread JF Bastien via Phabricator via cfe-commits
jfb marked an inline comment as done. jfb added inline comments. Comment at: clang/test/CodeGen/union-tail-padding.c:28-36 +union Front { + int i; + long long ll; +}; + +union Front front1; +union Front front2 = {};// expected-warning {{Initializing union 'Front'

[PATCH] D72531: Set traversal explicitly where needed in tests

2020-05-18 Thread Stephen Kelly via Phabricator via cfe-commits
steveire marked an inline comment as done. steveire added inline comments. Comment at: clang/unittests/Tooling/StencilTest.cpp:63 ASTContext = AstUnit->getASTContext(); - auto Matches = ast_matchers::match(wrapMatcher(Matcher), Context); + auto Matches =

[PATCH] D79950: [clangd] Avoid wasteful data structures in RefSlab::Builder

2020-05-18 Thread Sam McCall via Phabricator via cfe-commits
sammccall marked 4 inline comments as done. sammccall added inline comments. Comment at: clang-tools-extra/clangd/index/Ref.cpp:11 +#include "llvm/ADT/STLExtras.h" +#include "llvm/Support/Allocator.h" +#include "llvm/Support/StringSaver.h" kbobyrev wrote: > This

[PATCH] D80148: [OPENMP50]Add initial support for 'affinity' clause.

2020-05-18 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert accepted this revision. jdoerfert added a comment. This revision is now accepted and ready to land. LGTM with minor comments. Comment at: clang/lib/Parse/ParseOpenMP.cpp:3458 + EnterScope(Scope::OpenMPDirectiveScope | Scope::DeclScope), +

[PATCH] D79639: [SveEmitter] Builtins for SVE matrix multiply `mmla`.

2020-05-18 Thread Francesco Petrogalli via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGe2cc12e41282: [SveEmitter] Builtins for SVE matrix multiply `mmla`. (authored by fpetrogalli). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D79639/new/

[PATCH] D80041: [clang-format] [PR45198] deletes whitespace inside of a noexcept specifier

2020-05-18 Thread Jake Merdich via Phabricator via cfe-commits
JakeMerdichAMD added a comment. I mainly have concerns with the search for noexcept being too brittle and not looking far enough back. Implementing that may have performance implications though, so I have no issue ignoring that problem if it's proven sufficiently rare. Also: should this do

[PATCH] D72959: Relative VTables ABI on Fuchsia

2020-05-18 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan added inline comments. Comment at: clang/lib/CodeGen/CGVTables.cpp:646 + +// Take offset from stub to the vtable component. +llvm::Function *HiddenFunc = M.getFunction(StubName); rjmccall wrote: > That's not what this block is doing. > > I

[PATCH] D80148: [OPENMP50]Add initial support for 'affinity' clause.

2020-05-18 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev created this revision. ABataev added a reviewer: jdoerfert. Herald added subscribers: llvm-commits, arphaman, guansong, yaxunl. Herald added projects: clang, LLVM. Added parsing/sema/serialization support for affinity clause in task directives. Repository: rG LLVM Github Monorepo

[PATCH] D79434: [analyzer] Generalize bitwise AND rules for ranges

2020-05-18 Thread Valeriy Savchenko via Phabricator via cfe-commits
vsavchenko updated this revision to Diff 264606. vsavchenko added a comment. Rebase Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D79434/new/ https://reviews.llvm.org/D79434 Files: clang/lib/StaticAnalyzer/Core/RangeConstraintManager.cpp

[PATCH] D80015: [Analyzer][StreamChecker] Added support for 'fread' and 'fwrite'.

2020-05-18 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus added a comment. I think the warning about EOF could be a separate patch, and it could be implemented for most stream operations. The patch in large looks great, but I'm just not sure why we handle fwrite so differently. Could you please explain? Comment at:

[PATCH] D80117: [analyzer] Introduce reasoning about symbolic remainder operator

2020-05-18 Thread Valeriy Savchenko via Phabricator via cfe-commits
vsavchenko updated this revision to Diff 264605. vsavchenko added a comment. Rebase Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D80117/new/ https://reviews.llvm.org/D80117 Files: clang/lib/StaticAnalyzer/Core/RangeConstraintManager.cpp

[PATCH] D79967: Fix debug info for NoDebug attr

2020-05-18 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl updated this revision to Diff 264622. yaxunl marked 2 inline comments as done. yaxunl added a comment. Fix the tests and move the logic to CGDebugInfo::EmitFuncDeclForCallSite to make it clearer. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D79967/new/

[PATCH] D80015: [Analyzer][StreamChecker] Added support for 'fread' and 'fwrite'.

2020-05-18 Thread Balázs Kéri via Phabricator via cfe-commits
balazske marked 4 inline comments as done. balazske added a comment. The difference of fread and fwrite comes from the fact that `fwrite` can always succeed, `fread` does not succeed in EOF state. The plan is to add the file functions sequentially. From the currently implemented functions only

[PATCH] D80115: [clang-format] [PR45816] Add AlignConsecutiveBitFields

2020-05-18 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay planned changes to this revision. MyDeveloperDay marked an inline comment as done. MyDeveloperDay added inline comments. Comment at: clang/lib/Format/WhitespaceManager.cpp:588-590 +return C.Tok->Previous->startsSequence(tok::identifier, tok::colon, +

[PATCH] D79905: [clang-format] [PR44476] Add space between template and attribute

2020-05-18 Thread Jake Merdich via Phabricator via cfe-commits
JakeMerdichAMD accepted this revision. JakeMerdichAMD added a comment. This revision is now accepted and ready to land. LGTM CHANGES SINCE LAST ACTION https://reviews.llvm.org/D79905/new/ https://reviews.llvm.org/D79905 ___ cfe-commits mailing

[clang] 1907f28 - [Analyzer][StreamChecker] Fixed compile error - NFC.

2020-05-18 Thread Balázs Kéri via cfe-commits
Author: Balázs Kéri Date: 2020-05-18T17:14:39+02:00 New Revision: 1907f28b47cfe9c951df43309d121679895b0edf URL: https://github.com/llvm/llvm-project/commit/1907f28b47cfe9c951df43309d121679895b0edf DIFF: https://github.com/llvm/llvm-project/commit/1907f28b47cfe9c951df43309d121679895b0edf.diff

[PATCH] D80015: [Analyzer][StreamChecker] Added support for 'fread' and 'fwrite'.

2020-05-18 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus added a comment. In D80015#2041653 , @balazske wrote: > The difference of fread and fwrite comes from the fact that `fwrite` can > always succeed, `fread` does not succeed in EOF state. > The plan is to add the file functions sequentially.

[PATCH] D80015: [Analyzer][StreamChecker] Added support for 'fread' and 'fwrite'.

2020-05-18 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus added a comment. But just to assure you, this patch is practically perfect. I don't think we're going to have any hiccups moving forward with this. Again, thank you for all the patience! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D76077: [ARM] Add __bf16 as new Bfloat16 C Type

2020-05-18 Thread Sjoerd Meijer via Phabricator via cfe-commits
SjoerdMeijer added inline comments. Comment at: clang/include/clang/Basic/DiagnosticSemaKinds.td:8111 "pointer cannot be cast to type %0">; +def err_cast_to_bfloat : Error<"cannot type-cast to __bf16">; +def err_cast_from_bfloat : Error<"cannot type-cast from __bf16">;

[PATCH] D79704: [Analyzer] [NFC] Parameter Regions

2020-05-18 Thread Gabor Marton via Phabricator via cfe-commits
martong added a comment. Wow, this is some nice work and huge effort from all the participants, it was pretty informative to read through. Thanks @baloghadamsoftware and @NoQ for working on this! > This means that we always found a Decl. However, this Decl is not stored but > retrieved always

[PATCH] D68049: Propeller: Clang options for basic block sections

2020-05-18 Thread Sriraman Tallam via Phabricator via cfe-commits
tmsriram added a comment. Ping. Comment at: clang/include/clang/Basic/CodeGenOptions.h:114-127 + // -fbasic-block-sections=. The allowed values with this option are: + // {"labels", "all", "", "none"}. + // + // "labels": Only generate basic block symbols (labels) for

[PATCH] D80109: [AST][RecoveryExpr] Preserve type for broken member call expr.

2020-05-18 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/lib/Sema/SemaOverload.cpp:14083 OverloadCandidateSet::iterator Best; +bool Succeeded = true; switch

[PATCH] D76077: [ARM] Add __bf16 as new Bfloat16 C Type

2020-05-18 Thread Sjoerd Meijer via Phabricator via cfe-commits
SjoerdMeijer added a comment. There are Sema and CodeGen tests, but was wondering if there would be some value in having an AST test too? There are some other types that do have AST tests. Comment at: clang/lib/AST/ASTContext.cpp:2052 + Width =

[PATCH] D80117: [analyzer] Introduce reasoning about symbolic remainder operator

2020-05-18 Thread Valeriy Savchenko via Phabricator via cfe-commits
vsavchenko marked 2 inline comments as done. vsavchenko added inline comments. Comment at: clang/lib/StaticAnalyzer/Core/RangeConstraintManager.cpp:459 +bool CoversTheWholeType = +(Origin.From().isMinSignedValue() || Origin.To().isMaxValue()); + NoQ

[PATCH] D80115: [clang-format] [PR45816] Add AlignConsecutiveBitFields

2020-05-18 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay added a comment. How about I abandon and we use yours (but would you please consider changing the name to be AlignConsecutiveBitFields ) (capital F) as that was in the orignal request CHANGES SINCE LAST ACTION https://reviews.llvm.org/D80115/new/

[PATCH] D80117: [analyzer] Introduce reasoning about symbolic remainder operator

2020-05-18 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added inline comments. Comment at: clang/lib/StaticAnalyzer/Core/RangeConstraintManager.cpp:462 +if (CoversTheWholeType) { + return {ValueFactory.getMinValue(RangeType), + ValueFactory.getMaxValue(RangeType)}; vsavchenko wrote: > NoQ

[PATCH] D79992: [WIP][clangd] Patch PP directives to use stale preambles while building ASTs

2020-05-18 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet updated this revision to Diff 264666. kadircet added a comment. - MacroInfo's definition range is a token range, convert it to a char range. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D79992/new/ https://reviews.llvm.org/D79992 Files:

[PATCH] D75791: [clang-format] Added new option IndentExternBlock

2020-05-18 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay added a comment. I think it needs to be: `LLVMStyle.IndentExternBlock = FormatStyle::IEBS_NoIndent;` I'm wondering if the GNU style also needs `Expanded.IndentExternBlock = FormatStyle::IEBS_Indent;` CHANGES SINCE LAST ACTION https://reviews.llvm.org/D75791/new/

[PATCH] D79895: Add a new warning to warn when passing uninitialized variables as const reference parameters to a function

2020-05-18 Thread Arthur Eubanks via Phabricator via cfe-commits
aeubanks added inline comments. Comment at: clang/include/clang/Basic/DiagnosticSemaKinds.td:2110 +def warn_uninit_const_reference : Warning< + "variable %0 is uninitialized when passes as a const reference parameter " + "here">, InGroup, DefaultIgnore;

[PATCH] D76077: [ARM] Add __bf16 as new Bfloat16 C Type

2020-05-18 Thread Sjoerd Meijer via Phabricator via cfe-commits
SjoerdMeijer added inline comments. Comment at: clang/docs/LanguageExtensions.rst:518 +Clang supports three half-precision (16-bit) floating point types: ``__fp16``, +``_Float16`` and ``__bf16``. These types are supported in all language modes. stuij wrote: >

[PATCH] D79967: Fix debug info for NoDebug attr

2020-05-18 Thread David Blaikie via Phabricator via cfe-commits
dblaikie added subscribers: djtodoro, dexonsmith. dblaikie added a comment. In D79967#2041595 , @yaxunl wrote: > In D79967#2039153 , @dblaikie wrote: > > > Could you check the commit history for this feature and

[PATCH] D80055: Diagnose union tail padding

2020-05-18 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
dexonsmith added inline comments. Comment at: clang/test/CodeGen/union-tail-padding.c:28-36 +union Front { + int i; + long long ll; +}; + +union Front front1; +union Front front2 = {};// expected-warning {{Initializing union 'Front' field 'i' only initializes the

[PATCH] D80117: [analyzer] Introduce reasoning about symbolic remainder operator

2020-05-18 Thread Valeriy Savchenko via Phabricator via cfe-commits
vsavchenko marked an inline comment as done. vsavchenko added inline comments. Comment at: clang/lib/StaticAnalyzer/Core/RangeConstraintManager.cpp:462 +if (CoversTheWholeType) { + return {ValueFactory.getMinValue(RangeType), +

[PATCH] D80117: [analyzer] Introduce reasoning about symbolic remainder operator

2020-05-18 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added inline comments. Comment at: clang/lib/StaticAnalyzer/Core/RangeConstraintManager.cpp:459 +bool CoversTheWholeType = +(Origin.From().isMinSignedValue() || Origin.To().isMaxValue()); + vsavchenko wrote: > NoQ wrote: > > `(Origin.From() +

[PATCH] D80144: [clang-format] @lefticus just taught the world how to use [[unlikely]] but we forgot to teach clang-format

2020-05-18 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay created this revision. MyDeveloperDay added reviewers: krasimir, mitchell-stellar, JakeMerdichAMD, curdeius, lefticus. MyDeveloperDay added projects: clang, clang-format. https://twitter.com/lefticus/status/1262392152950288384?s=20 Jason Turner's (@lefticus) most recent C++

[PATCH] D68049: Propeller: Clang options for basic block sections

2020-05-18 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added a comment. Clang side LG with some minor changes. Comment at: clang/docs/ClangCommandLineReference.rst:1336 + +Generate labels for each basic block or place each basic block or a subset of basic blocks in its own section + This file is

Re: [PATCH] D79595: Fix bugs when an included file name is typo corrected.

2020-05-18 Thread Hans Wennborg via cfe-commits
+thakis who I think fell off the cc list On Thu, May 14, 2020 at 12:51 AM Abhinav Gaba via Phabricator wrote: > > abhinavgaba added inline comments. > > > > Comment at: clang/test/Lexer/case-insensitive-include-win.c:8 > // RUN: touch %t.dir/foo.h > -// RUN: not %clang_cl

  1   2   >