[PATCH] D40897: [clangd] Introduce a "Symbol" class.

2017-12-07 Thread Marc-Andre Laperle via Phabricator via cfe-commits
malaperle added inline comments. Comment at: clangd/Symbol.h:37 +// The class presents a C++ symbol, e.g. class, function. +struct Symbol { + // The symbol identifier, using USR. sammccall wrote: > hokein wrote: > > malaperle wrote: > > > I think it would be nic

[PATCH] D40752: [OpenMP] Fix assert fail after target implicit map checks

2017-12-07 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added a comment. In https://reviews.llvm.org/D40752#948399, @jdenny wrote: > Alexey: I see that you committed the error message change, so I think this > issue is done. Is Abandon Revision correct in this scenario? Sorry, I'm new > here. Yes, it is correct https://reviews.llvm.org

[PATCH] D40752: [OpenMP] Fix assert fail after target implicit map checks

2017-12-07 Thread Joel E. Denny via Phabricator via cfe-commits
jdenny added a comment. Alexey: I see that you committed the error message change, so I think this issue is done. Is Abandon Revision correct in this scenario? Sorry, I'm new here. https://reviews.llvm.org/D40752 ___ cfe-commits mailing list cfe

[PATCH] D40548: [clangd] Symbol index interfaces and index-based code completion.

2017-12-07 Thread Sam McCall via Phabricator via cfe-commits
sammccall added inline comments. Comment at: clangd/ClangdIndex.h:24 +/// (re-)scoring symbols from different indexes. +class CombinedSymbolIndex : public SymbolIndex { +public: This seems a little premature to me - it's hard to know if this idea makes sense wit

Re: [PATCH] D40948: Switch Clang's default C++ language target to C++14

2017-12-07 Thread Tim Northover via cfe-commits
> + LangStd = LangStandard::lang_gnucxx14; > > This comment should be removed. Opps, yep. Fixed on my local branch. I won't upload a new diff just yet though. Thanks. Tim. ___ cfe-commits mailing list cfe-commits@lists.llvm.org ht

[PATCH] D40897: [clangd] Introduce a "Symbol" class.

2017-12-07 Thread Marc-Andre Laperle via Phabricator via cfe-commits
malaperle added a comment. In https://reviews.llvm.org/D40897#946911, @hokein wrote: > Our rough plan would be > > 1. Define the Symbol structure. > 2. Design the interfaces of SymbolIndex, ASTIndex. > 3. Combine 1) and 2) together to make global code completion work (we'd use > YAML dataset for

[PATCH] D40939: [analyzer] Avoid element regions of void type.

2017-12-07 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ updated this revision to Diff 125972. NoQ added a comment. Rebase on top of https://reviews.llvm.org/D40584. Stronger assertion for `CXXThisRegion` type. Uhm, forgot to mention that i also added a similar assertion to `CXXThisRegion` (which didn't find any bugs yet). Other typed value regio

[PATCH] D40563: [SemaCodeComplete] Allow passing out scope specifiers in qualified-id completions via completion context.

2017-12-07 Thread Eric Liu via Phabricator via cfe-commits
ioeric added a comment. Fyi, you could find use of the new API in https://reviews.llvm.org/D40548 I'd like to land this patch if there is no objection. https://reviews.llvm.org/D40563 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://l

[PATCH] D40562: [Sema] Ignore decls in namespaces when global decls are not wanted.

2017-12-07 Thread Eric Liu via Phabricator via cfe-commits
ioeric added a comment. Ping. (fyi, you could find use of the new option in https://reviews.llvm.org/D40548) Repository: rC Clang https://reviews.llvm.org/D40562 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-b

[PATCH] D40939: [analyzer] Avoid element regions of void type.

2017-12-07 Thread Gábor Horváth via Phabricator via cfe-commits
xazax.hun added a comment. In https://reviews.llvm.org/D40939#948252, @NoQ wrote: > Like, it's not the situation when we couldn't figure out the type - it would > have been null in that case. Here we know exactly that the type is void. Oh, thank you for the clarification! Repository: rC Cl

[PATCH] D40939: [analyzer] Avoid element regions of void type.

2017-12-07 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added a comment. I think the new behavior is correct in the sense that in our region hierarchy byte offsets (such as arithmetic on void pointers) are normally represented as `char`-type element regions. For instance, we have a similar mechanism is implemented in pointer casts case, when the

[PATCH] D40937: [clang-tidy] Infinite loop checker

2017-12-07 Thread Gábor Horváth via Phabricator via cfe-commits
xazax.hun added inline comments. Comment at: clang-tidy/misc/InfiniteLoopCheck.cpp:121 + + Stmt *FunctionBody = nullptr; + if (ContainingLambda) This could be pointer to const, right? https://reviews.llvm.org/D40937

[PATCH] D40937: [clang-tidy] Infinite loop checker

2017-12-07 Thread Gábor Horváth via Phabricator via cfe-commits
xazax.hun added a comment. This does not support memberExprs as condition variables right now. What happens if you have something like this: struct X { void f(int a) { while(a < i) { --i; } } int i; }; I think you could extend the test cases with some classes. ==

[PATCH] D40937: [clang-tidy] Infinite loop checker

2017-12-07 Thread Peter Szecsi via Phabricator via cfe-commits
szepet added a comment. In https://reviews.llvm.org/D40937#947760, @JVApen wrote: > How does this check deal with atomic members? > ... This patch only works on integer types. So, since the atomic is a non-supported type the check will skip that `while` loop. https://reviews.llvm.org/D40937

[PATCH] D40937: [clang-tidy] Infinite loop checker

2017-12-07 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: docs/clang-tidy/checks/misc-infinite-loop.rst:6 + +The check finds loops where none of the condition variables are updated in the +body. This performs a very conservative check in order to avoid false positives Pl

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

2017-12-07 Thread George Karpenkov via Phabricator via cfe-commits
george.karpenkov added inline comments. Comment at: tools/scan-build-py/libscanbuild/analyze.py:44 +CTU_FUNCTION_MAP_FILENAME = 'externalFnMap.txt' +CTU_TEMP_FNMAP_FOLDER = 'tmpExternalFnMaps' gerazo wrote: > george.karpenkov wrote: > > What would happen when m

[PATCH] D40937: [clang-tidy] Infinite loop checker

2017-12-07 Thread Peter Szecsi via Phabricator via cfe-commits
szepet updated this revision to Diff 125965. szepet marked 9 inline comments as done. szepet added a comment. Updates based on comments. https://reviews.llvm.org/D40937 Files: clang-tidy/misc/CMakeLists.txt clang-tidy/misc/InfiniteLoopCheck.cpp clang-tidy/misc/InfiniteLoopCheck.h clang-

[PATCH] D40548: [clangd] Symbol index interfaces and index-based code completion.

2017-12-07 Thread Eric Liu via Phabricator via cfe-commits
ioeric updated this revision to Diff 125962. ioeric added a comment. Diff on https://reviews.llvm.org/D40897 instead origin/master! Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D40548 Files: clangd/CMakeLists.txt clangd/ClangdIndex.cpp clangd/ClangdIndex.h clangd/Clang

[PATCH] D40939: [analyzer] Avoid element regions of void type.

2017-12-07 Thread Gábor Horváth via Phabricator via cfe-commits
xazax.hun added a comment. I like the idea of adding those assertions but a bit worried about the other changes. Basically (if I get this right), we are masking the issues here and I am a bit afraid that they will get forgotten. I think it would be nice to at least add a FIXME that this path sh

[PATCH] D40548: [clangd] Symbol index interfaces and index-based code completion.

2017-12-07 Thread Eric Liu via Phabricator via cfe-commits
ioeric updated this revision to Diff 125960. ioeric added a comment. - Use IncludeNamespaceLevelDecls option; fix some broken tests. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D40548 Files: clangd/CMakeLists.txt clangd/ClangdIndex.cpp clangd/ClangdIndex.h clangd/Clan

[PATCH] D40956: [AMDGPU] Switch to the new addr space mapping by default for clang

2017-12-07 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl created this revision. Herald added subscribers: t-tye, tpr, dstuttard, nhaehnle, wdng, kzhuravl. Will clean up the old addr space mapping in separate patch. https://reviews.llvm.org/D40956 Files: lib/Basic/Targets/AMDGPU.cpp lib/Basic/Targets/AMDGPU.h test/CodeGen/address-space.c

[PATCH] D39363: [clang-tidy] Correctly classify constant arrays and constant strings as constants when checking identifiers naming

2017-12-07 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh added a comment. One nit. Otherwise seems fine. Comment at: clang-tidy/readability/IdentifierNamingCheck.cpp:502 -if (!Type.isNull() && Type.isLocalConstQualified() && +if (!Type.isNull() && Type.isConstQualified() && Decl->isStaticDataMember() && Nami

[PATCH] D39363: [clang-tidy] Correctly classify constant arrays and constant strings as constants when checking identifiers naming

2017-12-07 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh added a comment. Sorry for the delay. I missed this revision somehow. Please add cfe-commits to the subscribers list so that others can chime in. https://reviews.llvm.org/D39363 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://

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

2017-12-07 Thread Simon Schroeder via Phabricator via cfe-commits
schroedersi added a comment. Ping https://reviews.llvm.org/D30946 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D40948: Switch Clang's default C++ language target to C++14

2017-12-07 Thread Jonas Hahnfeld via Phabricator via cfe-commits
Hahnfeld added a reviewer: ABataev. Hahnfeld added inline comments. Comment at: clang/lib/Frontend/CompilerInvocation.cpp:1732 case InputKind::ObjCXX: // The PS4 uses C++11 as the default C++ standard. + LangStd = LangStandard::lang_gnucxx14; Thi

[PATCH] D40952: [clangd] Convert lit code completion tests to unit-tests. NFC

2017-12-07 Thread Sam McCall via Phabricator via cfe-commits
sammccall created this revision. Herald added subscribers: cfe-commits, ilya-biryukov, klimek. This improves readability of tests and error messages. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D40952 Files: test/clangd/completion-items-kinds.test test/clangd/completion-p

[PATCH] D40485: [clangd] Introduced a Context that stores implicit data

2017-12-07 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added inline comments. Comment at: clangd/Context.h:25 + +class ContextData { +public: sammccall wrote: > IIUC, the only reason we expose separate `Context` and `ContextData` types is > to give things like Span a stable reference to hold onto (`Con

[PATCH] D40909: [clang-format] Reorganize raw string delimiters

2017-12-07 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir updated this revision to Diff 125939. krasimir edited the summary of this revision. krasimir added a comment. - Address review comments Repository: rC Clang https://reviews.llvm.org/D40909 Files: docs/ClangFormatStyleOptions.rst include/clang/Format/Format.h lib/Format/Continu

[PATCH] D40909: [clang-format] Reorganize raw string delimiters

2017-12-07 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir added inline comments. Comment at: lib/Format/Format.cpp:920 + if (LanguageFound) { +for (int i = Styles.size() - 1; i >= 0; --i) { + if (Styles[i].Language == FormatStyle::LK_None) { djasper wrote: > I think this is getting a bit convoluted an

[PATCH] D39375: [clang] Add PPCallbacks list to preprocessor when building a preacompiled preamble.

2017-12-07 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov requested changes to this revision. ilya-biryukov added inline comments. This revision now requires changes to proceed. Comment at: lib/Frontend/PrecompiledPreamble.cpp:242 std::shared_ptr PCHContainerOps, bool StoreInMemory, -PreambleCallbacks &Callbacks)

[PATCH] D40909: [clang-format] Reorganize raw string delimiters

2017-12-07 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir added inline comments. Comment at: include/clang/Format/Format.h:1375 +std::vector EnclosingFunctionNames; +/// \brief The canonical delimiter for this language. +std::string CanonicalDelimiter; djasper wrote: > Can you pull apart this patch?

[PATCH] D40909: [clang-format] Reorganize raw string delimiters

2017-12-07 Thread Daniel Jasper via Phabricator via cfe-commits
djasper added inline comments. Comment at: include/clang/Format/Format.h:1216 +LK_TextProto, +/// Do not use. Keep at last position. +LK_End, Lets find a way to implement without this in the public header file. Comment at: include/c

[PATCH] D40937: [clang-tidy] Infinite loop checker

2017-12-07 Thread Gabor Marton via Phabricator via cfe-commits
martong added inline comments. Comment at: clang-tidy/misc/InfiniteLoopCheck.cpp:105 + return llvm::make_unique( + *(new ExprSequence(TheCFG.get(), &ASTCtx))); +} `make_unique` is a forwarding function, therefore there is no need to create an object and th

[PATCH] D40548: [clangd] Prototyping index support and naive index-based global code completion. WIP

2017-12-07 Thread Eric Liu via Phabricator via cfe-commits
ioeric updated this revision to Diff 125928. ioeric added a comment. - More cleanups and merged with https://reviews.llvm.org/D40897 Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D40548 Files: clangd/CMakeLists.txt clangd/ClangdIndex.cpp clangd/ClangdIndex.h clangd/Clan

[PATCH] D40909: [clang-format] Reorganize raw string delimiters

2017-12-07 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir updated this revision to Diff 125927. krasimir added a comment. - Updated documentation Repository: rC Clang https://reviews.llvm.org/D40909 Files: docs/ClangFormatStyleOptions.rst include/clang/Format/Format.h lib/Format/ContinuationIndenter.cpp lib/Format/ContinuationInden

Re: [PATCH] D40948: Switch Clang's default C++ language target to C++14

2017-12-07 Thread Tim Northover via cfe-commits
Here's the test-suite diff. It's really just a few ancient code-bases that don't compile with C++14, no runtime issues I noticed. Tim. commit a52b065052bfefaac17e7096fd2c911aac62e9da Author: Tim Northover Date: Thu Dec 7 09:16:34 2017 + Support C++14 as a default in Clang diff --git a

[PATCH] D40948: Switch Clang's default C++ language target to C++14

2017-12-07 Thread Tim Northover via Phabricator via cfe-commits
t.p.northover created this revision. Herald added a subscriber: mcrosier. Hi all, So, I've finally managed to run all the tests I wanted and get this out for review. Sorry it's taken so long. This patch switches Clang's default C++ target to C++14 across all platforms and updates the test-suite

[PATCH] D40909: [clang-format] Reorganize raw string delimiters

2017-12-07 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir updated this revision to Diff 125921. krasimir added a comment. - Added support for enclosing function names Repository: rC Clang https://reviews.llvm.org/D40909 Files: include/clang/Format/Format.h lib/Format/ContinuationIndenter.cpp lib/Format/ContinuationIndenter.h lib/Fo

[PATCH] D40884: [Index] Add setPreprocessor member to IndexDataConsumer.

2017-12-07 Thread Eric Liu via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC320030: [Index] Add setPreprocessor member to IndexDataConsumer. (authored by ioeric). Changed prior to commit: https://reviews.llvm.org/D40884?vs=125913&id=125920#toc Repository: rC Clang https://r

[PATCH] D40884: [Index] Add setPreprocessor member to IndexDataConsumer.

2017-12-07 Thread Eric Liu via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL320030: [Index] Add setPreprocessor member to IndexDataConsumer. (authored by ioeric). Repository: rL LLVM https://reviews.llvm.org/D40884 Files: cfe/trunk/include/clang/Index/IndexDataConsumer.h

r320030 - [Index] Add setPreprocessor member to IndexDataConsumer.

2017-12-07 Thread Eric Liu via cfe-commits
Author: ioeric Date: Thu Dec 7 03:04:24 2017 New Revision: 320030 URL: http://llvm.org/viewvc/llvm-project?rev=320030&view=rev Log: [Index] Add setPreprocessor member to IndexDataConsumer. Summary: This enables us to use information in Preprocessor when handling symbol occurrences. Reviewers: a

[PATCH] D40909: [clang-format] Reorganize raw string delimiters

2017-12-07 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir updated this revision to Diff 125915. krasimir added a comment. - Added unsafe canonical delimiter update handling Repository: rC Clang https://reviews.llvm.org/D40909 Files: include/clang/Format/Format.h lib/Format/ContinuationIndenter.cpp lib/Format/ContinuationIndenter.h

[PATCH] D40897: [clangd] Introduce a "Symbol" class.

2017-12-07 Thread Sam McCall via Phabricator via cfe-commits
sammccall added a comment. Thanks for putting this together! Have a bit of a braindump here, happy to discuss further either here or offline. Comment at: clangd/Symbol.h:1 +//===--- Symbol.h ---*- C++-*-===// +// I t

[PATCH] D40884: [Index] Add setPreprocessor member to IndexDataConsumer.

2017-12-07 Thread Eric Liu via Phabricator via cfe-commits
ioeric updated this revision to Diff 125913. ioeric marked an inline comment as done. ioeric added a comment. - Removed a redundant #include Repository: rC Clang https://reviews.llvm.org/D40884 Files: include/clang/Index/IndexDataConsumer.h lib/Index/IndexingAction.cpp tools/libclang/C

r320019 - [ARM] ACLE parallel arithmetic and DSP style multiplications

2017-12-07 Thread Sjoerd Meijer via cfe-commits
Author: sjoerdmeijer Date: Thu Dec 7 01:54:39 2017 New Revision: 320019 URL: http://llvm.org/viewvc/llvm-project?rev=320019&view=rev Log: [ARM] ACLE parallel arithmetic and DSP style multiplications This is a follow up of r302131, in which we forgot to add SemaChecking tests. Adding these tests

[PATCH] D40888: [ARM] ACLE parallel arithmetic and DSP style multiplications

2017-12-07 Thread Sjoerd Meijer via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL320019: [ARM] ACLE parallel arithmetic and DSP style multiplications (authored by SjoerdMeijer). Changed prior to commit: https://reviews.llvm.org/D40888?vs=125705&id=125909#toc Repository: rL LLVM

[PATCH] D40888: [ARM] ACLE parallel arithmetic and DSP style multiplications

2017-12-07 Thread Sjoerd Meijer via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC320019: [ARM] ACLE parallel arithmetic and DSP style multiplications (authored by SjoerdMeijer). Repository: rC Clang https://reviews.llvm.org/D40888 Files: include/clang/Basic/BuiltinsARM.def lib

[PATCH] D40489: [clangd] Changed tracing interfaces

2017-12-07 Thread Sam McCall via Phabricator via cfe-commits
sammccall added inline comments. Comment at: clangd/Trace.cpp:138 return; - if (!Args) -Args = llvm::make_unique(); - T->event(Ctx, "E", - Args ? json::obj{{"args", std::move(*Args)}} : json::obj{}); + assert(Args && "Args can't be null at this point"); + T

[PATCH] D40486: [clangd] Implemented logging using Context

2017-12-07 Thread Sam McCall via Phabricator via cfe-commits
sammccall added inline comments. Comment at: clangd/JSONRPCDispatcher.cpp:23 +namespace { +static Key> TracerKey; +static Key IDKey; sammccall wrote: > RequestTracer? actually, RequestSpan I think - "tracer" is pretty confusing at global scope

[PATCH] D40897: [clangd] Introduce a "Symbol" class.

2017-12-07 Thread Eric Liu via Phabricator via cfe-commits
ioeric added inline comments. Comment at: clangd/Symbol.h:23 + // The path of the source file where a symbol occurs. + std::string FilePath; + // The offset to the first character of the symbol from the beginning of the Is this relative or absolute?

[PATCH] D40895: Ignore pointers to incomplete types when diagnosing misaligned addresses

2017-12-07 Thread Roger Ferrer Ibanez via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL320017: Ignore pointers to incomplete types when diagnosing misaligned addresses (authored by rogfer01). Changed prior to commit: https://reviews.llvm.org/D40895?vs=125718&id=125901#toc Repository: r

r320017 - Ignore pointers to incomplete types when diagnosing misaligned addresses

2017-12-07 Thread Roger Ferrer Ibanez via cfe-commits
Author: rogfer01 Date: Thu Dec 7 01:23:50 2017 New Revision: 320017 URL: http://llvm.org/viewvc/llvm-project?rev=320017&view=rev Log: Ignore pointers to incomplete types when diagnosing misaligned addresses This is a fix for PR35509 in which we crash because we attempt to compute the alignment o

<    1   2