[PATCH] D63986: [clangd] Also cache failures while indexing

2019-07-01 Thread Sam McCall via Phabricator via cfe-commits
sammccall added a comment. Change looks sensible, just wondering if we should keep the main-file symbols/refs, and whether we can simplify/unify a bit. Comment at: clang-tools-extra/clangd/index/Background.cpp:359 } // Build and store new slabs for each updated file.

[PATCH] D63773: [clangd] dummy variable extraction on a function scope

2019-07-01 Thread Sam McCall via Phabricator via cfe-commits
sammccall added inline comments. Comment at: clang-tools-extra/clangd/refactor/tweaks/ExtractVariable.cpp:71 +} +std::vector Extract::getReferencedDecls() { + // RAV subclass to find all DeclRefs in a given Stmt SureYeaah wrote: > kadircet wrote: > > this

[PATCH] D63603: [ASTImporter] Propagate error from ImportDeclContext

2019-07-01 Thread Gabor Marton via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL364752: [ASTImporter] Propagate error from ImportDeclContext (authored by martong, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Changed prior to commit:

r364752 - [ASTImporter] Propagate error from ImportDeclContext

2019-07-01 Thread Gabor Marton via cfe-commits
Author: martong Date: Mon Jul 1 05:44:39 2019 New Revision: 364752 URL: http://llvm.org/viewvc/llvm-project?rev=364752=rev Log: [ASTImporter] Propagate error from ImportDeclContext Summary: During analysis of one project we failed to import one CXXDestructorDecl. But since we did not propagate

[PATCH] D63295: [clang][HeaderSearch] Shorten paths for includes in mainfile's directory

2019-07-01 Thread Dmitri Gribenko via Phabricator via cfe-commits
gribozavr accepted this revision. gribozavr added a comment. This revision is now accepted and ready to land. I'm not an expert in this code, but it looks reasonable. Comment at: clang-tools-extra/clangd/Headers.h:155 + /// \param IncludingFile Used to shorten the include for

[PATCH] D63295: [clang][HeaderSearch] Shorten paths for includes in mainfile's directory

2019-07-01 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added a comment. ping Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63295/new/ https://reviews.llvm.org/D63295 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D63931: [clangd] Make PreambleStatusCache handle filenames more carefully

2019-07-01 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet accepted this revision. kadircet added a comment. This revision is now accepted and ready to land. LGTM, thanks Repository: rCTE Clang Tools Extra CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63931/new/ https://reviews.llvm.org/D63931

[PATCH] D63936: [ARM] Minor fixes in command line option parsing

2019-07-01 Thread Sjoerd Meijer via Phabricator via cfe-commits
SjoerdMeijer added a comment. I will let Oliver finish the review (I am off for a few days), just some drive-by comments. Comment at: llvm/lib/Support/ARMTargetParser.cpp:412 - if (Extensions & AEK_CRC) -Features.push_back("+crc"); - else -

[PATCH] D63623: [clang-tidy] new check: bugprone-posix-return

2019-07-01 Thread Dmitri Gribenko via Phabricator via cfe-commits
gribozavr accepted this revision. gribozavr added a comment. Good improvements! Comment at: clang-tools-extra/clang-tidy/bugprone/PosixReturnCheck.cpp:21 +static StringRef getFunctionSpelling(const MatchFinder::MatchResult , const char *BindingStr) { + const CallExpr

[PATCH] D63892: [LibTooling] Extend `RewriteRule` with support for adding includes.

2019-07-01 Thread Dmitri Gribenko via Phabricator via cfe-commits
gribozavr accepted this revision. gribozavr added a comment. LGTM, thanks! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63892/new/ https://reviews.llvm.org/D63892 ___ cfe-commits mailing list

[PATCH] D63893: [clang-tidy] Extend TransformerClangTidyCheck to support adding includes.

2019-07-01 Thread Dmitri Gribenko via Phabricator via cfe-commits
gribozavr accepted this revision. gribozavr added inline comments. Comment at: clang-tools-extra/clang-tidy/utils/TransformerClangTidyCheck.cpp:51 + // includes. + if (Rule && std::any_of(Rule->Cases.begin(), Rule->Cases.end(), + [](const

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

2019-07-01 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D63845#1562006 , @wsmoses wrote: > Just to preface these comments -- this is work in progress and not intended > to go in as is / without discussion (but happily is indeed inviting > discussion). Fantastic! > In

[PATCH] D62829: [clang-tidy] Check for dynamically initialized statics in headers.

2019-07-01 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang-tools-extra/clang-tidy/bugprone/DynamicStaticInitializersCheck.cpp:40 +return; + Finder->addMatcher(varDecl().bind("var"), this); +} czhang wrote: > lebedev.ri wrote: > > Most of the matching should be

[clang-tools-extra] r364747 - [clangd] No longer getting template instantiations from header files in Main AST.

2019-07-01 Thread Johan Vikstrom via cfe-commits
Author: jvikstrom Date: Mon Jul 1 04:49:01 2019 New Revision: 364747 URL: http://llvm.org/viewvc/llvm-project?rev=364747=rev Log: [clangd] No longer getting template instantiations from header files in Main AST. Previous implementation to filter decls not in the main file did not work in the

[PATCH] D63817: [clangd] No longer getting template instantiations from header files in Main AST.

2019-07-01 Thread Johan Vikström via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL364747: [clangd] No longer getting template instantiations from header files in Main… (authored by jvikstrom, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits.

[PATCH] D63773: [clangd] dummy variable extraction on a function scope

2019-07-01 Thread Shaurya Gupta via Phabricator via cfe-commits
SureYeaah marked 13 inline comments as done. SureYeaah added inline comments. Comment at: clang-tools-extra/clangd/refactor/tweaks/ExtractVariable.cpp:71 +} +std::vector Extract::getReferencedDecls() { + // RAV subclass to find all DeclRefs in a given Stmt

[PATCH] D61681: [clangd] A code tweak to expand a macro

2019-07-01 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/refactor/tweaks/ExpandMacro.cpp:57 + if (It == Spelled.begin()) +return Spelled.end(); + // Check the token we found

[PATCH] D63989: Summary: [Clangd] Added hidden flag --disable-tweaks to disable tweaks- Only for testing purposes

2019-07-01 Thread Shaurya Gupta via Phabricator via cfe-commits
SureYeaah created this revision. SureYeaah added reviewers: sammccall, kadircet. Herald added subscribers: cfe-commits, arphaman, jkorous, MaskRay, ilya-biryukov. Herald added a project: clang. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D63989 Files:

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

2019-07-01 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D63082#1560667 , @xbolva00 wrote: > 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

[PATCH] D63603: [ASTImporter] Propagate error from ImportDeclContext

2019-07-01 Thread Gabor Marton via Phabricator via cfe-commits
martong added a comment. @shafik I've been looking for any lldb regression in our Mac machine, could not find any. Now I am looking at http://green.lab.llvm.org/green/view/LLDB/job/lldb-cmake/ . I don't expect regression because here we changed logic about the error handling only, so I'd

[PATCH] D62375: [ASTImporter] Mark erroneous nodes in from ctx

2019-07-01 Thread Gabor Marton via Phabricator via cfe-commits
martong updated this revision to Diff 207288. martong marked an inline comment as done. martong added a comment. - Move ImportPathTy's funcitons in-class, add class comment Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D62375/new/

[PATCH] D63603: [ASTImporter] Propagate error from ImportDeclContext

2019-07-01 Thread Gabor Marton via Phabricator via cfe-commits
martong added a comment. Jenkins is green: http://green.lab.llvm.org/green/view/LLDB/job/lldb-cmake/29802/ Repository: rL LLVM CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63603/new/ https://reviews.llvm.org/D63603 ___ cfe-commits

[PATCH] D62375: [ASTImporter] Mark erroneous nodes in from ctx

2019-07-01 Thread Gabor Marton via Phabricator via cfe-commits
martong marked 3 inline comments as done. martong added a comment. > Thank you for the explanation. I got the idea of this patch anyway, but it > will be definitely useful for anyone digging into the code. Should we make it > a comment for ImportPathTy? Ok, I have added the explanation to

[PATCH] D63817: [clangd] No longer getting template instantiations from header files in Main AST.

2019-07-01 Thread Haojian Wu via Phabricator via cfe-commits
hokein accepted this revision. hokein added a comment. This revision is now accepted and ready to land. Looks good, please update the patch description (in git, and phabricator), mentioning why the previous solution won't work. Comment at:

[PATCH] D63926: [clangd] Make FixIt message be consistent with the clang-tidy diagnostic message.

2019-07-01 Thread Haojian Wu via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL364731: [clangd] Make FixIt message be consistent with the clang-tidy diagnostic… (authored by hokein, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Changed prior

[PATCH] D63922: [clangd] Show better message when we rename macros.

2019-07-01 Thread Haojian Wu via Phabricator via cfe-commits
hokein added inline comments. Comment at: clang-tools-extra/clangd/SourceCode.h:204 +struct MacroSym { + llvm::StringRef Name; sammccall wrote: > sammccall wrote: > > not sure about "sym" - it's an abbreviation and not very descriptive. > > `MacroDefinition`

[PATCH] D63986: [clangd] Also cache failures while indexing

2019-07-01 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet created this revision. kadircet added a reviewer: sammccall. Herald added subscribers: cfe-commits, arphaman, jkorous, MaskRay, ilya-biryukov. Herald added a project: clang. Clangd currently doesn't cache any indexing failures, which results in retrying those failed files even if their

[PATCH] D62855: [clangd] Implementation of auto type expansion.

2019-07-01 Thread Sam McCall via Phabricator via cfe-commits
sammccall added a comment. Let's chat offline about how to land this. Main points are: - we may just be able to use the AutoTypeLoc instead of the separate RecursiveASTVisitor. (If so, we can do more checks in prepare()) - I have lots of questions about where to draw the line on

[PATCH] D63773: [clangd] dummy variable extraction on a function scope

2019-07-01 Thread Sam McCall via Phabricator via cfe-commits
sammccall added a comment. Comments re the `Extract` class. It seems OK to me, i'm not really sure whether it's an improvement or not after the pieces (needsBraces, checForStmt etc) are removed. Up to you. (As the previous comments would reduce the scope of the patch, it'd be nice to address

[clang-tools-extra] r364741 - [clangd] Fix unused var from r364735

2019-07-01 Thread Sam McCall via cfe-commits
Author: sammccall Date: Mon Jul 1 03:13:03 2019 New Revision: 364741 URL: http://llvm.org/viewvc/llvm-project?rev=364741=rev Log: [clangd] Fix unused var from r364735 Modified: clang-tools-extra/trunk/clangd/XRefs.cpp Modified: clang-tools-extra/trunk/clangd/XRefs.cpp URL:

[PATCH] D63936: [ARM] Minor fixes in command line option parsing

2019-07-01 Thread Oliver Stannard (Linaro) via Phabricator via cfe-commits
ostannard added a comment. > The second change this patch makes Could this be spilt into two patches? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63936/new/ https://reviews.llvm.org/D63936 ___

[clang-tools-extra] r364740 - [clangd] Make PreambleStatusCache handle filenames more carefully

2019-07-01 Thread Sam McCall via cfe-commits
Author: sammccall Date: Mon Jul 1 03:11:18 2019 New Revision: 364740 URL: http://llvm.org/viewvc/llvm-project?rev=364740=rev Log: [clangd] Make PreambleStatusCache handle filenames more carefully Summary: - when we hit the cache, the reported filename should be that of the cache query, not

[PATCH] D63931: [clangd] Make PreambleStatusCache handle filenames more carefully

2019-07-01 Thread Sam McCall via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL364740: [clangd] Make PreambleStatusCache handle filenames more carefully (authored by sammccall, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Repository: rL

[clang-tools-extra] r364731 - [clangd] Make FixIt message be consistent with the clang-tidy diagnostic message.

2019-07-01 Thread Haojian Wu via cfe-commits
Author: hokein Date: Mon Jul 1 01:05:53 2019 New Revision: 364731 URL: http://llvm.org/viewvc/llvm-project?rev=364731=rev Log: [clangd] Make FixIt message be consistent with the clang-tidy diagnostic message. Summary: We strip the "[clang-tidy-check]" suffix from the clang-tidy diagnostics, we

[PATCH] D63919: [clangd] Emit publishSemanticHighlighting in LSP if enabled

2019-07-01 Thread Johan Vikström via Phabricator via cfe-commits
jvikstrom updated this revision to Diff 207241. jvikstrom marked 13 inline comments as done. jvikstrom added a comment. Addressed comments. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63919/new/ https://reviews.llvm.org/D63919 Files:

[PATCH] D63922: [clangd] Show better message when we rename macros.

2019-07-01 Thread Haojian Wu via Phabricator via cfe-commits
hokein updated this revision to Diff 207244. hokein marked 7 inline comments as done. hokein added a comment. Address review comments: - renaming - add unittest Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63922/new/

[PATCH] D63773: [clangd] dummy variable extraction on a function scope

2019-07-01 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added inline comments. Comment at: clang-tools-extra/clangd/refactor/tweaks/ExtractVariable.cpp:34 +// class to store information about the Expr that is being extracted +class Extract { +public: most of the methods seem to be taking a SM, why not make

[PATCH] D63922: [clangd] Show better message when we rename macros.

2019-07-01 Thread Haojian Wu via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL364735: [clangd] Show better message when we rename macros. (authored by hokein, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Changed prior to commit:

[clang-tools-extra] r364735 - [clangd] Show better message when we rename macros.

2019-07-01 Thread Haojian Wu via cfe-commits
Author: hokein Date: Mon Jul 1 02:26:48 2019 New Revision: 364735 URL: http://llvm.org/viewvc/llvm-project?rev=364735=rev Log: [clangd] Show better message when we rename macros. Summary: Previously, when we rename a macro, we get an error message of "there is no symbol found". This patch

[PATCH] D59415: Do not resolve directory junctions for `-fdiagnostics-absolute-paths` on Windows.

2019-07-01 Thread Igor Kudrin via Phabricator via cfe-commits
ikudrin added a comment. I am not sure what you mean by "break". Can you share a reproducer? Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59415/new/ https://reviews.llvm.org/D59415 ___ cfe-commits mailing list

[PATCH] D63989: Summary: [Clangd] Added hidden flag --disable-tweaks to disable tweaks

2019-07-01 Thread Sam McCall via Phabricator via cfe-commits
sammccall added a comment. Sorry, hit submit too early... We could use `-tweaks=comma,separated,list` and have the ClangdServer::Options member be a `function TweakFilter` or so Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63989/new/

[PATCH] D63986: [clangd] Also cache failures while indexing

2019-07-01 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet updated this revision to Diff 207296. kadircet marked 4 inline comments as done. kadircet added a comment. - Address comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63986/new/ https://reviews.llvm.org/D63986 Files:

[PATCH] D63640: [clang] Improve Serialization/Imporing of APValues

2019-07-01 Thread Gabor Marton via Phabricator via cfe-commits
martong added a comment. Comment at: clang/include/clang/AST/ASTImporter.h:331 +/// +/// \return the equivalent APValue in the "from" Constext or the import +/// error. typo: `Constext` -> `Context` Also, we return with the APValue in the "to"

[PATCH] D62375: [ASTImporter] Mark erroneous nodes in from ctx

2019-07-01 Thread Gabor Marton via Phabricator via cfe-commits
martong added a comment. @shafik I've been looking for any lldb regression in our Mac machine, could not find any. Now I am looking at http://green.lab.llvm.org/green/view/LLDB/job/lldb-cmake/ . I don't expect regression because here we changed logic about the error handling only, so I'd

[PATCH] D61637: [Syntax] Introduce syntax trees

2019-07-01 Thread Sam McCall via Phabricator via cfe-commits
sammccall accepted this revision. sammccall added a comment. This revision is now accepted and ready to land. Nice, let's land this! Comment at: clang/include/clang/Tooling/Syntax/Nodes.h:35 +/// A root node for a translation unit. Parent is always null. +class

[PATCH] D64008: [RISCV] Avoid save-restore target feature warning

2019-07-01 Thread Sam Elliott via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL364777: [RISCV] Avoid save-restore target feature warning (authored by lenary, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Changed prior to commit:

r364777 - [RISCV] Avoid save-restore target feature warning

2019-07-01 Thread Sam Elliott via cfe-commits
Author: lenary Date: Mon Jul 1 07:53:56 2019 New Revision: 364777 URL: http://llvm.org/viewvc/llvm-project?rev=364777=rev Log: [RISCV] Avoid save-restore target feature warning Summary: LLVM issues a warning if passed unknown target features. Neither I nor @asb noticed this until after

[PATCH] D60455: [SYCL] Implement SYCL device code outlining

2019-07-01 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/include/clang/Basic/Attr.td:1034 + let Spellings = [Clang<"sycl_kernel">]; + let Subjects = SubjectList<[Function]>; + let LangOpts = [SYCL]; Shouldn't this be `FunctionTemplate` instead?

r364771 - [ASTImporter] Mark erroneous nodes in from ctx

2019-07-01 Thread Gabor Marton via cfe-commits
Author: martong Date: Mon Jul 1 07:19:53 2019 New Revision: 364771 URL: http://llvm.org/viewvc/llvm-project?rev=364771=rev Log: [ASTImporter] Mark erroneous nodes in from ctx Summary: During import of a specific Decl D, it may happen that some AST nodes had already been created before we

[PATCH] D62375: [ASTImporter] Mark erroneous nodes in from ctx

2019-07-01 Thread Gabor Marton via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL364771: [ASTImporter] Mark erroneous nodes in from ctx (authored by martong, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Changed prior to commit:

[PATCH] D63954: Add lifetime categories attributes

2019-07-01 Thread Dmitri Gribenko via Phabricator via cfe-commits
gribozavr added a comment. > We explicitly allow to add an annotation after the definition of the class to > allow adding annotations to external source from by the user Asking users to forward-declare anything from the standard library is a very bad idea -- in fact it is undefined behavior.

[PATCH] D61467: [Rewrite] Extend to further accept CharSourceRange

2019-07-01 Thread Joel E. Denny via Phabricator via cfe-commits
jdenny updated this revision to Diff 207301. jdenny added a comment. Rebased, fixed a comment, and applied a clang-format suggestion. Ping. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D61467/new/ https://reviews.llvm.org/D61467 Files: clang/include/clang/Rewrite/Core/Rewriter.h

[PATCH] D63295: [clang][HeaderSearch] Shorten paths for includes in mainfile's directory

2019-07-01 Thread Haojian Wu via Phabricator via cfe-commits
hokein added a comment. Discussed it offline, technically taking the main file directory into account when shorten the #include path would not break the compiler, but it may introduce issues violating the code style -- in clangd codebase, we prefer to use "#include "/header.h" style, e.g.

[PATCH] D63295: [clang][HeaderSearch] Shorten paths for includes in mainfile's directory

2019-07-01 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet updated this revision to Diff 207308. kadircet marked 3 inline comments as done. kadircet added a comment. - Address comments. - Use TUs path as a fallback, rather than a search path. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D63989: Summary: [Clangd] Added hidden flag --disable-tweaks to disable tweaks

2019-07-01 Thread Shaurya Gupta via Phabricator via cfe-commits
SureYeaah updated this revision to Diff 207313. SureYeaah added a comment. Replaced the boolean flag with a list of tweaks flag Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63989/new/ https://reviews.llvm.org/D63989 Files:

[PATCH] D63986: [clangd] Also cache failures while indexing

2019-07-01 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet updated this revision to Diff 207316. kadircet marked 5 inline comments as done. kadircet added a comment. - Address comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63986/new/ https://reviews.llvm.org/D63986 Files:

[PATCH] D63989: Summary: [Clangd] Added hidden flag --disable-tweaks to disable tweaks

2019-07-01 Thread Sam McCall via Phabricator via cfe-commits
sammccall added a comment. This seems somewhat inflexible; how can we use this to test tweaks? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63989/new/ https://reviews.llvm.org/D63989 ___ cfe-commits

[PATCH] D64008: [RISCV] Avoid save-restore target feature warning

2019-07-01 Thread Sam Elliott via Phabricator via cfe-commits
lenary created this revision. lenary added a reviewer: asb. Herald added subscribers: cfe-commits, Jim, benna, psnobl, jocewei, PkmX, rkruppe, the_o, brucehoult, MartinMosbeck, rogfer01, edward-jones, zzheng, jrtc27, shiva0217, kito-cheng, niosHD, sabuasal, apazos, simoncook, johnrusso, rbar.

[PATCH] D63954: Add lifetime categories attributes

2019-07-01 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D63954#1562928 , @erik.pilkington wrote: > > We explicitly allow to add an annotation after > > the definition of the class to allow adding annotations > > to external source from by the user, e.g. > > > > #include

[PATCH] D63482: [clang-tidy] Fix the YAML created for checks like modernize-pass-by-value

2019-07-01 Thread Dmitri Gribenko via Phabricator via cfe-commits
gribozavr added inline comments. Comment at: clang/include/clang/Tooling/ReplacementsYaml.h:35 +: FilePath(""), Offset(0), Length(0), ReplacementText("") { + size_t lineBreakPos = ReplacementText.find('\n'); + while (lineBreakPos != std::string::npos) {

[PATCH] D63986: [clangd] Also cache failures while indexing

2019-07-01 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added inline comments. Comment at: clang-tools-extra/clangd/index/IndexAction.cpp:161 CI.getDiagnostics().hasUncompilableErrorOccurred()) { llvm::errs() << "Skipping TU due to uncompilable errors\n"; +} else { sammccall wrote: > I'm

[PATCH] D64008: [RISCV] Avoid save-restore target feature warning

2019-07-01 Thread Alex Bradbury via Phabricator via cfe-commits
asb accepted this revision. asb added a comment. This revision is now accepted and ready to land. LGTM, thanks. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D64008/new/ https://reviews.llvm.org/D64008

[PATCH] D63986: [clangd] Also cache failures while indexing

2019-07-01 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! Comment at: clang-tools-extra/clangd/index/Background.cpp:140 + +void storeSlabs(BackgroundIndexStorage *IndexStorage, PathRef Identifier, +

r364774 - [ASTImporter] Silence unused variable warning in Release builds. NFC.

2019-07-01 Thread Benjamin Kramer via cfe-commits
Author: d0k Date: Mon Jul 1 07:33:26 2019 New Revision: 364774 URL: http://llvm.org/viewvc/llvm-project?rev=364774=rev Log: [ASTImporter] Silence unused variable warning in Release builds. NFC. Modified: cfe/trunk/lib/AST/ASTImporter.cpp Modified: cfe/trunk/lib/AST/ASTImporter.cpp URL:

[PATCH] D63295: [clang][HeaderSearch] Shorten paths for includes in mainfile's directory

2019-07-01 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet updated this revision to Diff 207312. kadircet added a comment. - Add comments to the CheckDir lambda. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63295/new/ https://reviews.llvm.org/D63295 Files:

[PATCH] D63989: [Clangd] Added hidden command line option -tweaks to specify which tweaks to enable

2019-07-01 Thread Shaurya Gupta via Phabricator via cfe-commits
SureYeaah updated this revision to Diff 207323. SureYeaah added a comment. Whitespace formatting Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63989/new/ https://reviews.llvm.org/D63989 Files: clang-tools-extra/clangd/ClangdServer.cpp

[PATCH] D63989: [Clangd] Added hidden command line option -tweaks to specify which tweaks to enable

2019-07-01 Thread Shaurya Gupta via Phabricator via cfe-commits
SureYeaah updated this revision to Diff 207321. SureYeaah added a comment. Removed extra comment Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63989/new/ https://reviews.llvm.org/D63989 Files: clang-tools-extra/clangd/ClangdServer.cpp

[PATCH] D64015: [WIP][CUDA] Use shared MangleContext for CUDA and CXX CG

2019-07-01 Thread Philip Salzmann via Phabricator via cfe-commits
psalz created this revision. psalz added reviewers: hliao, tra, aheejin. Herald added a project: clang. Herald added a subscriber: cfe-commits. NOTE: This is a work in progress and mainly intended to highlight the issue - i.e., I'm not certain the provided solution is appropriate. Given this

[PATCH] D62376: [ASTImporter] Mark erroneous nodes in shared st

2019-07-01 Thread Gabor Marton via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL364785: [ASTImporter] Mark erroneous nodes in shared st (authored by martong, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Changed prior to commit:

r364785 - [ASTImporter] Mark erroneous nodes in shared st

2019-07-01 Thread Gabor Marton via cfe-commits
Author: martong Date: Mon Jul 1 08:37:07 2019 New Revision: 364785 URL: http://llvm.org/viewvc/llvm-project?rev=364785=rev Log: [ASTImporter] Mark erroneous nodes in shared st Summary: Now we store the errors for the Decls in the "to" context too. For that, however, we have to put these errors

[PATCH] D62376: [ASTImporter] Mark erroneous nodes in shared st

2019-07-01 Thread Gabor Marton via Phabricator via cfe-commits
martong added a comment. @shafik I've been looking for any lldb regression in our Mac machine, could not find any. Now I am looking at http://green.lab.llvm.org/green/view/LLDB/job/lldb-cmake/ . I don't expect regression because here we changed logic about the error handling only, so I'd

[PATCH] D63954: Add lifetime categories attributes

2019-07-01 Thread Gábor Horváth via Phabricator via cfe-commits
xazax.hun added a comment. In D63954#1564448 , @gribozavr wrote: > > We explicitly allow to add an annotation after the definition of the class > > to allow adding annotations to external source from by the user > > Asking users to forward-declare

[PATCH] D63986: [clangd] Also cache failures while indexing

2019-07-01 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added inline comments. Comment at: clang-tools-extra/clangd/index/Background.cpp:313 +// we don't even know what absolute path they should fall in. +if (HadErrors && !IGN.IsTU) + continue; sammccall wrote: > Maybe add a FIXME that we should

[PATCH] D62782: Fix -Wdouble-promotion warnings.

2019-07-01 Thread Bruce Mitchener via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL364798: Fix -Wdouble-promotion warnings. (authored by brucem, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Repository: rL LLVM CHANGES SINCE LAST ACTION

[PATCH] D64019: [clangd] Turn background-index on by default

2019-07-01 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet created this revision. kadircet added a reviewer: sammccall. Herald added subscribers: cfe-commits, arphaman, jkorous, MaskRay, ilya-biryukov. Herald added a project: clang. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D64019 Files:

[PATCH] D43226: __threading_support: Remove (void) in favor of ().

2019-07-01 Thread Bruce Mitchener via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL364799: __threading_support: Remove (void) in favor of (). (authored by brucem, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Repository: rL LLVM CHANGES SINCE

[PATCH] D60974: Clang IFSO driver action.

2019-07-01 Thread Puyan Lotfi via Phabricator via cfe-commits
plotfi added a comment. In D60974#1564747 , @ymandel wrote: > The tests for this code are failing in my build. Any suggestions welcome. > > My setup: > > cmake -G Ninja -DCMAKE_BUILD_TYPE=Release > -DCMAKE_C_COMPILER=/usr/bin/clang-7

[PATCH] D62329: [ASTImporter] Structural eq: handle DependentScopeDeclRefExpr

2019-07-01 Thread Gabor Marton via Phabricator via cfe-commits
martong updated this revision to Diff 207354. martong added a comment. - Handle ImplicitCastExpr. In Clang7 in the last two test cases we did not have any ImplicitCastExpr in the AST. With never Clang we have, so we must handle the cast expr too. Repository: rG LLVM Github Monorepo CHANGES

[PATCH] D63954: Add lifetime categories attributes

2019-07-01 Thread Gábor Horváth via Phabricator via cfe-commits
xazax.hun added inline comments. Comment at: clang/lib/Sema/SemaDeclAttr.cpp:4553 + // we always add (and check) the attribute to the cannonical decl. + D = D->getCanonicalDecl(); + if(AL.getKind() == ParsedAttr::AT_Owner) { aaron.ballman wrote: > xazax.hun

[PATCH] D62375: [ASTImporter] Mark erroneous nodes in from ctx

2019-07-01 Thread Gabor Marton via Phabricator via cfe-commits
martong added a comment. Jenkins is green: http://green.lab.llvm.org/green/view/LLDB/job/lldb-cmake/29809/ Repository: rL LLVM CHANGES SINCE LAST ACTION https://reviews.llvm.org/D62375/new/ https://reviews.llvm.org/D62375 ___ cfe-commits

[PATCH] D63989: [Clangd] Added hidden command line option -tweaks to specify which tweaks to enable

2019-07-01 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/ClangdServer.h:145 +/// Returns true if the StringRef is a tweak that should be enabled +std::function TweakFilter; +

[PATCH] D56650: [lld] [ELF] Support customizing behavior on target triple

2019-07-01 Thread Kamil Rytarowski via Phabricator via cfe-commits
krytarowski added a comment. Herald added a subscriber: MaskRay. @ruiu ping? LLVM 9 is branching soon and we would like to unearth from local patches. From the internal discussions it was decided that we want to maintain our current behavior that differs to Linux. CHANGES SINCE LAST ACTION

[PATCH] D60974: Clang IFSO driver action.

2019-07-01 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel added a comment. The tests for this code are failing in my build. Any suggestions welcome. My setup: cmake -G Ninja -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_COMPILER=/usr/bin/clang-7 -DCMAKE_CXX_COMPILER=/usr/bin/clang++-7 -DCMAKE_C_FLAGS='-gmlt -Wall' -DCMAKE_CXX_FLAGS='-gmlt -Wall'

[PATCH] D63710: [SYCL] Re-use OpenCL sampler in SYCL device mode

2019-07-01 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added a comment. > For instance, OpenCL kernel in SYCL mode initializes lambda captures with > the kernel argument values. This initialization code for sampler emits > errors because OpenCL disallows sampler on the right hand side of the > binary operators - these are supposed to be

[PATCH] D62782: Fix -Wdouble-promotion warnings.

2019-07-01 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists accepted this revision. mclow.lists added a comment. This revision is now accepted and ready to land. Sorry for the slow response. Repository: rCXX libc++ CHANGES SINCE LAST ACTION https://reviews.llvm.org/D62782/new/ https://reviews.llvm.org/D62782

[PATCH] D63936: [ARM] Minor fixes in command line option parsing

2019-07-01 Thread Alexandros Lamprineas via Phabricator via cfe-commits
labrinea added a comment. In D63936#1563872 , @ostannard wrote: > > The second change this patch makes > > Could this be spilt into two patches? Looking at D62998 more carefully I realized that we deliberately favor

[PATCH] D64018: [clangd] Store hash of command line in index shards.

2019-07-01 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet created this revision. kadircet added a reviewer: sammccall. Herald added subscribers: cfe-commits, arphaman, jkorous, MaskRay, ilya-biryukov. Herald added a project: clang. This is to enable cache invalidation when command line flags changes. Repository: rG LLVM Github Monorepo

[PATCH] D63954: Add lifetime categories attributes

2019-07-01 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/lib/Sema/SemaDeclAttr.cpp:4553 + // we always add (and check) the attribute to the cannonical decl. + D = D->getCanonicalDecl(); + if(AL.getKind() == ParsedAttr::AT_Owner) { xazax.hun wrote: >

[PATCH] D63936: [ARM] Minor fixes in command line option parsing

2019-07-01 Thread Simon Tatham via Phabricator via cfe-commits
simon_tatham added a comment. I can't shed as much light as you might hope, I'm afraid, but in D62998 my intention was not to make `-mcpu=anything` win over `-mfpu=anything`. It was to make an //explicit// request to enable a feature win over an //implicit//

[PATCH] D43159: Modernize: Use nullptr more.

2019-07-01 Thread Bruce Mitchener via Phabricator via cfe-commits
brucem updated this revision to Diff 207356. brucem added a comment. Updating to current master. Repository: rCXX libc++ CHANGES SINCE LAST ACTION https://reviews.llvm.org/D43159/new/ https://reviews.llvm.org/D43159 Files: include/__locale include/__sso_allocator include/__string

[PATCH] D43159: Modernize: Use nullptr more.

2019-07-01 Thread Bruce Mitchener via Phabricator via cfe-commits
brucem added a comment. In addition to my previous explanation for the concerns about using `nullptr` more ... it should be noted that many of these files already use `nullptr`. Repository: rCXX libc++ CHANGES SINCE LAST ACTION https://reviews.llvm.org/D43159/new/

[PATCH] D62376: [ASTImporter] Mark erroneous nodes in shared st

2019-07-01 Thread Gabor Marton via Phabricator via cfe-commits
martong added a comment. Jenkins had one unrelated failure at http://green.lab.llvm.org/green/view/LLDB/job/lldb-cmake/29812/ Test Result (1 failure / +1) LLDB.Reproducer.TestGDBRemoteRepro.test After that the next build is green:

[PATCH] D63989: [Clangd] Added hidden command line option -tweaks to specify which tweaks to enable

2019-07-01 Thread Shaurya Gupta via Phabricator via cfe-commits
SureYeaah updated this revision to Diff 207358. SureYeaah marked 3 inline comments as done. SureYeaah added a comment. Refactored code Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63989/new/ https://reviews.llvm.org/D63989 Files:

[PATCH] D63936: [ARM] Minor fixes in command line option parsing

2019-07-01 Thread Alexandros Lamprineas via Phabricator via cfe-commits
labrinea added a comment. @simon_tatham, thanks for clarifying. I think my change is doing the right thing then: favors the `-mfpu` option over the default CPU features. I will split the patch as @ostannard suggested. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D51262: Implement P0553 and P0556

2019-07-01 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF added a comment. I would like to see a version of this after the inline comments are addressed. Comment at: libcxx/include/bit:193 + is_unsigned_v<_Tp> && +!is_same_v, bool> && +!is_same_v, char> && `_IsNotSame` is faster and

[PATCH] D63989: [Clangd] Added hidden command line option -tweaks to specify which tweaks to enable

2019-07-01 Thread Shaurya Gupta via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL364809: Summary: [Clangd] Added hidden command line option -tweaks to specify which… (authored by SureYeaah, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Changed

[PATCH] D63986: [clangd] Also cache failures while indexing

2019-07-01 Thread Sam McCall via Phabricator via cfe-commits
sammccall added a comment. Still LG Comment at: clang-tools-extra/clangd/index/Background.cpp:313 +// we don't even know what absolute path they should fall in. +if (HadErrors && !IGN.IsTU) + continue; kadircet wrote: > sammccall wrote: > > Maybe

[PATCH] D51262: Implement P0553 and P0556

2019-07-01 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 added inline comments. Comment at: libcxx/include/bit:211 +? __t +: (__t << (__cnt % __dig)) | (__t >> (__dig - (__cnt % __dig))); +} mclow.lists wrote: > Quuxplusone wrote: > > No sane compiler would actually generate three `mod`

[PATCH] D63876: [OpenCL] Define CLK_NULL_EVENT without cast

2019-07-01 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added a comment. btw, there seems to be the same issue with `reserve_id_t`? Comment at: lib/Headers/opencl-c-base.h:416 #define CLK_NULL_QUEUE 0 -#define CLK_NULL_EVENT (__builtin_astype(((void*)(__SIZE_MAX__)), clk_event_t)) +#define

[PATCH] D64015: [WIP][CUDA] Use shared MangleContext for CUDA and CXX CG

2019-07-01 Thread Erich Keane via Phabricator via cfe-commits
erichkeane added a comment. I don't know of any problems that the shared mangle context would cause, though I'm not sure about using the shared_ptr. It seems to me that SOMEONE should own this, and the other should use a reference. IMO, the SharedMangleContexts should be a unique_ptr and

  1   2   3   >