[PATCH] D75447: [clangd] Make use of token buffers in semantic highlighting

2020-03-03 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet updated this revision to Diff 247805. kadircet added a comment. - Use spelledTokenAt Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D75447/new/ https://reviews.llvm.org/D75447 Files: clang-tools-extra/clangd/SemanticHighlighting.cpp Ind

[PATCH] D75503: [clang][Syntax] Add spelledTokenAt helper to TokenBuffer

2020-03-03 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet created this revision. kadircet added a reviewer: sammccall. Herald added a project: clang. Herald added a subscriber: cfe-commits. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D75503 Files: clang/include/clang/Tooling/Syntax/Tokens.h clang/lib/Tooling/Syntax/Token

[PATCH] D75410: [clang-format] Fixed BraceWrapping.AfterExternBlock

2020-03-03 Thread Marcus Johnson via Phabricator via cfe-commits
MarcusJohnson91 abandoned this revision. MarcusJohnson91 added a comment. I'm moving the intended change to a new clang-format option instead of modifying an established one. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D75410/new/ https://reviews.llvm.org/D75410 ___

[PATCH] D75474: [clangd] Get rid of getTokenRange helper

2020-03-03 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet updated this revision to Diff 247808. kadircet added a comment. - Also get rid of the call in collectmacros by using clang::Token's endlocation instead. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D75474/new/ https://reviews.llvm.org/D75

[PATCH] D75503: [clang][Syntax] Add spelledTokenAt helper to TokenBuffer

2020-03-03 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. Thanks for doing this! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D75503/new/ https://reviews.llvm.org/D75503 ___

[PATCH] D75474: [clangd] Get rid of getTokenRange helper

2020-03-03 Thread Sam McCall via Phabricator via cfe-commits
sammccall added inline comments. Comment at: clang-tools-extra/clangd/Hover.cpp:542 + CharSourceRange HighlightRange = + TokensTouchingCursor.front().range(SM).toCharRange(SM); llvm::Optional HI; nit: back() would fit better with the biases elsewhere =

[PATCH] D75356: [Analyzer][StreamChecker] Introduction of stream error state handling.

2020-03-03 Thread Balázs Kéri via Phabricator via cfe-commits
balazske marked 2 inline comments as done. balazske added inline comments. Comment at: clang/lib/StaticAnalyzer/Checkers/StreamChecker.cpp:92-125 +class MakeRetVal { + const CallExpr *CE = nullptr; + std::unique_ptr RetVal; + SymbolRef RetSym; + +public: + MakeRetVal(const Ca

[PATCH] D75356: [Analyzer][StreamChecker] Introduction of stream error state handling.

2020-03-03 Thread Balázs Kéri via Phabricator via cfe-commits
balazske updated this revision to Diff 247814. balazske added a comment. Removed `MakeRetVal`, fixed a bug in evalFseek. `evalFseek` is to be updated further. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D75356/new/ https://reviews.llvm.org/D75356

[PATCH] D75332: [clang-tidy] Add module for llvm-libc and restrict-system-libc-header-check.

2020-03-03 Thread Alex Brachet via Phabricator via cfe-commits
abrachet added inline comments. Comment at: clang-tools-extra/clang-tidy/llvmlibc/RestrictSystemLibcHeadersCheck.cpp:40 +SrcMgr::CharacteristicKind FileType) { + if (SrcMgr::isSystem(FileType)) { +if (!SM.isInMainFile(HashLoc)) { PaulkaToast wrote: > aa

[clang] 0a9fc92 - [Driver] Default to -fno-common for all targets

2020-03-03 Thread Sjoerd Meijer via cfe-commits
Author: Sjoerd Meijer Date: 2020-03-03T09:15:07Z New Revision: 0a9fc9233e172601e26381810d093e02ef410f65 URL: https://github.com/llvm/llvm-project/commit/0a9fc9233e172601e26381810d093e02ef410f65 DIFF: https://github.com/llvm/llvm-project/commit/0a9fc9233e172601e26381810d093e02ef410f65.diff LOG:

[PATCH] D71920: [AST] Refactor propagation of dependency bits. NFC

2020-03-03 Thread Haojian Wu via Phabricator via cfe-commits
hokein updated this revision to Diff 247818. hokein added a comment. - rebase to master - address my comments - added a FIXME about the RequiresExpr Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D71920/new/ https://reviews.llvm.org/D71920 Files:

[PATCH] D71920: [AST] Refactor propagation of dependency bits. NFC

2020-03-03 Thread Haojian Wu via Phabricator via cfe-commits
hokein commandeered this revision. hokein edited reviewers, added: sammccall; removed: hokein. hokein added inline comments. Comment at: clang/lib/AST/TemplateName.cpp:173 +TemplateNameDependence TemplateName::getDependence() const { + auto F = TemplateNameDependence::None; + i

[PATCH] D75467: [instcombine] remove fsub to fneg hacks; only emit fneg

2020-03-03 Thread Simon Moll via Phabricator via cfe-commits
simoll updated this revision to Diff 247820. simoll marked an inline comment as done. simoll added a comment. Herald added a project: clang. Herald added a subscriber: cfe-commits. Thanks for the review! - rebased - fixed clang test - added FIXME for correct DTZ, DAZ handling Repository: rG L

[PATCH] D75056: [Driver] Default to -fno-common for all targets

2020-03-03 Thread Sjoerd Meijer via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG0a9fc9233e17: [Driver] Default to -fno-common for all targets (authored by SjoerdMeijer). Herald added a project: clang. Changed prior to commit: https://reviews.llvm.org/D75056?vs=246917&id=247822#toc

[PATCH] D75467: [instcombine] remove fsub to fneg hacks; only emit fneg

2020-03-03 Thread Simon Moll via Phabricator via cfe-commits
simoll marked an inline comment as done. simoll added inline comments. Comment at: llvm/lib/Transforms/InstCombine/InstCombineAddSub.cpp:2137 + if (match(&I, m_FNeg(m_Value(Op +return UnaryOperator::CreateFNegFMF(Op, &I); cameron.mcinally wrote: > Just

[clang-tools-extra] b2666cc - [clangd] DefineOutline won't copy virtual specifiers on methods

2020-03-03 Thread Nathan James via cfe-commits
Author: Nathan James Date: 2020-03-03T09:59:14Z New Revision: b2666ccca0277371a09e43a0a5a0f78029ba81e5 URL: https://github.com/llvm/llvm-project/commit/b2666ccca0277371a09e43a0a5a0f78029ba81e5 DIFF: https://github.com/llvm/llvm-project/commit/b2666ccca0277371a09e43a0a5a0f78029ba81e5.diff LOG:

[clang] 4e36356 - Revert "[Driver] Default to -fno-common for all targets"

2020-03-03 Thread Sjoerd Meijer via cfe-commits
Author: Sjoerd Meijer Date: 2020-03-03T10:00:36Z New Revision: 4e363563fa149321514389a031fa063e998d7422 URL: https://github.com/llvm/llvm-project/commit/4e363563fa149321514389a031fa063e998d7422 DIFF: https://github.com/llvm/llvm-project/commit/4e363563fa149321514389a031fa063e998d7422.diff LOG:

[PATCH] D75356: [Analyzer][StreamChecker] Introduction of stream error state handling.

2020-03-03 Thread Balázs Kéri via Phabricator via cfe-commits
balazske updated this revision to Diff 247824. balazske marked 2 inline comments as done. balazske added a comment. Updated `StreamState` to include the error state. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D75356/new/ https://reviews.llvm.org/

[PATCH] D73852: [clang] detect switch fallthrough marked by a comment (PR43465)

2020-03-03 Thread Luboš Luňák via Phabricator via cfe-commits
llunak added a comment. In D73852#1901895 , @rsmith wrote: > Thank you, Luboš, and sorry for the process problems here. FWIW, the Clang repository here in Phabricator is still 'Inactive', so even though https://llvm.org/docs/Phabricator.html#requesting

[PATCH] D75474: [clangd] Get rid of getTokenRange helper

2020-03-03 Thread Sam McCall via Phabricator via cfe-commits
sammccall added inline comments. Comment at: clang-tools-extra/clangd/XRefs.cpp:155 const SourceManager &SourceMgr = AST.getSourceManager(); - const FileEntry *F = SourceMgr.getFileEntryForID(SourceMgr.getFileID(TokLoc)); + auto Tok = syntax::tokenize(syntax::FileRange(Sour

[PATCH] D70764: build: reduce CMake handling for zlib

2020-03-03 Thread Hans Wennborg via Phabricator via cfe-commits
hans added a comment. There were some concerns raised on this patch, and also in PR44780. I think at this point it's safer to revert these changes and start over. I've pushed the revert in 916be8fd6a0a0feea4cefcbeb0c22c65848d7a2e

[PATCH] D75429: [clangd] DefineOutline won't copy virtual specifiers on methods

2020-03-03 Thread Nathan James via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGb2666ccca027: [clangd] DefineOutline won't copy virtual specifiers on methods (authored by njames93). Changed prior to commit: https://reviews.llvm.org/D75429?vs=247779&id=247828#toc Repository: rG L

[PATCH] D75465: [clang-format] Do not merge target-name and : for C# attributes

2020-03-03 Thread Jonathan B Coe via Phabricator via cfe-commits
jbcoe added inline comments. Comment at: clang/lib/Format/TokenAnnotator.cpp:391 if (!AttrTok) - return false; + return true; This is needed to avoid ``` [assembly:InternalsVisibleTo("SomeAssembly, PublicKey=SomePublicKeyThatExceedsTheColumnLi

[PATCH] D75465: [clang-format] Do not merge target-name and : for C# attributes

2020-03-03 Thread Jonathan B Coe via Phabricator via cfe-commits
jbcoe updated this revision to Diff 247832. jbcoe marked 2 inline comments as done. jbcoe added a comment. Do not allow spaces around C# attribute colons. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D75465/new/ https://reviews.llvm.org/D75465 Files: clang/lib/Format/FormatTokenLexer

[PATCH] D75229: [clang-tidy] Add signal-in-multithreaded-program check

2020-03-03 Thread Kocsis Ábel via Phabricator via cfe-commits
abelkocsis updated this revision to Diff 247833. abelkocsis added a comment. Configurable callers option and new test cases add. Repository: rCTE Clang Tools Extra CHANGES SINCE LAST ACTION https://reviews.llvm.org/D75229/new/ https://reviews.llvm.org/D75229 Files: clang-tools-extra/cla

[PATCH] D75356: [Analyzer][StreamChecker] Introduction of stream error state handling.

2020-03-03 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus added inline comments. Comment at: clang/lib/StaticAnalyzer/Checkers/StreamChecker.cpp:92-125 +class MakeRetVal { + const CallExpr *CE = nullptr; + std::unique_ptr RetVal; + SymbolRef RetSym; + +public: + MakeRetVal(const CallEvent &Call, CheckerContext &C)

[PATCH] D71524: [analyzer] Support tainted objects in GenericTaintChecker

2020-03-03 Thread Balázs Benics via Phabricator via cfe-commits
steakhal added a comment. In D71524#1889566 , @boga95 wrote: > @steakhal's revision is on the top of this. Changing the order will only > cause unnecessary work on both sides. I would happily rebase this patch if you want. Comment at

[PATCH] D71920: [AST] Refactor propagation of dependency bits. NFC

2020-03-03 Thread Sam McCall via Phabricator via cfe-commits
sammccall added inline comments. Comment at: clang/lib/AST/TemplateName.cpp:174 +TemplateNameDependence TemplateName::getDependence() const { + auto Dependency = TemplateNameDependence::None; + if (QualifiedTemplateName *QTN = getAsQualifiedTemplateName()) nit:

[PATCH] D75441: [clang-tidy] Add helper base check classes that only run on specific language versions

2020-03-03 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh added a comment. In D75441#1901071 , @gribozavr2 wrote: > > I think my preference is to go with isLanguageVersionSupported() and not > > use base classes. > > +1, I can see this working, but the introduction of new concepts does not > seem like it

[PATCH] D74735: [analyzer] Add support for CXXInheritedCtorInitExpr.

2020-03-03 Thread Gabor Marton via Phabricator via cfe-commits
martong added inline comments. Comment at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/CallEvent.h:932 + const CXXConstructExpr *getInheritingConstructor() const { +return cast(getInheritingStackFrame()->getCallSite()); + } martong wrote: > This

[PATCH] D75465: [clang-format] Do not merge target-name and : for C# attributes

2020-03-03 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay added a comment. This feels better than merging I think visual studio tends to create files via the new project wizard that do not have a space before but do have a space after the `:` [assembly: ComVisible(false)] CHANGES SINCE LAST ACTION https://reviews.llvm.org/D75465/new

[clang-tools-extra] 8a2d294 - [clangd] Handle `initialized` notification (no-op to suppress log message)

2020-03-03 Thread Sam McCall via cfe-commits
Author: Sam McCall Date: 2020-03-03T12:12:30+01:00 New Revision: 8a2d294ed0e1603c8e4d8198e46f436d2612884e URL: https://github.com/llvm/llvm-project/commit/8a2d294ed0e1603c8e4d8198e46f436d2612884e DIFF: https://github.com/llvm/llvm-project/commit/8a2d294ed0e1603c8e4d8198e46f436d2612884e.diff LO

[clang-tools-extra] 1454c27 - Syndicate, test and fix base64 implementation

2020-03-03 Thread via cfe-commits
Author: serge-sans-paille Date: 2020-03-03T12:17:53+01:00 New Revision: 1454c27b60447d969d0c1ecaf20b2186fe9d85ec URL: https://github.com/llvm/llvm-project/commit/1454c27b60447d969d0c1ecaf20b2186fe9d85ec DIFF: https://github.com/llvm/llvm-project/commit/1454c27b60447d969d0c1ecaf20b2186fe9d85ec.d

[clang-tools-extra] 6f7dca9 - [clangd] Send InitializeResult.serverInfo

2020-03-03 Thread Sam McCall via cfe-commits
Author: Sam McCall Date: 2020-03-03T12:25:58+01:00 New Revision: 6f7dca97fb3c07ffae0c39b9754a387ca014d5ff URL: https://github.com/llvm/llvm-project/commit/6f7dca97fb3c07ffae0c39b9754a387ca014d5ff DIFF: https://github.com/llvm/llvm-project/commit/6f7dca97fb3c07ffae0c39b9754a387ca014d5ff.diff LO

[clang-tools-extra] 6525a6b - [clangd] Use structured PublishDiagnosticsParams. NFC

2020-03-03 Thread Sam McCall via cfe-commits
Author: Sam McCall Date: 2020-03-03T12:44:40+01:00 New Revision: 6525a6b7b2afc62edc6c2425b1e845c99f3c94fe URL: https://github.com/llvm/llvm-project/commit/6525a6b7b2afc62edc6c2425b1e845c99f3c94fe DIFF: https://github.com/llvm/llvm-project/commit/6525a6b7b2afc62edc6c2425b1e845c99f3c94fe.diff LO

[PATCH] D75163: [analyzer][StreamChecker] Adding precall and refactoring.

2020-03-03 Thread Balázs Kéri via Phabricator via cfe-commits
balazske marked 6 inline comments as done. balazske added inline comments. Comment at: clang/lib/StaticAnalyzer/Checkers/StreamChecker.cpp:64-70 +/// Get the value of the stream argument out of the passed call event. +/// The call should contain a function that is described by De

[PATCH] D68165: [analyzer][MallocChecker][NFC] Split checkPostCall up, deploy CallDescriptionMap

2020-03-03 Thread Csaba Dabis via Phabricator via cfe-commits
Charusso added a comment. I wish for a third map, something like `ReallocationMap`. Other than that it is a great direction, I love it. Thanks! Comment at: clang/lib/StaticAnalyzer/Checkers/MallocChecker.cpp:355 + template + void checkRealloc(CheckerContext &C, const CallEx

[PATCH] D75430: [analyzer][NFC] Introduce CXXDeallocatorCall, deploy it in MallocChecker

2020-03-03 Thread Csaba Dabis via Phabricator via cfe-commits
Charusso added a comment. Cool! May it worth to mention the corresponding mail from the mailing list in the Summary: http://lists.llvm.org/pipermail/cfe-dev/2020-February/064754.html Comment at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/CallEvent.h:941 + CXXDeall

[PATCH] D75432: [analyzer][NFC][MallocChecker] Convert many parameters into CallEvent

2020-03-03 Thread Csaba Dabis via Phabricator via cfe-commits
Charusso accepted this revision. Charusso added a comment. This revision is now accepted and ready to land. > Also... as to why I added so much `LLVM_UNREACHABLE` annotations I believe it is not necessary to add `LLVM_NODISCARD`, but as it perfectly works here, I like it. I would mention the ma

[PATCH] D75431: [analyzer][NFC] Merge checkNewAllocator's paramaters into CXXAllocatorCall

2020-03-03 Thread Csaba Dabis via Phabricator via cfe-commits
Charusso added a comment. > look for a solution better then demonstrated in this patch. I believe this solution exactly what Artem suggested, so there is nothing to feel bad about. Cool. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D75431/new/ ht

[PATCH] D75432: [analyzer][NFC][MallocChecker] Convert many parameters into CallEvent

2020-03-03 Thread Csaba Dabis via Phabricator via cfe-commits
Charusso added a comment. I have added green markers to all of your patches as well. I really appreciate the simplification of the `MallocChecker`. May you would commit it as soon as possible, given that you have nailed what Artem has suggested. Cool^2. Repository: rG LLVM Github Monorepo C

[PATCH] D75474: [clangd] Get rid of getTokenRange helper

2020-03-03 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet updated this revision to Diff 247849. kadircet marked 8 inline comments as done. kadircet added a comment. - Use getFileLoc instead of spelledForExpanded Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D75474/new/ https://reviews.llvm.org/D75

[PATCH] D75474: [clangd] Get rid of getTokenRange helper

2020-03-03 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added inline comments. Comment at: clang-tools-extra/clangd/XRefs.cpp:155 const SourceManager &SourceMgr = AST.getSourceManager(); - const FileEntry *F = SourceMgr.getFileEntryForID(SourceMgr.getFileID(TokLoc)); + auto Tok = syntax::tokenize(syntax::FileRange(Sourc

[PATCH] D75467: [instcombine] remove fsub to fneg hacks; only emit fneg

2020-03-03 Thread Simon Moll via Phabricator via cfe-commits
simoll updated this revision to Diff 247850. simoll added a comment. NFC - rebased - formatting Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D75467/new/ https://reviews.llvm.org/D75467 Files: clang/test/CodeGen/fma-builtins-constrained.c llvm

[PATCH] D75163: [analyzer][StreamChecker] Adding precall and refactoring.

2020-03-03 Thread Balázs Kéri via Phabricator via cfe-commits
balazske updated this revision to Diff 247847. balazske marked an inline comment as done. balazske added a comment. Comment changes, updated `lookupFn`, other small change. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D75163/new/ https://reviews.ll

[PATCH] D73720: [Analyzer] Use note tags to track container begin and and changes

2020-03-03 Thread Balogh, Ádám via Phabricator via cfe-commits
baloghadamsoftware updated this revision to Diff 247856. baloghadamsoftware added a comment. Back to the version where we do not check for interestingness. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D73720/new/ https://reviews.llvm.org/D73720 Files: clang/lib/StaticAnalyzer/Checker

[PATCH] D75285: Mark restrict pointer or reference to const as invariant

2020-03-03 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added a comment. In D75285#1896610 , @rjmccall wrote: > Are you sure `restrict` alone isn't good enough? It doesn't directly tell > you that the memory is invariant, but it's usually simple to prove that the > memory isn't modified within the

[PATCH] D73720: [Analyzer] Use note tags to track container begin and and changes

2020-03-03 Thread Csaba Dabis via Phabricator via cfe-commits
Charusso added inline comments. Comment at: clang/lib/StaticAnalyzer/Checkers/ContainerModeling.cpp:731 + } + return C.getNoteTag([Text, Name](BugReport &BR) -> std::string { + SmallString<256> Msg; baloghadamsoftware wrote: > Szelethus wrote: > > baloghad

[PATCH] D75514: [Analyzer] Only add container note tags to the operations of te affected container

2020-03-03 Thread Balogh, Ádám via Phabricator via cfe-commits
baloghadamsoftware created this revision. baloghadamsoftware added reviewers: NoQ, Szelethus. baloghadamsoftware added a project: clang. Herald added subscribers: martong, steakhal, Charusso, gamesh411, donat.nagy, mikhail.ramalho, a.sidorin, rnkovacs, szepet, xazax.hun, whisperity. baloghadamsoft

[PATCH] D75514: [Analyzer] Only add container note tags to the operations of te affected container

2020-03-03 Thread Csaba Dabis via Phabricator via cfe-commits
Charusso added a comment. I believe our path and context sensitive engine is more extensible and precise than checking the source file. Are you sure it scales? I would prefer to tie this information for MemRegions, rather than arbitrary places in the source code. My knowledge is very weak in th

[PATCH] D75163: [analyzer][StreamChecker] Adding precall and refactoring.

2020-03-03 Thread Gábor Horváth via Phabricator via cfe-commits
xazax.hun added a comment. If we were to refactor this check I wonder if it would make sense to port `evalCall` to `postCall`, so the analyzer engine will conjure the symbol for us. I wonder what @NoQ thinks about the pros and cons of the approaches. As far as I understand the con of evalCall is

[PATCH] D75517: [clang-format] Do not format C# array subscript operators as attributes

2020-03-03 Thread Jonathan B Coe via Phabricator via cfe-commits
jbcoe created this revision. jbcoe added a reviewer: krasimir. jbcoe added a project: clang-format. Herald added a project: clang. Herald added a subscriber: cfe-commits. Fix misidentification of C# array subscript operators. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D75517

[PATCH] D75455: [clang-format] Allow nested [] in C# attributes

2020-03-03 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. That's a bit of a hack (we probably need to hook up full-fledged argument list parsing for complete handling), but this seems like a good trade-off between heuristics and results right now

[PATCH] D75474: [clangd] Get rid of getTokenRange helper

2020-03-03 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/XRefs.cpp:170 + // outside the main file. + L.range = halfOpenToRange( + SM, CharSourceRange::getCharRange(

[PATCH] D75432: [analyzer][NFC][MallocChecker] Convert many parameters into CallEvent

2020-03-03 Thread Gábor Horváth via Phabricator via cfe-commits
xazax.hun added a comment. Some nits inline. Comment at: clang/lib/StaticAnalyzer/Checkers/MallocChecker.cpp:995 -void MallocChecker::checkBasicAlloc(CheckerContext &C, const CallExpr *CE, -ProgramStateRef State) const { - State = MallocMe

[PATCH] D75285: Mark restrict pointer or reference to const as invariant

2020-03-03 Thread Jeroen Dobbelaere via Phabricator via cfe-commits
jeroen.dobbelaere added a comment. In D75285#1902788 , @Anastasia wrote: > In D75285#1896610 , @rjmccall wrote: > > > Are you sure `restrict` alone isn't good enough? It doesn't directly tell > > you that the memo

[PATCH] D75431: [analyzer][NFC] Merge checkNewAllocator's paramaters into CXXAllocatorCall

2020-03-03 Thread Gábor Horváth via Phabricator via cfe-commits
xazax.hun added a comment. Other than a nit looks good to me but wait for @NoQ before committing. Comment at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/CallEvent.h:208 + SValBuilder &getSValBuilder() const { +return State->getStateManager().getSValBuilder();

[PATCH] D75430: [analyzer][NFC] Introduce CXXDeallocatorCall, deploy it in MallocChecker

2020-03-03 Thread Gábor Horváth via Phabricator via cfe-commits
xazax.hun added a comment. This might be a silly question but is `CXXDeleteExpr` the only way to invoke a deallocator? What would happen if the user would call it by hand? Should we expect `ExprEngine` to trigger a callback in that case? Repository: rG LLVM Github Monorepo CHANGES SINCE LAS

[PATCH] D75474: [clangd] Get rid of getTokenRange helper

2020-03-03 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet updated this revision to Diff 247861. kadircet marked 3 inline comments as done. kadircet added a comment. - Address comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D75474/new/ https://reviews.llvm.org/D75474 Files: clang-tools-ex

[clang] cd9b2e1 - [clang][Syntax] Add spelledTokenAt helper to TokenBuffer

2020-03-03 Thread Kadir Cetinkaya via cfe-commits
Author: Kadir Cetinkaya Date: 2020-03-03T14:30:41+01:00 New Revision: cd9b2e18bd69503e8d624d427caa3a0157b34e52 URL: https://github.com/llvm/llvm-project/commit/cd9b2e18bd69503e8d624d427caa3a0157b34e52 DIFF: https://github.com/llvm/llvm-project/commit/cd9b2e18bd69503e8d624d427caa3a0157b34e52.dif

[PATCH] D75340: [clang-tidy] Change checks to use new isLanguageVersionSupported restriction

2020-03-03 Thread Nathan James via Phabricator via cfe-commits
njames93 requested review of this revision. njames93 added a comment. Support for the previous point didnt go too well so will stick with the current implementation Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D75340/new/ https://reviews.llvm.org/

[clang-tools-extra] 3302af8 - [clangd] Make use of token buffers in semantic highlighting

2020-03-03 Thread Kadir Cetinkaya via cfe-commits
Author: Kadir Cetinkaya Date: 2020-03-03T14:30:41+01:00 New Revision: 3302af83ef79a8721f047f4b51b84dee8d823a0f URL: https://github.com/llvm/llvm-project/commit/3302af83ef79a8721f047f4b51b84dee8d823a0f DIFF: https://github.com/llvm/llvm-project/commit/3302af83ef79a8721f047f4b51b84dee8d823a0f.dif

[clang-tools-extra] 3755039 - [clangd] Get rid of getTokenRange helper

2020-03-03 Thread Kadir Cetinkaya via cfe-commits
Author: Kadir Cetinkaya Date: 2020-03-03T14:30:42+01:00 New Revision: 3755039c99d85f93168cb7a36501c9586c19d3db URL: https://github.com/llvm/llvm-project/commit/3755039c99d85f93168cb7a36501c9586c19d3db DIFF: https://github.com/llvm/llvm-project/commit/3755039c99d85f93168cb7a36501c9586c19d3db.dif

[PATCH] D75474: [clangd] Get rid of getTokenRange helper

2020-03-03 Thread Kadir Cetinkaya via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG3755039c99d8: [clangd] Get rid of getTokenRange helper (authored by kadircet). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D75474/new/ https://reviews.llvm

[PATCH] D75447: [clangd] Make use of token buffers in semantic highlighting

2020-03-03 Thread Kadir Cetinkaya via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG3302af83ef79: [clangd] Make use of token buffers in semantic highlighting (authored by kadircet). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D75447/new/ h

[PATCH] D75503: [clang][Syntax] Add spelledTokenAt helper to TokenBuffer

2020-03-03 Thread Kadir Cetinkaya via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGcd9b2e18bd69: [clang][Syntax] Add spelledTokenAt helper to TokenBuffer (authored by kadircet). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D75503/new/ http

[PATCH] D75432: [analyzer][NFC][MallocChecker] Convert many parameters into CallEvent

2020-03-03 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus marked 2 inline comments as done. Szelethus added inline comments. Comment at: clang/lib/StaticAnalyzer/Checkers/MallocChecker.cpp:995 -void MallocChecker::checkBasicAlloc(CheckerContext &C, const CallExpr *CE, -ProgramStateRef Stat

[clang] 859bcf4 - [analyzer][taint] Add isTainted debug expression inspection check

2020-03-03 Thread Balazs Benics via cfe-commits
Author: Balazs Benics Date: 2020-03-03T14:40:23+01:00 New Revision: 859bcf4e3bb991a161821129d19d50ba00f9c56a URL: https://github.com/llvm/llvm-project/commit/859bcf4e3bb991a161821129d19d50ba00f9c56a DIFF: https://github.com/llvm/llvm-project/commit/859bcf4e3bb991a161821129d19d50ba00f9c56a.diff

[PATCH] D74131: [analyzer][taint] Add isTainted debug expression inspection check

2020-03-03 Thread Balázs Benics via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. steakhal marked an inline comment as done. Closed by commit rG859bcf4e3bb9: [analyzer][taint] Add isTainted debug expression inspection check (authored by steakhal). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST

[PATCH] D75356: [Analyzer][StreamChecker] Introduction of stream error state handling.

2020-03-03 Thread Balázs Kéri via Phabricator via cfe-commits
balazske marked 4 inline comments as done. balazske added inline comments. Comment at: clang/lib/StaticAnalyzer/Checkers/StreamChecker.cpp:333-335 + // Ignore the call if the stream is is not tracked. + if (!State->get(StreamSym)) +return; Szelethus wrote:

[clang-tools-extra] c0b27c4 - [clangd] Remove unused getDocument() API

2020-03-03 Thread Sam McCall via cfe-commits
Author: Sam McCall Date: 2020-03-03T14:53:59+01:00 New Revision: c0b27c489104f6c3c055a3ac1573d05393fe32eb URL: https://github.com/llvm/llvm-project/commit/c0b27c489104f6c3c055a3ac1573d05393fe32eb DIFF: https://github.com/llvm/llvm-project/commit/c0b27c489104f6c3c055a3ac1573d05393fe32eb.diff LO

[PATCH] D31343: Add an attribute plugin example

2020-03-03 Thread John Brawn via Phabricator via cfe-commits
john.brawn added a comment. I've been looking into attribute merging, and as far as I can tell there's two things going on: - In SemaDeclAttr.cpp, the various handleXyzAttr functions may call mergeXyzAttr to handle clashes with other attributes within the same declaration. - In SemaDecl.cpp, s

[PATCH] D75163: [analyzer][StreamChecker] Adding precall and refactoring.

2020-03-03 Thread Balázs Kéri via Phabricator via cfe-commits
balazske added a comment. In D75163#1902816 , @xazax.hun wrote: > If we were to refactor this check I wonder if it would make sense to port > `evalCall` to `postCall`, so the analyzer engine will conjure the symbol for > us. > I wonder what @NoQ thinks

[PATCH] D75163: [analyzer][StreamChecker] Adding precall and refactoring.

2020-03-03 Thread Balázs Kéri via Phabricator via cfe-commits
balazske added a comment. Split the patch into two is really start it from "scratch" again, copy the code, decide what to go into the first or second part (and what order) (really what?), make some mess with git commands and branches and rebase, probably rebuild whole llvm, if review changes ar

[PATCH] D71920: [AST] Refactor propagation of dependency bits. NFC

2020-03-03 Thread Haojian Wu via Phabricator via cfe-commits
hokein added inline comments. Comment at: clang/lib/AST/TemplateName.cpp:193 + } else { +assert(!getAsOverloadedTemplate() && + "overloaded templates shouldn't survive to here"); sammccall wrote: > As far as I can tell, an overloaded template will

[PATCH] D75163: [analyzer][StreamChecker] Adding precall and refactoring.

2020-03-03 Thread Gábor Horváth via Phabricator via cfe-commits
xazax.hun added a comment. In D75163#1902921 , @balazske wrote: > In D75163#1902816 , @xazax.hun wrote: > > > If we were to refactor this check I wonder if it would make sense to port > > `evalCall` to `postCall`,

[PATCH] D71920: [AST] Refactor propagation of dependency bits. NFC

2020-03-03 Thread Haojian Wu via Phabricator via cfe-commits
hokein updated this revision to Diff 247881. hokein marked 4 inline comments as done. hokein added a comment. address comments. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D71920/new/ https://reviews.llvm.org/D71920 Files: clang/include/clang/A

[clang] d481e59 - [hexagon] Add default paths to support musl target

2020-03-03 Thread Sid Manning via cfe-commits
Author: Sid Manning Date: 2020-03-03T08:43:10-06:00 New Revision: d481e59863ac0eaca813a972f0dc79b763012d30 URL: https://github.com/llvm/llvm-project/commit/d481e59863ac0eaca813a972f0dc79b763012d30 DIFF: https://github.com/llvm/llvm-project/commit/d481e59863ac0eaca813a972f0dc79b763012d30.diff L

[PATCH] D71920: [AST] Refactor propagation of dependency bits. NFC

2020-03-03 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. thanks, that looks better to me Comment at: clang/lib/AST/TemplateName.cpp:193 + } else { +assert(!getAsOverloadedTemplate() && + "overloaded templates s

[PATCH] D75056: [Driver] Default to -fno-common for all targets

2020-03-03 Thread Sjoerd Meijer via Phabricator via cfe-commits
SjoerdMeijer added a comment. Reverted in: https://reviews.llvm.org/rG4e363563fa14 Put up for review some fixes for compiler-rt tests in: https://reviews.llvm.org/D75520 Now checking what these test-suite failures are about: FAIL: MultiSource/Applications/JM/ldecod/ldecod.compile_time (1 of

[PATCH] D75139: [hexagon] Pickup the default crt and libs when the musl target is selected

2020-03-03 Thread Sid Manning via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGd481e59863ac: [hexagon] Add default paths to support musl target (authored by sidneym). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D75139/new/ https://rev

[clang-tools-extra] caf5a4d - [clangd] Propagate versions into DraftStore, assigning where missing. NFC

2020-03-03 Thread Sam McCall via cfe-commits
Author: Sam McCall Date: 2020-03-03T16:20:13+01:00 New Revision: caf5a4d57fe0ac0ca8c8d45fd31e5dbbc6bb6bec URL: https://github.com/llvm/llvm-project/commit/caf5a4d57fe0ac0ca8c8d45fd31e5dbbc6bb6bec DIFF: https://github.com/llvm/llvm-project/commit/caf5a4d57fe0ac0ca8c8d45fd31e5dbbc6bb6bec.diff LO

[PATCH] D75523: [www] cxx_status: Update title to mention C++20

2020-03-03 Thread Hubert Tong via Phabricator via cfe-commits
hubert.reinterpretcast created this revision. hubert.reinterpretcast added reviewers: rsmith, aaron.ballman. Herald added a project: clang. The document covers the Clang implementation status of the "upcoming C++20 standard". Update the title to match. Repository: rG LLVM Github Monorepo htt

[PATCH] D75524: [www] cxx_status: Update Reflection TS to Cologne draft

2020-03-03 Thread Hubert Tong via Phabricator via cfe-commits
hubert.reinterpretcast created this revision. hubert.reinterpretcast added reviewers: rsmith, aaron.ballman. Herald added a project: clang. As of the 2019 Cologne meeting, according to its minutes (N4826), N4818 is the draft of the Reflection TS. Repository: rG LLVM Github Monorepo https://r

[PATCH] D71920: [AST] Refactor propagation of dependency bits. NFC

2020-03-03 Thread Haojian Wu via Phabricator via cfe-commits
hokein updated this revision to Diff 247905. hokein marked an inline comment as done. hokein added a comment. move the assert to overloadedTemplate switch case. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D71920/new/ https://reviews.llvm.org/D7192

[PATCH] D71920: [AST] Refactor propagation of dependency bits. NFC

2020-03-03 Thread Haojian Wu via Phabricator via cfe-commits
hokein added inline comments. Comment at: clang/lib/AST/TemplateName.cpp:208 "overloaded templates shouldn't survive to here"); + D |= TemplateNameDependence::DependentInstantiation; + return D; sammccall wrote: > what's this line about? this indicate

[PATCH] D75529: [analyzer] Limit UCharMax to min of max uchar or max int

2020-03-03 Thread Vince Bridgers via Phabricator via cfe-commits
vabridgers created this revision. vabridgers added reviewers: martong, Szelethus, NoQ. Herald added subscribers: cfe-commits, Charusso, dkrupp, donat.nagy, mikhail.ramalho, a.sidorin, rnkovacs, szepet, kristof.beyls, xazax.hun. Herald added a project: clang. This change is a follow up to commit 5

[PATCH] D75340: [clang-tidy] Change checks to use new isLanguageVersionSupported restriction

2020-03-03 Thread Dmitri Gribenko via Phabricator via cfe-commits
gribozavr2 accepted this revision. gribozavr2 added inline comments. This revision is now accepted and ready to land. Comment at: clang-tools-extra/clang-tidy/cert/DefaultOperatorNewAlignmentCheck.h:30 + bool isLanguageVersionSupported(const LangOptions &LangOpts) const overrid

[PATCH] D75514: [Analyzer] Only add container note tags to the operations of te affected container

2020-03-03 Thread Balogh, Ádám via Phabricator via cfe-commits
baloghadamsoftware updated this revision to Diff 247910. baloghadamsoftware added a comment. Alternative approach for debugging (instead of checking the source range): `clang_analyzer_express()` from `ExprInspection` marks its argument as interesting in the bug report. `DebugContainerModeling` p

[PATCH] D71920: [AST] Refactor propagation of dependency bits. NFC

2020-03-03 Thread Sam McCall via Phabricator via cfe-commits
sammccall added inline comments. Comment at: clang/lib/AST/TemplateName.cpp:208 "overloaded templates shouldn't survive to here"); + D |= TemplateNameDependence::DependentInstantiation; + return D; hokein wrote: > sammccall wrote: > > what's this line

[PATCH] D75395: [clang][Modules] Add -fsystem-module flag

2020-03-03 Thread Bruno Cardoso Lopes via Phabricator via cfe-commits
bruno accepted this revision. bruno added a comment. This revision is now accepted and ready to land. LGTM Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D75395/new/ https://reviews.llvm.org/D75395 ___ c

[PATCH] D75514: [Analyzer] Only add container note tags to the operations of te affected container

2020-03-03 Thread Csaba Dabis via Phabricator via cfe-commits
Charusso accepted this revision. Charusso added a comment. This revision is now accepted and ready to land. Cool, that one a lucky one! I think the SymbolRef based world also working, just at some point it could not scale because other systems are region based... For now, it is a much better sol

[PATCH] D75445: [ARM,MVE] Add the `vshlcq` intrinsics.

2020-03-03 Thread Mikhail Maltsev via Phabricator via cfe-commits
miyuki accepted this revision. miyuki added a comment. This revision is now accepted and ready to land. LGTM Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D75445/new/ https://reviews.llvm.org/D75445 ___

[PATCH] D75285: Mark restrict pointer or reference to const as invariant

2020-03-03 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added a comment. In D75285#1902835 , @jeroen.dobbelaere wrote: > In D75285#1902788 , @Anastasia wrote: > > > In D75285#1896610 , @rjmccall > > wrote: > > > > > Are y

[PATCH] D64464: [CodeGen] Emit destructor calls to destruct compound literals

2020-03-03 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak updated this revision to Diff 247919. ahatanak marked 5 inline comments as done. ahatanak retitled this revision from "[CodeGen] Emit destructor calls for non-trivial C structs" to "[CodeGen] Emit destructor calls to destruct compound literals". ahatanak edited the summary of this revisi

[PATCH] D75529: [analyzer] Limit UCharMax to min of max uchar or max int

2020-03-03 Thread Csaba Dabis via Phabricator via cfe-commits
Charusso added a comment. Could you add a test please? We really need tests for every patch. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D75529/new/ https://reviews.llvm.org/D75529 ___ cfe-commits mai

[PATCH] D64464: [CodeGen] Emit destructor calls to destruct compound literals

2020-03-03 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak added inline comments. Comment at: test/Import/objc-arc/Inputs/cleanup-objects.m:6 +id getObj(int c, id a) { + // Commenting out the following line because AST importer crashes when trying + // to import a BlockExpr. martong wrote: > Perhaps then this

[PATCH] D75529: [analyzer] Limit UCharMax to min of max uchar or max int

2020-03-03 Thread Gabor Marton via Phabricator via cfe-commits
martong accepted this revision. martong added a comment. This revision is now accepted and ready to land. Looks good to me! Thanks! Comment at: clang/lib/StaticAnalyzer/Checkers/StdLibraryFunctionsChecker.cpp:514 + // Set UCharMax to min of int or uchar maximum value. + // Th

[PATCH] D64464: [CodeGen] Emit destructor calls to destruct compound literals

2020-03-03 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak marked an inline comment as done. ahatanak added inline comments. Comment at: lib/CodeGen/CGExpr.cpp:4100 + if (E->getType().isDestructedType() == QualType::DK_nontrivial_c_struct) +pushDestroy(QualType::DK_nontrivial_c_struct, DeclPtr, E->getType()); +

[PATCH] D75514: [Analyzer] Only add container note tags to the operations of te affected container

2020-03-03 Thread Balázs Benics via Phabricator via cfe-commits
steakhal added a comment. I don't have any technical comments on this patch since I haven't used `NoteTags` yet, only a couple of readability ones. Comment at: clang/lib/StaticAnalyzer/Checkers/DebugContainerModeling.cpp:97-103 + auto *PSBR = dyn_cast(&BR); +

  1   2   3   >