[clang-tools-extra] r364528 - [clangd] No need to setTraversalScope in SemanticHighlighting.

2019-06-27 Thread Haojian Wu via cfe-commits
Author: hokein Date: Thu Jun 27 05:22:18 2019 New Revision: 364528 URL: http://llvm.org/viewvc/llvm-project?rev=364528=rev Log: [clangd] No need to setTraversalScope in SemanticHighlighting. Summary: We have already set it when the AST is being built, and setting TraversalScope is not free (it

[PATCH] D63874: [clangd] No need to setTraversalScope in SemanticHighlighting.

2019-06-27 Thread Johan Vikström via Phabricator via cfe-commits
jvikstrom accepted this revision. jvikstrom 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/D63874/new/ https://reviews.llvm.org/D63874

[PATCH] D63082: [Diagnostics] Added support for -Wint-in-bool-context

2019-06-27 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 added a comment. I wanted to follow GCC’s behaviour -Wall but then dicussion moved to “tautological compare group” - I was fine with that too.. I can again revert it to -Wall... If this should be off by default even on -Wall, then all work was useless.. CHANGES SINCE LAST ACTION

[PATCH] D63872: [clangd] Fix a case where we fail to detect a header-declared symbol in rename.

2019-06-27 Thread Sam McCall via Phabricator via cfe-commits
sammccall added inline comments. Comment at: clang-tools-extra/clangd/refactor/Rename.cpp:157 assert(RenameDecl && "symbol must be found at this point"); + RenameDecl = cast(RenameDecl->getCanonicalDecl()); if (auto Reject = renamableWithinFile(*RenameDecl, File, Index))

[PATCH] D63874: [clangd] No need to setTraversalScope in SemanticHighlighting.

2019-06-27 Thread Haojian Wu via Phabricator via cfe-commits
hokein created this revision. hokein added a reviewer: jvikstrom. Herald added subscribers: kadircet, arphaman, jkorous, MaskRay, ilya-biryukov. Herald added a project: clang. We have already set it when the AST is being built, and setting TraversalScope is not free (it will clear the cache,

[PATCH] D63276: [AST] Add FunctionDecl::getParametersSourceRange()

2019-06-27 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/include/clang/AST/Decl.h:2331 + /// Attempt to compute an informative source range covering the + /// function parameters. This omits the ellipsis of a variadic function. + SourceRange getParametersSourceRange() const;

[PATCH] D62960: SVE opaque type for C intrinsics demo

2019-06-27 Thread Diana Picus via Phabricator via cfe-commits
rovka added a comment. Just a few nits/suggestions. Comment at: include/clang/Basic/AArch64SVEACLETypes.def:10 +// +// This file defines the database about various builtin singleton types. +// You can be more specific :) Comment at:

[PATCH] D63872: [clangd] Fix a case where we fail to detect a header-declared symbol in rename.

2019-06-27 Thread Haojian Wu via Phabricator via cfe-commits
hokein created this revision. hokein added a reviewer: sammccall. Herald added subscribers: kadircet, arphaman, jkorous, MaskRay, ilya-biryukov. Herald added a project: clang. Failing case: #include "foo.h" void fo^o() {} getRenameDecl() returns the decl of the symbol under the cursor

[PATCH] D63821: [clangd] Added C++ API code for semantic highlighting

2019-06-27 Thread Johan Vikström via Phabricator via cfe-commits
jvikstrom updated this revision to Diff 206832. jvikstrom marked 9 inline comments as done. jvikstrom added a comment. Separated test and gave consumer an empty definition. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63821/new/

[PATCH] D63082: [Diagnostics] Added support for -Wint-in-bool-context

2019-06-27 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In terms of the code, I think this is ready to go. However, I'm still not happy with `'*' in boolean context` as a diagnostic. Perhaps appending something about the resulting value always being true|false would help most of these diagnostics be more obvious.

[PATCH] D63845: [WIP] Create a clang attribute that lets users specify LLVM attributes

2019-06-27 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a reviewer: aaron.ballman. aaron.ballman added a comment. In D63845#1559995 , @lebedev.ri wrote: > What's the target use-case here? What can't be solved with normal attributes? > I wonder if this should go to cfe+llvm -dev lists

[PATCH] D63760: [clangd] Address limitations in SelectionTree:

2019-06-27 Thread Sam McCall via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. sammccall marked 4 inline comments as done. Closed by commit rL364519: [clangd] Address limitations in SelectionTree: (authored by sammccall, committed by ). Herald added a project: LLVM. Herald added a subscriber:

[clang-tools-extra] r364519 - [clangd] Address limitations in SelectionTree:

2019-06-27 Thread Sam McCall via cfe-commits
Author: sammccall Date: Thu Jun 27 04:17:13 2019 New Revision: 364519 URL: http://llvm.org/viewvc/llvm-project?rev=364519=rev Log: [clangd] Address limitations in SelectionTree: Summary: - nodes can have special-cased hit ranges including "holes" (FunctionTypeLoc in void foo()) - token

[PATCH] D60499: [ASTImporter] Various source location and range import fixes.

2019-06-27 Thread Balázs Kéri via Phabricator via cfe-commits
balazske added a comment. Ping Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D60499/new/ https://reviews.llvm.org/D60499 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D63821: [clangd] Added C++ API code for semantic highlighting

2019-06-27 Thread Haojian Wu via Phabricator via cfe-commits
hokein added a comment. thanks, it is much clearer now. Could you please make the commit message be more specific what this patch does? C++ APIs is too generous, (we already have C++ APIs and data structures for semantic highlightings which are in `SemanticHighlighting.h`).

[PATCH] D63821: [clangd] Added C++ API code for semantic highlighting

2019-06-27 Thread Nikolai Kosjar via Phabricator via cfe-commits
nik added inline comments. Comment at: clang-tools-extra/clangd/ClangdServer.h:60 + // Called by ClangdServer when some \p Highlightings for \p File are ready. + virtual void onHighlightingsReady(PathRef File, + std::vector Highlightings) = 0;

[PATCH] D63821: [clangd] Added C++ API code for semantic highlighting

2019-06-27 Thread Johan Vikström via Phabricator via cfe-commits
jvikstrom marked 2 inline comments as done. jvikstrom added inline comments. Comment at: clang-tools-extra/clangd/ClangdServer.h:60 + // Called by ClangdServer when some \p Highlightings for \p File are ready. + virtual void onHighlightingsReady(PathRef File, +

[PATCH] D63821: [clangd] Added C++ API code for semantic highlighting

2019-06-27 Thread Johan Vikström via Phabricator via cfe-commits
jvikstrom updated this revision to Diff 206792. jvikstrom added a comment. Herald added a subscriber: jfb. Moved semantic highlighting to be processed in onMainAST Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63821/new/

[PATCH] D63048: Update __VERSION__ to remove the hardcoded 4.2.1 version

2019-06-27 Thread Sylvestre Ledru via Phabricator via cfe-commits
sylvestre.ledru added a comment. @rnk how do you feel about removing both? I can take care of that if you want Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63048/new/ https://reviews.llvm.org/D63048 ___ cfe-commits

[PATCH] D63518: BitStream reader: propagate errors

2019-06-27 Thread Alex Brachet via Phabricator via cfe-commits
abrachet added inline comments. Comment at: llvm/trunk/lib/Bitcode/Reader/BitcodeReader.cpp:205 + return MaybeBitCode.takeError(); +switch (unsigned BitCode = MaybeBitCode.get()) { default: // Default behavior: reject This and an identical switch

[PATCH] D61479: Finish "Adapt -fsanitize=function to SANITIZER_NON_UNIQUE_TYPEINFO"

2019-06-27 Thread Stephan Bergmann via Phabricator via cfe-commits
sberg added a subscriber: cfe-commits. sberg added a comment. Any thoughts on this? (cfe-commits had inadvertently been missing from subscribers, it touches clang as well as compiler-rt.) CHANGES SINCE LAST ACTION https://reviews.llvm.org/D61479/new/ https://reviews.llvm.org/D61479

r364502 - [clang] Add DISuprogram and DIE for a func decl

2019-06-27 Thread Djordje Todorovic via cfe-commits
Author: djtodoro Date: Wed Jun 26 23:44:44 2019 New Revision: 364502 URL: http://llvm.org/viewvc/llvm-project?rev=364502=rev Log: [clang] Add DISuprogram and DIE for a func decl Attach a unique DISubprogram to a function declaration that will be used for call site debug info. ([7/13] Introduce

[PATCH] D63856: [ObjC] Add a -Wtautological-compare warning for BOOL

2019-06-27 Thread Erik Pilkington via Phabricator via cfe-commits
erik.pilkington added a comment. In D63856#1560180 , @rjmccall wrote: > This only applies to relational operators, right? I'm a little uncomfortable > with calling this "tautological" since it's not like it's *undefined > behavior* to have `(BOOL) 2`,

<    1   2