[PATCH] D67888: [clang-format] NFC clang-format the clang-format unit tests

2019-09-23 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay added a comment. In D67888#1678465 , @owenpan wrote: > I suppose the .clang-format file you used only had `BasedOnStyle: LLVM` in > it. Did you run clang-format the second time to ensure that the formatted > file was stable? it used the

[PATCH] D63607: [clang][driver] Add basic --driver-mode=flang support for fortran

2019-09-23 Thread Richard Barton via Phabricator via cfe-commits
richard.barton.arm added a comment. I think the behaviour for missing flang is fine for now, and I think we can improve on it later on. We ought to codify (if it is not done already) where flang looks for tools to exec, because I think PATH is probably not the only place it could look to (dire

[PATCH] D67496: [clangd] Collect macros in the preamble region of the main file

2019-09-23 Thread Haojian Wu via Phabricator via cfe-commits
hokein added a comment. Herald added a subscriber: usaxena95. friendly ping, in case you missing it :) Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D67496/new/ https://reviews.llvm.org/D67496 ___ cfe-c

r372562 - [Alignment] fix build

2019-09-23 Thread Guillaume Chatelet via cfe-commits
Author: gchatelet Date: Mon Sep 23 02:04:12 2019 New Revision: 372562 URL: http://llvm.org/viewvc/llvm-project?rev=372562&view=rev Log: [Alignment] fix build Modified: cfe/trunk/lib/CodeGen/CGCall.cpp Modified: cfe/trunk/lib/CodeGen/CGCall.cpp URL: http://llvm.org/viewvc/llvm-project/cfe/tr

[PATCH] D65433: [clangd] DefineInline action availability checks

2019-09-23 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added inline comments. Comment at: clang-tools-extra/clangd/refactor/tweaks/DefineInline.cpp:183 +/// a.h: +/// void foo() { return ; } +/// hokein wrote: > kadircet wrote: > > hokein wrote: > > > now we get a potential ODR violation in this example, m

[PATCH] D65433: [clangd] DefineInline action availability checks

2019-09-23 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet updated this revision to Diff 221270. 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/D65433/new/ https://reviews.llvm.org/D65433 Files: clang-tools-ex

r372564 - [ASTImporter][NFC] Add comprehensive tests for ODR violation handling strategies

2019-09-23 Thread Gabor Marton via cfe-commits
Author: martong Date: Mon Sep 23 02:32:07 2019 New Revision: 372564 URL: http://llvm.org/viewvc/llvm-project?rev=372564&view=rev Log: [ASTImporter][NFC] Add comprehensive tests for ODR violation handling strategies Summary: In this patch we provide additional and comprehensive tests for the ODR h

[PATCH] D66951: [ASTImporter] Add comprehensive tests for ODR violation handling strategies

2019-09-23 Thread Gabor Marton via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL372564: [ASTImporter][NFC] Add comprehensive tests for ODR violation handling strategies (authored by martong, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Change

[PATCH] D67748: [clangd] Add a helper for extracting nonlocal decls in a FunctionDecl

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

[PATCH] D67748: [clangd] Add a helper for extracting nonlocal decls in a FunctionDecl

2019-09-23 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added a comment. As discussed offline, we decided to change the file once we have more helpers. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D67748/new/ https://reviews.llvm.org/D67748 ___ cfe

[PATCH] D67651: [clangd] No ExtractFunction on empty selections.

2019-09-23 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added a comment. In D67651#1672489 , @hokein wrote: > fair enough, didn't notice that fix before, the testcase here probably > doesn't work after that patch. yes it shouldn't work after that one. Repository: rG LLVM Github Monorepo CHANGES

r372575 - [NFC] Fixed clang wasm test after rL372573

2019-09-23 Thread David Bolvansky via cfe-commits
Author: xbolva00 Date: Mon Sep 23 03:14:07 2019 New Revision: 372575 URL: http://llvm.org/viewvc/llvm-project?rev=372575&view=rev Log: [NFC] Fixed clang wasm test after rL372573 These tests should not depend on -O1.. Modified: cfe/trunk/test/CodeGenCXX/wasm-args-returns.cpp Modified: cfe/t

[PATCH] D62686: [RISCV] Add support for save/restore of callee-saved registers via libcalls

2019-09-23 Thread Lewis Revill via Phabricator via cfe-commits
lewis-revill planned changes to this revision. lewis-revill added a comment. It seems like the regressions I'm seeing are due to the fact that calculating offsets for fixed objects at the top of the frame didn't account for extra stack size adjustment from the libcalls. I'm trying to find a neat

[PATCH] D53137: Scalable vector core instruction support + size queries

2019-09-23 Thread Graham Hunter via Phabricator via cfe-commits
huntergr updated this revision to Diff 221283. huntergr added a comment. Herald added subscribers: cfe-commits, haicheng, eraman. Herald added a project: clang. - Changed existing interface to return ScalableSize objects and added a (mostly) transparent conversion, as per Sander's suggestion. - R

[PATCH] D67633: [libTooling] Add `access` and `ifBound` combinators to Stencil library.

2019-09-23 Thread Dmitri Gribenko via Phabricator via cfe-commits
gribozavr accepted this revision. gribozavr added inline comments. This revision is now accepted and ready to land. Comment at: clang/lib/Tooling/Refactoring/Stencil.cpp:70 +// describing a member m, yields "e->m", when e is a pointer, "e2->m" when e = +// "*e2" and "e.m" otherwi

[PATCH] D67907: [clangd] Implement a smart version of HeaderSource switch.

2019-09-23 Thread Haojian Wu via Phabricator via cfe-commits
hokein updated this revision to Diff 221288. hokein added a comment. Cleanup. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D67907/new/ https://reviews.llvm.org/D67907 Files: clang-tools-extra/clangd/CMakeLists.txt clang-tools-extra/clangd/Clan

[PATCH] D67907: [clangd] Implement a smart version of HeaderSource switch.

2019-09-23 Thread Haojian Wu via Phabricator via cfe-commits
hokein created this revision. hokein added a reviewer: kadircet. Herald added subscribers: usaxena95, arphaman, jkorous, MaskRay, ilya-biryukov, mgorny. Herald added a project: clang. hokein updated this revision to Diff 221288. hokein added a comment. Cleanup. This patch implements another ver

[PATCH] D65433: [clangd] DefineInline action availability checks

2019-09-23 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 with a few nits. Comment at: clang-tools-extra/clangd/refactor/tweaks/DefineInline.cpp:183 +/// a.h: +/// void foo() { return ; } +/// kadircet

[PATCH] D67748: [clangd] Add a helper for extracting nonlocal decls in a FunctionDecl

2019-09-23 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. I think in the future (after https://reviews.llvm.org/D67826), we can use the `findExplicitReferences` to implement it. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION http

[clang-tools-extra] r372593 - Removed an incorred namespace-end comment

2019-09-23 Thread Dmitri Gribenko via cfe-commits
Author: gribozavr Date: Mon Sep 23 05:07:10 2019 New Revision: 372593 URL: http://llvm.org/viewvc/llvm-project?rev=372593&view=rev Log: Removed an incorred namespace-end comment Modified: clang-tools-extra/trunk/clang-tidy/bugprone/ArgumentCommentCheck.cpp Modified: clang-tools-extra/trunk/c

[PATCH] D67907: [clangd] Implement a smart version of HeaderSource switch.

2019-09-23 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added inline comments. Comment at: clang-tools-extra/clangd/HeaderSourceSwitch.cpp:21 +// file. +class CollectIndexableLocalDecls { +public: this class doesn't seem to have any state(apart from saving AST in constructor and using it in call to collect),

[PATCH] D67496: [clangd] Collect macros in the preamble region of the main file

2019-09-23 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added a comment. Sorry for the delay Comment at: clang-tools-extra/clangd/Macro.h:59 + +if (auto Range = getTokenRange(SM, LangOpts, MacroNameTok.getLocation())) { + MainFileMacros.push_back( Converting here is too early, could we keep th

r372594 - Removed dead code from Stencil.h

2019-09-23 Thread Dmitri Gribenko via cfe-commits
Author: gribozavr Date: Mon Sep 23 05:15:48 2019 New Revision: 372594 URL: http://llvm.org/viewvc/llvm-project?rev=372594&view=rev Log: Removed dead code from Stencil.h Modified: cfe/trunk/include/clang/Tooling/Refactoring/Stencil.h Modified: cfe/trunk/include/clang/Tooling/Refactoring/Stenc

Re: r371605 - [Diagnostics] Add -Wsizeof-array-div

2019-09-23 Thread Nico Weber via cfe-commits
We're looking at turning this one. One thing that this warns about that's a false positive where we've seen it is this code for nested arrays: float m[4][4]; for (int i = 0; i < sizeof(m) / sizeof(**m); ++i) (&**m)[i] = 0; (Why would anyone write code like this? It's a reduced example; consi

[PATCH] D64736: [clang-tidy] New bugprone-infinite-loop check for detecting obvious infinite loops

2019-09-23 Thread Balogh, Ádám via Phabricator via cfe-commits
baloghadamsoftware updated this revision to Diff 221300. baloghadamsoftware added a comment. Updated according to the comment. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D64736/new/ https://reviews.llvm.org/D64736 Files: clang-tidy/bugprone/BugproneTidyModule.cpp clang-tidy/bugpr

r372595 - [libTooling] Introduce new library of source-code builders.

2019-09-23 Thread Yitzhak Mandelbaum via cfe-commits
Author: ymandel Date: Mon Sep 23 05:40:10 2019 New Revision: 372595 URL: http://llvm.org/viewvc/llvm-project?rev=372595&view=rev Log: [libTooling] Introduce new library of source-code builders. Summary: Introduces facilities for easily building source-code strings, including idiomatic use of pare

[PATCH] D67632: [libTooling] Introduce new library of source-code builders.

2019-09-23 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL372595: [libTooling] Introduce new library of source-code builders. (authored by ymandel, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Changed prior to commit:

[PATCH] D64736: [clang-tidy] New bugprone-infinite-loop check for detecting obvious infinite loops

2019-09-23 Thread Dmitri Gribenko via Phabricator via cfe-commits
gribozavr accepted this revision. gribozavr added a comment. Thanks! Please let me know if you need me to commit the patch for you. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D64736/new/ https://reviews.llvm.org/D64736 ___ cfe-commits mai

r372600 - [Diagnostics] Avoid -Wsizeof-array-div when dividing the size of a nested array by the size of the deepest base type

2019-09-23 Thread David Bolvansky via cfe-commits
Author: xbolva00 Date: Mon Sep 23 05:54:35 2019 New Revision: 372600 URL: http://llvm.org/viewvc/llvm-project?rev=372600&view=rev Log: [Diagnostics] Avoid -Wsizeof-array-div when dividing the size of a nested array by the size of the deepest base type Modified: cfe/trunk/lib/Sema/SemaExpr.cp

Re: r371605 - [Diagnostics] Add -Wsizeof-array-div

2019-09-23 Thread Dávid Bolvanský via cfe-commits
Hello, Thanks for the proposed idea, implemented in rL372600. po 23. 9. 2019 o 14:23 Nico Weber napísal(a): > We're looking at turning this one. > > One thing that this warns about that's a false positive where we've seen > it is this code for nested arrays: > > float m[4][4]; > for (int i

Re: r371605 - [Diagnostics] Add -Wsizeof-array-div

2019-09-23 Thread Nico Weber via cfe-commits
That was fast. Thanks much! :) On Mon, Sep 23, 2019 at 8:52 AM Dávid Bolvanský wrote: > Hello, > > Thanks for the proposed idea, implemented in rL372600. > > po 23. 9. 2019 o 14:23 Nico Weber napísal(a): > >> We're looking at turning this one. >> >> One thing that this warns about that's a fals

[PATCH] D67748: [clangd] Add a helper for extracting nonlocal decls in a FunctionDecl

2019-09-23 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet updated this revision to Diff 221313. kadircet added a comment. - Use findExplicitReferences instead of libIndex. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D67748/new/ https://reviews.llvm.org/D67748 Files: clang-tools-extra/clangd/X

[PATCH] D67633: [libTooling] Add `access` and `ifBound` combinators to Stencil library.

2019-09-23 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel updated this revision to Diff 221312. ymandel added a comment. update to new signature for builders (`Optional`) Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D67633/new/ https://reviews.llvm.org/D67633 Files: clang/include/clang/Tooling/

[PATCH] D67496: [clangd] Collect macros in the preamble region of the main file

2019-09-23 Thread Haojian Wu via Phabricator via cfe-commits
hokein marked an inline comment as done. hokein added inline comments. Comment at: clang-tools-extra/clangd/Macro.h:59 + +if (auto Range = getTokenRange(SM, LangOpts, MacroNameTok.getLocation())) { + MainFileMacros.push_back( ilya-biryukov wrote: > Conve

[clang-tools-extra] r372601 - Revert "[clang-tidy] Fix relative path in header-filter."

2019-09-23 Thread Dmitri Gribenko via cfe-commits
Author: gribozavr Date: Mon Sep 23 06:06:25 2019 New Revision: 372601 URL: http://llvm.org/viewvc/llvm-project?rev=372601&view=rev Log: Revert "[clang-tidy] Fix relative path in header-filter." This reverts commit r372388. It made '-header-filter' inconsistent with paths printed in diagnostics.

[PATCH] D65433: [clangd] DefineInline action availability checks

2019-09-23 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added inline comments. Comment at: clang-tools-extra/clangd/refactor/tweaks/DefineInline.cpp:183 +/// a.h: +/// void foo() { return ; } +/// hokein wrote: > kadircet wrote: > > hokein wrote: > > > kadircet wrote: > > > > hokein wrote: > > > > > now we

[PATCH] D65433: [clangd] DefineInline action availability checks

2019-09-23 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet updated this revision to Diff 221314. kadircet marked 7 inline comments as done. kadircet added a comment. - Rebase on top of D67748 Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D65433/new/ https://reviews

[PATCH] D67501: [clang-tidy] Fix relative path in header-filter.

2019-09-23 Thread Dmitri Gribenko via Phabricator via cfe-commits
gribozavr added a comment. Sorry, I reverted this patch in r372601. Unfortunately, it makes paths printed in clang-tidy'd diagnostics inconsistent with what `-header-filter` operates on. For example, imagine that `file-filter.cpp` includes `header_alias.h`, which is a symlink to `header.h`. Th

Re: r371605 - [Diagnostics] Add -Wsizeof-array-div

2019-09-23 Thread Nico Weber via cfe-commits
It still warns if the inner array is in a struct. That's probably ok though. struct Point { int xy[2]; }; void f() { Point points[3]; for (int i = 0; i < sizeof(points) / sizeof(int); ++i) (&points[0].xy[0])[i] = 0; } On Mon, Sep 23, 2019 at 8:54 AM Nico Weber wrote: > That was fast.

[PATCH] D67901: [clangd] Improve semantic highlighting in dependent contexts (fixes #154)

2019-09-23 Thread Haojian Wu via Phabricator via cfe-commits
hokein added a comment. The heuristic of guessing a concrete type seems fragile, and may not work for all cases. Instead of trying out test to guess the underlying type, I think we could introduce a new highlighting kind (e.g. `entity.name.type.dependent`) for this. Comment

Re: r371605 - [Diagnostics] Add -Wsizeof-array-div

2019-09-23 Thread Dávid Bolvanský via cfe-commits
Yeah, this needs to be handled a bit differently (if we want so). po 23. 9. 2019 o 15:07 Nico Weber napísal(a): > It still warns if the inner array is in a struct. That's probably ok > though. > > struct Point { > int xy[2]; > }; > > void f() { > Point points[3]; > for (int i = 0; i < size

[PATCH] D67633: [libTooling] Add `access` and `ifBound` combinators to Stencil library.

2019-09-23 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel updated this revision to Diff 221316. ymandel added a comment. addressed comments. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D67633/new/ https://reviews.llvm.org/D67633 Files: clang/include/clang/Tooling/Refactoring/Stencil.h clang/

[PATCH] D67633: [libTooling] Add `access` and `ifBound` combinators to Stencil library.

2019-09-23 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel marked 3 inline comments as done. ymandel added a comment. Thanks for the review! Comment at: clang/lib/Tooling/Refactoring/Stencil.cpp:195 +using AccessOp = StencilPartImpl; +using IfBoundOp = StencilPartImpl; } // namespace gribozavr wrote: > These t

r372605 - [libTooling] Add `access` and `ifBound` combinators to Stencil library.

2019-09-23 Thread Yitzhak Mandelbaum via cfe-commits
Author: ymandel Date: Mon Sep 23 06:21:42 2019 New Revision: 372605 URL: http://llvm.org/viewvc/llvm-project?rev=372605&view=rev Log: [libTooling] Add `access` and `ifBound` combinators to Stencil library. Summary: This revision add the `access` and `ifBound` combinators to the Stencil library: *

[PATCH] D67826: [clangd] A helper to find explicit references and their names

2019-09-23 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added inline comments. Comment at: clang-tools-extra/clangd/FindTarget.h:115 +/// FIXME: extend to report location information about declaration names too. +void findExplicitReferences(Stmt *S, +llvm::function_ref Out); It mig

[PATCH] D67633: [libTooling] Add `access` and `ifBound` combinators to Stencil library.

2019-09-23 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. ymandel marked an inline comment as done. Closed by commit rL372605: [libTooling] Add `access` and `ifBound` combinators to Stencil library. (authored by ymandel, committed by ). Herald added a project: LLVM. Herald added a

[PATCH] D67854: Ensure AtomicExpr goes through SEMA checking after TreeTransform

2019-09-23 Thread Erich Keane via Phabricator via cfe-commits
erichkeane added a comment. In D67854#1678236 , @RKSimon wrote: > @erichkeane The atomic-expr.cpp test is failing on some MSVC buildbots, > please can you take a look? > http://lab.llvm.org:8011/builders/llvm-clang-lld-x86_64-scei-ps4-windows10pro-fast/

[PATCH] D67854: Ensure AtomicExpr goes through SEMA checking after TreeTransform

2019-09-23 Thread Erich Keane via Phabricator via cfe-commits
erichkeane added a comment. In D67854#1678982 , @erichkeane wrote: > In D67854#1678236 , @RKSimon wrote: > > > @erichkeane The atomic-expr.cpp test is failing on some MSVC buildbots, > > please can you take a look?

[clang-tools-extra] r372607 - Added a test for agreement between paths used in ClangTidy's diagnostics and header filter

2019-09-23 Thread Dmitri Gribenko via cfe-commits
Author: gribozavr Date: Mon Sep 23 06:44:42 2019 New Revision: 372607 URL: http://llvm.org/viewvc/llvm-project?rev=372607&view=rev Log: Added a test for agreement between paths used in ClangTidy's diagnostics and header filter This test would have been broken by r372388. Added: clang-tools-

[PATCH] D67916: [clangd] Simplify the callside of URI::resolve, NFC.

2019-09-23 Thread Haojian Wu via Phabricator via cfe-commits
hokein created this revision. hokein added a reviewer: kadircet. Herald added subscribers: usaxena95, arphaman, jkorous, MaskRay, ilya-biryukov. Herald added a project: clang. - Add a overrloded URI::resolve, which accepts a string URI; - also fixed some callside that don't check the error; Repo

[PATCH] D67916: [clangd] Simplify the callside of URI::resolve, NFC.

2019-09-23 Thread Haojian Wu via Phabricator via cfe-commits
hokein updated this revision to Diff 221320. hokein added a comment. remove an accident change. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D67916/new/ https://reviews.llvm.org/D67916 Files: clang-tools-extra/clangd/CodeComplete.cpp clang-too

[PATCH] D67501: [clang-tidy] Fix relative path in header-filter.

2019-09-23 Thread Dmitri Gribenko via Phabricator via cfe-commits
gribozavr added a subscriber: ilya-biryukov. gribozavr added a comment. I added a test in r372607 for your reference. It tests both `foo/..` and symlink behavior. > Maybe only collapsing `foo/..` would be viable? @ilya-biryukov told me that even that is not viable, in case `foo` is a symlink t

[PATCH] D67501: [clang-tidy] Fix relative path in header-filter.

2019-09-23 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh added a comment. In D67501#1678962 , @gribozavr wrote: > Sorry, I reverted this patch in r372601. > > Unfortunately, it makes paths printed in clang-tidy'd diagnostics > inconsistent with what `-header-filter` operates on. > > For example, imagine

[PATCH] D67826: [clangd] A helper to find explicit references and their names

2019-09-23 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added inline comments. Comment at: clang-tools-extra/clangd/FindTarget.h:93 + /// in 'obj.foo'. + const Expr* MemberExprBase = nullptr; +}; do we have any real use-case for this field? apart from "skipping instance members in define inline"? because t

[PATCH] D67385: Pass -mcmodel to LTO plugin

2019-09-23 Thread Teresa Johnson via Phabricator via cfe-commits
tejohnson added a comment. Typically -mcmodel is passed to the clang compile invocation which sets a module flag in the IR, which is then used by LTO (see calls to Module::setCodeModel() and Module::getCodeModel()). Why is it necessary to pass through the mcmodel passed to the link invocation?

[PATCH] D61446: Generalize the pass registration mechanism used by Polly to any third-party tool

2019-09-23 Thread serge via Phabricator via cfe-commits
serge-sans-paille updated this revision to Diff 221321. serge-sans-paille added a comment. Updates: - fix typo in documentation - take into account @andwar advices - improve shared/static build automation Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.or

[PATCH] D67661: [RISCV] Headers: Add Bitmanip extension Clang header files and rvintrin.h

2019-09-23 Thread Scott Egerton via Phabricator via cfe-commits
s.egerton added a comment. We have a patch to add codegen pattern matching (https://reviews.llvm.org/D67348). Unfortunately we have found that we will not be able to rely on pattern matching here to guarantee that these instructions are emitted in all situations due to differences in optimisati

r372609 - [OPENMP]Call __kmpc_push_tripcount in task context.

2019-09-23 Thread Alexey Bataev via cfe-commits
Author: abataev Date: Mon Sep 23 07:06:51 2019 New Revision: 372609 URL: http://llvm.org/viewvc/llvm-project?rev=372609&view=rev Log: [OPENMP]Call __kmpc_push_tripcount in task context. Runtime function __kmpc_push_tripcount better to call inside of the task context for target regions. Otherwise,

[PATCH] D67501: [clang-tidy] Fix relative path in header-filter.

2019-09-23 Thread Yubo Xie via Phabricator via cfe-commits
xyb added a comment. > The only workable suggestion that we could come up with was adding a separate > command-line option, `-normalized-header-filter`, that would normalize paths > before matching the regex. It can be used by people whose project layout does > not have complex symlink mazes.

r372611 - Fix test atomic-expr.cpp after R372422

2019-09-23 Thread Erich Keane via cfe-commits
Author: erichkeane Date: Mon Sep 23 07:12:13 2019 New Revision: 372611 URL: http://llvm.org/viewvc/llvm-project?rev=372611&view=rev Log: Fix test atomic-expr.cpp after R372422 The test tried to match a path in a printout by doing '^:' which failed on windows, since C:\... is a path. Modified:

[PATCH] D67916: [clangd] Simplify the callside of URI::resolve, NFC.

2019-09-23 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! Comment at: clang-tools-extra/clangd/FindSymbols.cpp:48 if (!Path) { return llvm::make_error( +formatv("Could not resolve path for URI '{0}'

[PATCH] D67916: [clangd] Simplify the callside of URI::resolve, NFC.

2019-09-23 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet requested changes to this revision. kadircet added inline comments. This revision now requires changes to proceed. Comment at: clang-tools-extra/clangd/index/BackgroundIndexLoader.cpp:30 + if (!AbsolutePath) { +elog("Failed to resolve URI {0}:", URI, AbsolutePath.ta

r372612 - [Diagnostics] Warn if '<<' in bool context with -Wint-in-bool-context (GCC compatibility)

2019-09-23 Thread David Bolvansky via cfe-commits
Author: xbolva00 Date: Mon Sep 23 07:21:08 2019 New Revision: 372612 URL: http://llvm.org/viewvc/llvm-project?rev=372612&view=rev Log: [Diagnostics] Warn if '<<' in bool context with -Wint-in-bool-context (GCC compatibility) Extracted from D63082, addressed review comments related to a warning m

[PATCH] D67888: [clang-format] NFC clang-format the clang-format unit tests

2019-09-23 Thread Owen Pan via Phabricator via cfe-commits
owenpan accepted this revision. owenpan added a comment. This revision is now accepted and ready to land. Thanks! CHANGES SINCE LAST ACTION https://reviews.llvm.org/D67888/new/ https://reviews.llvm.org/D67888 ___ cfe-commits mailing list cfe-comm

r372614 - [docs] Fix some typos in InternalsManual

2019-09-23 Thread Sven van Haastregt via cfe-commits
Author: svenvh Date: Mon Sep 23 07:24:29 2019 New Revision: 372614 URL: http://llvm.org/viewvc/llvm-project?rev=372614&view=rev Log: [docs] Fix some typos in InternalsManual Modified: cfe/trunk/docs/InternalsManual.rst Modified: cfe/trunk/docs/InternalsManual.rst URL: http://llvm.org/viewvc

[PATCH] D67916: [clangd] Simplify the callside of URI::resolve, NFC.

2019-09-23 Thread Haojian Wu via Phabricator via cfe-commits
hokein updated this revision to Diff 221326. hokein marked 7 inline comments as done. hokein added a comment. address comments. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D67916/new/ https://reviews.llvm.org/D67916 Files: clang-tools-extra/cla

[PATCH] D67916: [clangd] Simplify the callside of URI::resolve, NFC.

2019-09-23 Thread Haojian Wu via Phabricator via cfe-commits
hokein added inline comments. Comment at: clang-tools-extra/clangd/FindSymbols.cpp:48 if (!Path) { return llvm::make_error( +formatv("Could not resolve path for URI '{0}' for symbol '{1}': {2}", kadircet wrote: > `return make_string_error(...` ? >

[PATCH] D67916: [clangd] Simplify the callside of URI::resolve, NFC.

2019-09-23 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! Comment at: clang-tools-extra/clangd/FindSymbols.cpp:48 if (!Path) { return llvm::make_error( +formatv("Could not resolve path for URI '{0}'

[PATCH] D67916: [clangd] Simplify the callside of URI::resolve, NFC.

2019-09-23 Thread Haojian Wu via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL372617: [clangd] Simplify the callside of URI::resolve, NFC. (authored by hokein, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Changed prior to commit: https://

[clang-tools-extra] r372617 - [clangd] Simplify the callside of URI::resolve, NFC.

2019-09-23 Thread Haojian Wu via cfe-commits
Author: hokein Date: Mon Sep 23 07:39:37 2019 New Revision: 372617 URL: http://llvm.org/viewvc/llvm-project?rev=372617&view=rev Log: [clangd] Simplify the callside of URI::resolve, NFC. Summary: - Add a overrloded URI::resolve, which accepts a string URI; - also fixed some callside that don't che

[PATCH] D67385: Pass -mcmodel to LTO plugin

2019-09-23 Thread Kuan Hsu Chen via Phabricator via cfe-commits
khchen added a comment. @tejohnson when I run the `clang -flto -Wl,-plugin-opt=-help` command, it shows the --code-model= - Choose code model =tiny- Tiny code model =small

[PATCH] D67385: Pass -mcmodel to LTO plugin

2019-09-23 Thread Teresa Johnson via Phabricator via cfe-commits
tejohnson added a comment. In D67385#1679127 , @khchen wrote: > @tejohnson when I run the `clang -flto -Wl,-plugin-opt=-help` command, it > shows the > > --code-model= - Choose code model > =tiny

[PATCH] D67897: Fix __is_signed builtin

2019-09-23 Thread Zoe Carver via Phabricator via cfe-commits
zoecarver marked an inline comment as done. zoecarver added inline comments. Comment at: clang/docs/LanguageExtensions.rst:1165 Note that this currently returns true for enumeration types if the underlying - type is signed, and returns false for floating-point types, in viola

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

2019-09-23 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/include/clang/AST/APValue.h:537-540 +private: + void setLValueEmptyPath(LValueBase B, const CharUnits &O, unsigned Size, + bool OnePastTheEnd, bool IsNullPtr); + LValuePathEntry *getLValuePathPtr();

[PATCH] D67837: [CUDA][HIP] Fix assertion in Sema::markKnownEmitted with -fopenmp

2019-09-23 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl updated this revision to Diff 221341. yaxunl added a comment. revised by John's comments CHANGES SINCE LAST ACTION https://reviews.llvm.org/D67837/new/ https://reviews.llvm.org/D67837 Files: lib/Sema/Sema.cpp test/SemaCUDA/openmp-static-func.cu Index: test/SemaCUDA/openmp-static

[PATCH] D67919: [Diagnostics] Warn if enumeration type mismatch in conditional expression

2019-09-23 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 created this revision. xbolva00 added a reviewer: rsmith. Herald added a project: clang. Herald added a subscriber: cfe-commits. - Useful warning - GCC compatibility Repository: rC Clang https://reviews.llvm.org/D67919 Files: include/clang/Basic/DiagnosticSemaKinds.td lib/Sema/S

[PATCH] D67826: [clangd] A helper to find explicit references and their names

2019-09-23 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov updated this revision to Diff 221345. ilya-biryukov marked 18 inline comments as done. ilya-biryukov added a comment. Herald added subscribers: jfb, mgrang. - Add simple tests - Address other comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://review

[PATCH] D67826: [clangd] A helper to find explicit references and their names

2019-09-23 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added a comment. Added some tests too. More tests for dependent constructs are still missing, but please take a look at what we have for now. Comment at: clang-tools-extra/clangd/FindTarget.cpp:373 + DeclRelation::TemplateInstantiation)) && +

[PATCH] D67919: [Diagnostics] Warn if enumeration type mismatch in conditional expression

2019-09-23 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 updated this revision to Diff 221346. xbolva00 added a comment. Added test file. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D67919/new/ https://reviews.llvm.org/D67919 Files: include/clang/Basic/DiagnosticSemaKinds.td lib/Sema/SemaChecking.cpp test/Sema/warn-conditiona

[PATCH] D67501: [clang-tidy] Fix relative path in header-filter.

2019-09-23 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added a comment. In D67501#1679050 , @xyb wrote: > `-normalized-header-filter`. I'd like this idea. Any objections? Having two solution for filter is unfortunate - making both discoverable and documenting why we need them is hard. If there

[PATCH] D66951: [ASTImporter] Add comprehensive tests for ODR violation handling strategies

2019-09-23 Thread Simon Pilgrim via Phabricator via cfe-commits
RKSimon added a comment. @martong This is failing on windows buildbots: http://lab.llvm.org:8011/builders/llvm-clang-x86_64-expensive-checks-win/builds/19808 Repository: rL LLVM CHANGES SINCE LAST ACTION https://reviews.llvm.org/D66951/new/ https://reviews.llvm.org/D66951 _

[PATCH] D67919: [Diagnostics] Warn if enumeration type mismatch in conditional expression

2019-09-23 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 marked an inline comment as done. xbolva00 added inline comments. Comment at: test/Sema/warn-conditional-emum-types-mismatch.c:19 + +int get_flag_anon_enum(int cond) { + return cond ? A : C; Gcc warns here, but Clang does not warn when A != C.. So not

[PATCH] D67897: Fix __is_signed builtin

2019-09-23 Thread Zoe Carver via Phabricator via cfe-commits
zoecarver closed this revision. zoecarver added a comment. Resolved by rL372621 . Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D67897/new/ https://reviews.llvm.org/D67897 ___

[PATCH] D38446: update comments in clang-format.py for python3 compatibility

2019-09-23 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added a comment. @MyDeveloperDay, added you on the assumption that you are interested in all things about `clang-format`. Hope the change is relevant, let me know if not. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D38446/new/ https://reviews.llvm

r372621 - Fix __is_signed builtin

2019-09-23 Thread Zoe Carver via cfe-commits
Author: zoecarver Date: Mon Sep 23 08:41:20 2019 New Revision: 372621 URL: http://llvm.org/viewvc/llvm-project?rev=372621&view=rev Log: Fix __is_signed builtin Summary: This patch fixes the __is_signed builtin type trait to work with floating point types and enums. Now, the builtin will

r372623 - [OPENMP]Fix PR43355: DO not emit target calls if only -fopenmp-targets

2019-09-23 Thread Alexey Bataev via cfe-commits
Author: abataev Date: Mon Sep 23 08:53:51 2019 New Revision: 372623 URL: http://llvm.org/viewvc/llvm-project?rev=372623&view=rev Log: [OPENMP]Fix PR43355: DO not emit target calls if only -fopenmp-targets is not provided. We should not emit any target-dependent code if only -fopenmp flag is used

r372624 - Fix __is_fundamental to accept nullptr_t

2019-09-23 Thread Zoe Carver via cfe-commits
Author: zoecarver Date: Mon Sep 23 09:02:46 2019 New Revision: 372624 URL: http://llvm.org/viewvc/llvm-project?rev=372624&view=rev Log: Fix __is_fundamental to accept nullptr_t Summary: This patch updates the __is_fundamental builtin type trait to return true for nullptr_t. Reviewer

[PATCH] D61634: [clang/llvm] Allow efficient implementation of libc's memory functions in C/C++

2019-09-23 Thread Teresa Johnson via Phabricator via cfe-commits
tejohnson added a comment. In D61634#1635595 , @tejohnson wrote: > I had some time to work on this finally late last week. I decided the most > straightforward thing was to implement the necessary interface changes to the > TLI analysis to make it requir

[PATCH] D67899: Fix __is_fundamental to accept nullptr_t

2019-09-23 Thread Zoe Carver via Phabricator via cfe-commits
zoecarver closed this revision. zoecarver added a comment. Resolved by rL372624 . Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D67899/new/ https://reviews.llvm.org/D67899 ___

[PATCH] D67613: [DWARF-5] Support for DWARF-5 C++ language tags

2019-09-23 Thread Sourabh Singh Tomar via Phabricator via cfe-commits
SouraVX added a comment. In D67613#1674597 , @aprantl wrote: > Please be sure the watch the lldb (and other debugger) bots after committing > this.. Could you please commit these changes. Thanks! CHANGES SINCE LAST ACTION https://reviews.llvm.org/D6

Re: [PATCH] D66951: [ASTImporter] Add comprehensive tests for ODR violation handling strategies

2019-09-23 Thread Gábor Márton via cfe-commits
Thanks, for reaching out to me. I am looking into it. Gabor On Mon, Sep 23, 2019 at 5:44 PM Simon Pilgrim via Phabricator < revi...@reviews.llvm.org> wrote: > RKSimon added a comment. > > @martong This is failing on windows buildbots: > http://lab.llvm.org:8011/builders/llvm-clang-x86_64-expens

[clang-tools-extra] r372627 - [Clang-doc] NFC: Fixed link to llvm bugs in documentation

2019-09-23 Thread Shaurya Gupta via cfe-commits
Author: sureyeaah Date: Mon Sep 23 09:55:13 2019 New Revision: 372627 URL: http://llvm.org/viewvc/llvm-project?rev=372627&view=rev Log: [Clang-doc] NFC: Fixed link to llvm bugs in documentation Modified: clang-tools-extra/trunk/docs/clang-doc.rst Modified: clang-tools-extra/trunk/docs/clang-

r372631 - NFC: Fix a poorly-written test

2019-09-23 Thread Erik Pilkington via cfe-commits
Author: epilk Date: Mon Sep 23 10:16:55 2019 New Revision: 372631 URL: http://llvm.org/viewvc/llvm-project?rev=372631&view=rev Log: NFC: Fix a poorly-written test The author of r364954 foolishly forgot that == binds tighter than ?: Modified: cfe/trunk/test/SemaCXX/constexpr-builtin-bit-cast.

[PATCH] D67924: [Sema] Fix the atomic expr rebuilding order.

2019-09-23 Thread Michael Liao via Phabricator via cfe-commits
hliao added a comment. The current BuildAtomicExpr expects the arguments to be in the API order instead of the AST order. If RebuildAtomicExpr uses the same BuildAtomicExpr, it needs to ensure the order of arguments are in API order; otherwise, arguments (especially the one with memory order) w

[PATCH] D67924: [Sema] Fix the atomic expr rebuilding order.

2019-09-23 Thread Michael Liao via Phabricator via cfe-commits
hliao created this revision. hliao added a reviewer: erichkeane. Herald added subscribers: cfe-commits, jfb. Herald added a project: clang. hliao added a comment. The current BuildAtomicExpr expects the arguments to be in the API order instead of the AST order. If RebuildAtomicExpr uses the same

[PATCH] D67924: [Sema] Fix the atomic expr rebuilding order.

2019-09-23 Thread Erich Keane via Phabricator via cfe-commits
erichkeane added a comment. Yikes, good catch! Would we be better off instead to just modify how the other switch loads the value? Presumably something like, "if (NeedsRearrangeArgs) SubExprs.append(Args.begin(), Args.end()); else /*the switch*/. Repository: rG LLVM Github Monorepo CHANGE

[PATCH] D67924: [Sema] Fix the atomic expr rebuilding order.

2019-09-23 Thread Erich Keane via Phabricator via cfe-commits
erichkeane added inline comments. Comment at: clang/lib/Sema/TreeTransform.h:3319 +return getSema().BuildAtomicExpr(Range, Range, RParenLoc, SubExprs, Op, + true); } When passing a bool, use the comment syntax /*paramnam

r372633 - [ASTImporter] Attempt to fix Windows buildbot test errors

2019-09-23 Thread Gabor Marton via cfe-commits
Author: martong Date: Mon Sep 23 10:29:08 2019 New Revision: 372633 URL: http://llvm.org/viewvc/llvm-project?rev=372633&view=rev Log: [ASTImporter] Attempt to fix Windows buildbot test errors Modified: cfe/trunk/unittests/AST/ASTImporterODRStrategiesTest.cpp Modified: cfe/trunk/unittests/AST

[PATCH] D66951: [ASTImporter] Add comprehensive tests for ODR violation handling strategies

2019-09-23 Thread Gabor Marton via Phabricator via cfe-commits
martong added a comment. Trying to fix in svn commit 372633. Repository: rL LLVM CHANGES SINCE LAST ACTION https://reviews.llvm.org/D66951/new/ https://reviews.llvm.org/D66951 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lis

[PATCH] D67924: [Sema] Fix the atomic expr rebuilding order.

2019-09-23 Thread Michael Liao via Phabricator via cfe-commits
hliao added a comment. In D67924#1679409 , @erichkeane wrote: > Yikes, good catch! > > Would we be better off instead to just modify how the other switch loads the > value? Presumably something like, "if (NeedsRearrangeArgs) > SubExprs.append(Args.begin

  1   2   >