[PATCH] D63376: [clang] Small improvments after Adding APValue to ConstantExpr

2019-06-17 Thread Tyker via Phabricator via cfe-commits
Tyker updated this revision to Diff 204992. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63376/new/ https://reviews.llvm.org/D63376 Files: clang/include/clang/AST/ASTContext.h clang/include/clang/AST/Expr.h clang/include/clang/AST/Stmt.h clang/include/clang/Sema/Sema.h clang/l

r363529 - Re-commit r357452 (take 3): "SimplifyCFG SinkCommonCodeFromPredecessors: Also sink function calls without used results (PR41259)"

2019-06-17 Thread Hans Wennborg via cfe-commits
Author: hans Date: Mon Jun 17 00:47:28 2019 New Revision: 363529 URL: http://llvm.org/viewvc/llvm-project?rev=363529&view=rev Log: Re-commit r357452 (take 3): "SimplifyCFG SinkCommonCodeFromPredecessors: Also sink function calls without used results (PR41259)" Third time's the charm. This was r

[PATCH] D63397: [clangd] Detect C++ for extension-less source files in vscode extension

2019-06-17 Thread Haojian Wu via Phabricator via cfe-commits
hokein created this revision. hokein added a reviewer: kadircet. Herald added subscribers: arphaman, jkorous, MaskRay, ilya-biryukov. Herald added a project: clang. Extend our extension to support detecting these files as C++ files based on the first line (`-*- C++ -*-`), it will make clangd work

[PATCH] D63397: [clangd] Detect C++ for extension-less source files in vscode extension

2019-06-17 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added a comment. Could you also update summary to include a link to documentation regarding `contributes.languages` ? Comment at: clang-tools-extra/clangd/clients/clangd-vscode/package.json:55 +"id": "cpp", +"firstLine": ".*-\\*-\\s*C\\+\\+\\s*

[PATCH] D63316: [clangd] Include the diagnostics's code when comparing diagnostics

2019-06-17 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 with one more test case request. Thanks! Comment at: clang-tools-extra/clangd/test/fixits-duplication.test:44 +--- +{"jsonrpc":"2.0","id":2,"method":"textDocument/co

[PATCH] D63397: [clangd] Detect C++ for extension-less source files in vscode extension

2019-06-17 Thread Haojian Wu via Phabricator via cfe-commits
hokein updated this revision to Diff 204999. hokein marked 2 inline comments as done. hokein added a comment. Address comments. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63397/new/ https://reviews.llvm.org/D63397 Files: clang-tools-extra/cla

[PATCH] D62115: fix a issue that clang is incompatible with gcc with -H option.

2019-06-17 Thread Kan Shengchen via Phabricator via cfe-commits
skan updated this revision to Diff 205001. skan added a comment. move test case to print-header-includes.c CHANGES SINCE LAST ACTION https://reviews.llvm.org/D62115/new/ https://reviews.llvm.org/D62115 Files: lib/Frontend/HeaderIncludeGen.cpp test/Frontend/print-header-includes.c Index

[PATCH] D62115: fix a issue that clang is incompatible with gcc with -H option.

2019-06-17 Thread Kan Shengchen via Phabricator via cfe-commits
skan added a comment. In D62115#1538631 , @kimgr wrote: > I think the test needs a bit more work. It's essentially checking the same > thing twice to exercise the Windows path separators. > > It looks like there's already a test for `-H` in > `FrontEnd/p

r363541 - Recommit [OpenCL] Move OpenCLBuiltins.td and remove unused include

2019-06-17 Thread Sven van Haastregt via cfe-commits
Author: svenvh Date: Mon Jun 17 03:06:34 2019 New Revision: 363541 URL: http://llvm.org/viewvc/llvm-project?rev=363541&view=rev Log: Recommit [OpenCL] Move OpenCLBuiltins.td and remove unused include Reland r363242 after fixing an issue with the tablegen dependence. Patch by Pierre Gondois and S

[PATCH] D62944: [Driver] Fix wchar_t and wint_t definitions on Solaris

2019-06-17 Thread Rainer Orth via Phabricator via cfe-commits
ro updated this revision to Diff 205012. ro added a comment. Herald added a subscriber: krytarowski. Adapt `Sema/format-strings.c`. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D62944/new/ https://reviews.llvm.org/D62944 Files: lib/Basic/Targets/OSTargets.h

[libunwind] r363545 - [libunwind][AArch64] Fix libunwind::Registers_arm64::jumpto

2019-06-17 Thread Mikhail Maltsev via cfe-commits
Author: miyuki Date: Mon Jun 17 04:00:21 2019 New Revision: 363545 URL: http://llvm.org/viewvc/llvm-project?rev=363545&view=rev Log: [libunwind][AArch64] Fix libunwind::Registers_arm64::jumpto Summary: The AArch64 version of the libunwind function which restores the CPU state and resumes executio

[PATCH] D63387: clang: Promote -fdebug-compilation-dir from cc1 flag to driver-level flag

2019-06-17 Thread Hans Wennborg via Phabricator via cfe-commits
hans accepted this revision. hans added a comment. This revision is now accepted and ready to land. lgtm Comment at: clang/include/clang/Driver/Options.td:717 +def fdebug_compilation_dir : Separate<["-"], "fdebug-compilation-dir">, +Group, Flags<[CC1Option, CC1AsOption, Cor

[PATCH] D63335: [HIP] Add the interface deriving the stub name of device kernels.

2019-06-17 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl accepted this revision. yaxunl added a comment. LGTM. Thanks. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63335/new/ https://reviews.llvm.org/D63335 ___ cfe-commits mailing list cfe-commits@li

[PATCH] D62944: [Driver] Fix wchar_t and wint_t definitions on Solaris

2019-06-17 Thread Rainer Orth via Phabricator via cfe-commits
ro added a comment. In D62944#1542217 , @efriedma wrote: > For format-strings.c, I'm not really happy suggesting `#if defined(__sun) && > !defined(__LP64__)`, but I don't think the alternative is better. We could > restrict the test so it doesn't run us

[PATCH] D63417: [WIP][RISCV] Specify registers used for exception handling

2019-06-17 Thread Edward Jones via Phabricator via cfe-commits
edward-jones created this revision. edward-jones added reviewers: asb, lewis-revill. Herald added subscribers: cfe-commits, Jim, benna, psnobl, jocewei, PkmX, rkruppe, the_o, brucehoult, MartinMosbeck, rogfer01, zzheng, jrtc27, shiva0217, kito-cheng, niosHD, sabuasal, apazos, simoncook, johnrusso

r363548 - Promote -fdebug-compilation-dir from a cc1 flag to clang and clang-cl driver flags

2019-06-17 Thread Nico Weber via cfe-commits
Author: nico Date: Mon Jun 17 05:10:40 2019 New Revision: 363548 URL: http://llvm.org/viewvc/llvm-project?rev=363548&view=rev Log: Promote -fdebug-compilation-dir from a cc1 flag to clang and clang-cl driver flags The flag is useful when wanting to create .o files that are independent from the a

[PATCH] D63387: clang: Promote -fdebug-compilation-dir from cc1 flag to driver-level flag

2019-06-17 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL363548: Promote -fdebug-compilation-dir from a cc1 flag to clang and clang-cl driver… (authored by nico, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Changed prio

[PATCH] D63423: [Diagnostics] Diagnose misused xor as pow

2019-06-17 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 created this revision. xbolva00 added reviewers: jfb, rsmith. Herald added subscribers: cfe-commits, dexonsmith. Herald added a project: clang. Motivation: https://twitter.com/jfbastien/status/1139298419988549632 https://twitter.com/mikemx7f/status/1139335901790625793 https://codesearch.i

[PATCH] D63423: [Diagnostics] Diagnose misused xor as pow

2019-06-17 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 marked an inline comment as done. xbolva00 added inline comments. Comment at: include/clang/Basic/DiagnosticGroups.td:508 def Varargs : DiagGroup<"varargs">; +def XorAsPow : DiagGroup<"xor-as-pow">; GCC folks will do this diagnostic soon too, so I wil

r363553 - [HIP] Add the interface deriving the stub name of device kernels.

2019-06-17 Thread Michael Liao via cfe-commits
Author: hliao Date: Mon Jun 17 05:51:36 2019 New Revision: 363553 URL: http://llvm.org/viewvc/llvm-project?rev=363553&view=rev Log: [HIP] Add the interface deriving the stub name of device kernels. Summary: - Revise the interface to derive the stub name and simplify the assertion of it. Review

[PATCH] D63335: [HIP] Add the interface deriving the stub name of device kernels.

2019-06-17 Thread Michael Liao via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL363553: [HIP] Add the interface deriving the stub name of device kernels. (authored by hliao, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Changed prior to commit

[PATCH] D63425: [clangd] Perform merge for main file symbols.

2019-06-17 Thread Haojian Wu via Phabricator via cfe-commits
hokein created this revision. hokein added a reviewer: kadircet. Herald added subscribers: arphaman, jkorous, MaskRay, ilya-biryukov. Herald added a project: clang. Previously, we randomly pick one main file symbol in dynamic index, we may loose the ideal symbol (with definition location) in the i

[clang-tools-extra] r363554 - [clangd] Detect C++ for extension-less source files in vscode extension

2019-06-17 Thread Haojian Wu via cfe-commits
Author: hokein Date: Mon Jun 17 05:59:14 2019 New Revision: 363554 URL: http://llvm.org/viewvc/llvm-project?rev=363554&view=rev Log: [clangd] Detect C++ for extension-less source files in vscode extension Summary: Extend our extension to support detecting these files as C++ files based on the fi

[PATCH] D63397: [clangd] Detect C++ for extension-less source files in vscode extension

2019-06-17 Thread Haojian Wu via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL363554: [clangd] Detect C++ for extension-less source files in vscode extension (authored by hokein, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Changed prior to

[PATCH] D63426: [clangd] Narrow rename to local symbols.

2019-06-17 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. Previously, we perform rename for all kinds of symbols (local, global). This patch narrows the scope by only renaming sym

[PATCH] D63423: [Diagnostics] Diagnose misused xor as pow

2019-06-17 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 updated this revision to Diff 205058. xbolva00 added a comment. More tests CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63423/new/ https://reviews.llvm.org/D63423 Files: include/clang/Basic/DiagnosticGroups.td include/clang/Basic/DiagnosticSemaKinds.td lib/Sema/SemaExpr

[clang-tools-extra] r363555 - [clangd] Bump vscode-clangd v0.0.15.

2019-06-17 Thread Haojian Wu via cfe-commits
Author: hokein Date: Mon Jun 17 06:18:24 2019 New Revision: 363555 URL: http://llvm.org/viewvc/llvm-project?rev=363555&view=rev Log: [clangd] Bump vscode-clangd v0.0.15. CHANGELOG: - support detecting C++ language from first line (`-*- C++ -*-`) of the file. Modified: clang-tools-extra/trunk

[PATCH] D63425: [clangd] Perform merge for main file symbols.

2019-06-17 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added a comment. We also make use of `PickOne` in `updatePreamble` shouldn't that also cause similar troubles? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63425/new/ https://reviews.llvm.org/D63425 ___

[PATCH] D53157: Teach the IRBuilder about constrained fadd and friends

2019-06-17 Thread Kevin P. Neal via Phabricator via cfe-commits
kpn added a comment. Ping. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D53157/new/ https://reviews.llvm.org/D53157 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D63425: [clangd] Perform merge for main file symbols.

2019-06-17 Thread Haojian Wu via Phabricator via cfe-commits
hokein added a comment. In D63425#1546010 , @kadircet wrote: > We also make use of `PickOne` in `updatePreamble` shouldn't that also cause > similar troubles? Yeah, we have similar problems in `updatePreamble`, but this is a correctness/performance tra

Re: r363116 - [X86] [ABI] Fix i386 ABI "__m64" type bug

2019-06-17 Thread Hans Wennborg via cfe-commits
This broke Chromium for 32-bit Linux: https://bugs.chromium.org/p/chromium/issues/detail?id=974542#c5 It's not clear what's happening yet, bet just to give a heads up. Since this changes ABI behaviour, it would probably we worth mentioning in docs/ReleaseNotes.rst too. On Wed, Jun 12, 2019 at 3:

Re: r363116 - [X86] [ABI] Fix i386 ABI "__m64" type bug

2019-06-17 Thread Hans Wennborg via cfe-commits
pengfei's email bounced. Trying Wei Xiao instead. On Mon, Jun 17, 2019 at 3:44 PM Hans Wennborg wrote: > > This broke Chromium for 32-bit Linux: > https://bugs.chromium.org/p/chromium/issues/detail?id=974542#c5 > > It's not clear what's happening yet, bet just to give a heads up. > > Since this c

[PATCH] D59744: Fix i386 ABI "__m64" type bug

2019-06-17 Thread Hans Wennborg via Phabricator via cfe-commits
hans added a comment. I tried replying on the cfe-commits email, but both Pengfei and Wei's email addresses seem to bounce, so replying here instead: This broke Chromium for 32-bit Linux: https://bugs.chromium.org/p/chromium/issues/detail?id=974542#c5 It's not clear what's happening yet, bet ju

[PATCH] D43500: [clang-tidy]: modernize-use-default-member-init: Remove trailing comma and colon.

2019-06-17 Thread Jeremy Demeule via Phabricator via cfe-commits
jdemeule added a comment. In D43500#1244518 , @JonasToth wrote: > What is the status here? Will you continue to work on this patch @jdemeule > (which would be great!) ? Hi, now, this patch contains only tests which are already covered with lit tests. T

[PATCH] D43500: [clang-tidy]: modernize-use-default-member-init: Remove trailing comma and colon.

2019-06-17 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added a comment. In D43500#1546077 , @jdemeule wrote: > In D43500#1244518 , @JonasToth wrote: > > > What is the status here? Will you continue to work on this patch @jdemeule > > (which would be great!)

[PATCH] D53157: Teach the IRBuilder about constrained fadd and friends

2019-06-17 Thread Melanie Blower via Phabricator via cfe-commits
mibintc added a comment. This works for me, I redid my patches adding fp-model options to work with this newest changeset, (but I haven't yet uploaded them.) CHANGES SINCE LAST ACTION https://reviews.llvm.org/D53157/new/ https://reviews.llvm.org/D53157

[PATCH] D62697: AMDGPU: Disable errno by default

2019-06-17 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl accepted this revision. yaxunl added a comment. This revision is now accepted and ready to land. LGTM. Sorry for the delay. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D62697/new/ https://reviews.llvm.org/D62697 ___ cfe-commits mail

[PATCH] D43500: [clang-tidy]: modernize-use-default-member-init: Remove trailing comma and colon.

2019-06-17 Thread Jeremy Demeule via Phabricator via cfe-commits
jdemeule added a comment. In D43500#1546089 , @lebedev.ri wrote: > In D43500#1546077 , @jdemeule wrote: > > > In D43500#1244518 , @JonasToth > > wrote: > > > > > What is the

r363563 - [clang][CodeGen] Remove std::move on temporary

2019-06-17 Thread Kadir Cetinkaya via cfe-commits
Author: kadircet Date: Mon Jun 17 07:23:06 2019 New Revision: 363563 URL: http://llvm.org/viewvc/llvm-project?rev=363563&view=rev Log: [clang][CodeGen] Remove std::move on temporary Modified: cfe/trunk/lib/CodeGen/CGCUDANV.cpp Modified: cfe/trunk/lib/CodeGen/CGCUDANV.cpp URL: http://llvm.or

[PATCH] D63423: [Diagnostics] Diagnose misused xor as pow

2019-06-17 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 added a comment. Should we also emit a note how to silence it, eg. swap xor operands or add parentheses around 2/10 ? CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63423/new/ https://reviews.llvm.org/D63423 ___ cfe-commits mailing

[clang-tools-extra] r363568 - [clangd] Perform merge for main file symbols.

2019-06-17 Thread Haojian Wu via cfe-commits
Author: hokein Date: Mon Jun 17 07:49:18 2019 New Revision: 363568 URL: http://llvm.org/viewvc/llvm-project?rev=363568&view=rev Log: [clangd] Perform merge for main file symbols. Summary: Previously, we randomly pick one main file symbol in dynamic index, we may loose the ideal symbol (with defin

[PATCH] D63425: [clangd] Perform merge for main file symbols.

2019-06-17 Thread Haojian Wu via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL363568: [clangd] Perform merge for main file symbols. (authored by hokein, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Changed prior to commit: https://reviews

[PATCH] D62883: [analyzer] Track conditions of terminator statements on which the reported node depends on

2019-06-17 Thread Csaba Dabis via Phabricator via cfe-commits
Charusso accepted this revision. Charusso added a comment. My opinion based on the Summary, which is the kind of the opposite what we have. No invalidation happens, so no swap happens, so it is kind of misleading like writing out "Returning something" where we cannot be sure what we return ("re

[PATCH] D63164: [HIP] Add option to force lambda nameing following ODR in HIP/CUDA.

2019-06-17 Thread Michael Liao via Phabricator via cfe-commits
hliao added a comment. ping again. not sure my explanation gives more details on why this patch is created. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63164/new/ https://reviews.llvm.org/D63164 ___

[PATCH] D59402: Suggestions to fix -Wmissing-{prototypes,variable-declarations}

2019-06-17 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: lib/Sema/SemaDecl.cpp:13340-13342 } + else +Diag(FD->getTypeSpecStartLoc(), diag::note_static_for_internal_linkage) Formatting here is a bit off -- you should run through clang-format. Also, I'd

[PATCH] D62619: [analyzer][IDF] Add a control dependency calculator + a new debug checker

2019-06-17 Thread Jakub Kuderski via Phabricator via cfe-commits
kuhar added inline comments. Comment at: clang/include/clang/Analysis/Analyses/Dominators.h:51 + CFGDominatorTreeImpl(CFG *cfg) { +buildDominatorTree(cfg); + } DomTree has a constructor that runs the builder -- why not use it directly? Co

[PATCH] D63436: [analyzer] Fix JSON dumps for ExplodedNodes

2019-06-17 Thread Csaba Dabis via Phabricator via cfe-commits
Charusso created this revision. Charusso added a reviewer: NoQ. Charusso added a project: clang. Herald added subscribers: cfe-commits, dkrupp, donat.nagy, Szelethus, mikhail.ramalho, a.sidorin, szepet, baloghadamsoftware, xazax.hun. - Now we apply the `has_report` on the proper `ProgramPoint`. -

[PATCH] D61552: [clang] Adapt ASTMatcher to explicit(bool) specifier

2019-06-17 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D61552#1530730 , @Tyker wrote: > i didn't manage to get "clang/docs/tools/dump_ast_matchers.py" to work. it > keep failing to parse and generating empty files as a result. Are you getting errors from running it, or just

[PATCH] D63436: [analyzer] Fix JSON dumps for ExplodedNodes

2019-06-17 Thread Csaba Dabis via Phabricator via cfe-commits
Charusso marked an inline comment as done. Charusso added inline comments. Comment at: clang/test/Analysis/dump_egraph.c:3 // RUN: cat %t.dot | FileCheck %s -// RUN: %clang_analyze_cc1 -analyzer-checker=core -analyzer-dump-egraph=%t.dot -trim-egraph %s // REQUIRES: asserts ---

[PATCH] D62571: Implement codegen for MSVC unions with reference members

2019-06-17 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added reviewers: rnk, majnemer. aaron.ballman added subscribers: majnemer, rnk. aaron.ballman added a comment. This looks reasonable to me, but @rnk and @majnemer may have opinions as well. Comment at: clang/test/CodeGenCXX/ms-union-member-ref.cpp:3-6 +union A { +

[PATCH] D63423: [Diagnostics] Diagnose misused xor as pow

2019-06-17 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 updated this revision to Diff 205089. xbolva00 added a comment. Silence note added. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63423/new/ https://reviews.llvm.org/D63423 Files: include/clang/Basic/DiagnosticGroups.td include/clang/Basic/DiagnosticSemaKinds.td lib/Sema

[PATCH] D63437: [CodeGen][ARM] Fix FP16 vector coercion

2019-06-17 Thread Mikhail Maltsev via Phabricator via cfe-commits
miyuki created this revision. miyuki added reviewers: eli.friedman, olista01. Herald added subscribers: kristof.beyls, javed.absar. Herald added a project: clang. When a function argument or return type is a homogeneous aggregate which contains an FP16 vector but the target does not support FP16 o

[PATCH] D63039: Various improvements to Clang MSVC Visualizers

2019-06-17 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman accepted this revision. aaron.ballman added a comment. This revision is now accepted and ready to land. LGTM! Thank you for the fixes, Mike! Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63039/new/ https://reviews.llvm.org/D63039

[PATCH] D63438: [analyzer] print() JSONify: ProgramPoint revision

2019-06-17 Thread Csaba Dabis via Phabricator via cfe-commits
Charusso created this revision. Charusso added a reviewer: NoQ. Charusso added a project: clang. Herald added subscribers: cfe-commits, dkrupp, donat.nagy, Szelethus, mikhail.ramalho, a.sidorin, szepet, baloghadamsoftware, xazax.hun. Now we also print out the filename with its path. Repository:

[PATCH] D63437: [CodeGen][ARM] Fix FP16 vector coercion

2019-06-17 Thread Oliver Stannard (Linaro) via Phabricator via cfe-commits
ostannard added a comment. This doesn't look like the right pace to fix this - the backend can handle vectors of i8 and i16, which are also not legal types, so why can't it correctly handle vectors of f16? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.

[PATCH] D61333: [ASTImporter] Fix LLDB lookup in transparent ctx and with ext src

2019-06-17 Thread Gabor Marton via Phabricator via cfe-commits
martong updated this revision to Diff 205093. martong added a comment. - Fix regression of TestFormatters.py Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D61333/new/ https://reviews.llvm.org/D61333 Files: clang/lib/AST/ASTImporter.cpp clang/un

r363573 - [Remarks] Extend -fsave-optimization-record to specify the format

2019-06-17 Thread Francis Visoiu Mistrih via cfe-commits
Author: thegameg Date: Mon Jun 17 09:06:00 2019 New Revision: 363573 URL: http://llvm.org/viewvc/llvm-project?rev=363573&view=rev Log: [Remarks] Extend -fsave-optimization-record to specify the format Use -fsave-optimization-record= to specify a different format than the default, which is YAML.

r363574 - Various improvements to Clang MSVC Visualizer

2019-06-17 Thread Mike Spertus via cfe-commits
Author: mps Date: Mon Jun 17 09:12:45 2019 New Revision: 363574 URL: http://llvm.org/viewvc/llvm-project?rev=363574&view=rev Log: Various improvements to Clang MSVC Visualizer This change adds/improves MSVC visualizers for many Clang types, including array types, trailing return types in functio

[PATCH] D61333: [ASTImporter] Fix LLDB lookup in transparent ctx and with ext src

2019-06-17 Thread Gabor Marton via Phabricator via cfe-commits
martong added a comment. About the regression of TestFormatters.py: I realized that the problem is about the wrong implementation of the ExternalASTSource interface. In the implementation of FindExternalLexicalDecls of this interface, we simply ignored those cases when the given predicate (passe

[PATCH] D63039: Various improvements to Clang MSVC Visualizers

2019-06-17 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL363574: Various improvements to Clang MSVC Visualizer (authored by mps, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Changed prior to commit: https://reviews.ll

[PATCH] D63437: [CodeGen][ARM] Fix FP16 vector coercion

2019-06-17 Thread Mikhail Maltsev via Phabricator via cfe-commits
miyuki added a comment. In D63437#1546312 , @ostannard wrote: > This doesn't look like the right pace to fix this - the backend can handle > vectors of i8 and i16, which are also not legal types, so why can't it > correctly handle vectors of f16? IIRC,

[PATCH] D57086: Ignore trailing NullStmts in StmtExprs for GCC compatibility

2019-06-17 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman accepted this revision. aaron.ballman added a comment. This revision is now accepted and ready to land. In D57086#1535873 , @domdom wrote: > Sorry I it's taken me a while to get back to this work. I've rebased the > changes and taken advanta

[PATCH] D63423: [Diagnostics] Diagnose misused xor as pow

2019-06-17 Thread JF Bastien via Phabricator via cfe-commits
jfb added a comment. As a reference: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90885 CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63423/new/ https://reviews.llvm.org/D63423 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https:/

[PATCH] D63423: [Diagnostics] Diagnose misused xor as pow

2019-06-17 Thread JF Bastien via Phabricator via cfe-commits
jfb added a comment. I think you want to avoid warning inside macros as well, say: #define AWESOME(x, y) ({ blah blah blah; x ^ y; blah }) AWESOME(2, 10); // probably not a bug Comment at: test/SemaCXX/warn-xor-as-pow.cpp:13 +res = a ^ b; +res = 2 ^ 0; +res

[PATCH] D63423: [Diagnostics] Diagnose misused xor as pow

2019-06-17 Thread JF Bastien via Phabricator via cfe-commits
jfb added a comment. What does the suggested for for `2 ^ 32` look like? I hope it's not `1 << 32` :) CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63423/new/ https://reviews.llvm.org/D63423 ___ cfe-commits mailing list cfe-commits@lists.ll

[PATCH] D63369: [AST] Fixed extraneous warnings for binary conditional operator

2019-06-17 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers added inline comments. Comment at: clang/lib/AST/Expr.cpp:2351-2352 return false; if (!Exp->getLHS()) return true; return Exp->getLHS()->isUnusedResultAWarning(WarnE, Loc, R1, R2, Ctx); rsmith wrote: > Looks like whoever wr

[PATCH] D53157: Teach the IRBuilder about constrained fadd and friends

2019-06-17 Thread John McCall via Phabricator via cfe-commits
rjmccall added inline comments. Comment at: include/llvm/IR/IRBuilder.h:228 + /// Enable/Disable use of constrained floating point math + void setIsConstrainedFP(bool IsCon) { IsFPConstrained = IsCon; } + kpn wrote: > erichkeane wrote: > > kpn wrote: > > > kbar

[PATCH] D53157: Teach the IRBuilder about constrained fadd and friends

2019-06-17 Thread Kevin P. Neal via Phabricator via cfe-commits
kpn marked an inline comment as done. kpn added inline comments. Comment at: include/llvm/IR/IRBuilder.h:113 +CR_ToZero ///< This corresponds to "fpround.tozero". + }; + rjmccall wrote: > Should these have "FP" in the name somewhere? And are they real

[PATCH] D62619: [analyzer][IDF] Add a control dependency calculator + a new debug checker

2019-06-17 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus updated this revision to Diff 205109. Szelethus marked 7 inline comments as done. Szelethus added a comment. Fixes according to reviewer comments. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D62619/new/ https://reviews.llvm.org/D62619 Files: clang/include/clang/Analysis/An

[PATCH] D63371: Rewrite ConstStructBuilder with a mechanism that can cope with splitting and updating constants.

2019-06-17 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. Isn't `[[no_unique_address]]` only significant for empty members? I'm not sure why they need significant support from constant-building, since they expand to no meaningful initializer. We have some code we'll hopefully be upstreaming soon that relies on being able to

[PATCH] D62619: [analyzer][IDF] Add a control dependency calculator + a new debug checker

2019-06-17 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus added inline comments. Comment at: clang/include/clang/Analysis/Analyses/Dominators.h:51 + CFGDominatorTreeImpl(CFG *cfg) { +buildDominatorTree(cfg); + } kuhar wrote: > DomTree has a constructor that runs the builder -- why not use it directly? Th

[PATCH] D63369: [AST] Fixed extraneous warnings for binary conditional operator

2019-06-17 Thread Nathan Huckleberry via Phabricator via cfe-commits
Nathan-Huckleberry updated this revision to Diff 205117. Nathan-Huckleberry added a comment. - [AST] Cleanup of conditional operator unused warning detection Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63369/new/ https://reviews.llvm.org/D63369

[PATCH] D62750: Show note for -Wmissing-prototypes for functions with parameters

2019-06-17 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman accepted this revision. aaron.ballman added a comment. This revision is now accepted and ready to land. LGTM! Comment at: lib/Sema/SemaDecl.cpp:13335 +? FixItHint::CreateInsertion(FTL.getRParenLoc(), "void") +: FixI

r363585 - [clang][AST] Remove unnecessary 'const'.

2019-06-17 Thread Michael Liao via cfe-commits
Author: hliao Date: Mon Jun 17 10:47:03 2019 New Revision: 363585 URL: http://llvm.org/viewvc/llvm-project?rev=363585&view=rev Log: [clang][AST] Remove unnecessary 'const'. Modified: cfe/trunk/include/clang/AST/Expr.h Modified: cfe/trunk/include/clang/AST/Expr.h URL: http://llvm.org/viewvc/

[PATCH] D63423: [Diagnostics] Diagnose misused xor as pow

2019-06-17 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 updated this revision to Diff 205121. xbolva00 added a comment. Fixed notes by @jfb. Thank you. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63423/new/ https://reviews.llvm.org/D63423 Files: include/clang/Basic/DiagnosticGroups.td include/clang/Basic/DiagnosticSemaKinds.t

[PATCH] D63371: Rewrite ConstStructBuilder with a mechanism that can cope with splitting and updating constants.

2019-06-17 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added a comment. In D63371#1546500 , @rjmccall wrote: > Isn't `[[no_unique_address]]` only significant for empty members? I'm not > sure why they need significant support from constant-building, since they > expand to no meaningful initializer.

[PATCH] D63139: [Diagnostics] Implement -Wswitch-unreachable

2019-06-17 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: include/clang/Basic/DiagnosticGroups.td:541 def SwitchEnum : DiagGroup<"switch-enum">; +def SwitchUnreachable : DiagGroup<"switch-unreachable">; def Switch : DiagGroup<"switch">; I don't think you

[PATCH] D63423: [Diagnostics] Diagnose misused xor as pow

2019-06-17 Thread JF Bastien via Phabricator via cfe-commits
jfb added a comment. Why have `.c` and `.cpp` tests? Comment at: test/Sema/warn-xor-as-pow.c:43 + res = TWO_ULL ^ 16; + res = 2 ^ 32; // expected-warning {{result of '2 ^ 32' is 34; maybe you mean '1<<32', but shift count >= width of type}} + // expected-note@-1 {{replace e

[PATCH] D63423: [Diagnostics] Diagnose misused xor as pow

2019-06-17 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 updated this revision to Diff 205126. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63423/new/ https://reviews.llvm.org/D63423 Files: include/clang/Basic/DiagnosticGroups.td include/clang/Basic/DiagnosticSemaKinds.td lib/Sema/SemaExpr.cpp test/Sema/warn-xor-as-pow.c te

RE: r362856 - DebugInfo: Add support for 'nodebug' attribute on typedefs and alias templates

2019-06-17 Thread via cfe-commits
Is this really measurable? All you're suppressing are the typedef DIEs and their names; the DIEs are small, although I admit the names can take up space. (I'm not really objecting, it's just hard to intuit a big size benefit.) --paulr > -Original Message- > From: cfe-commits [mailto:cfe-c

[PATCH] D53157: Teach the IRBuilder about constrained fadd and friends

2019-06-17 Thread John McCall via Phabricator via cfe-commits
rjmccall added inline comments. Comment at: include/llvm/IR/IRBuilder.h:113 +CR_ToZero ///< This corresponds to "fpround.tozero". + }; + kpn wrote: > rjmccall wrote: > > Should these have "FP" in the name somewhere? And are they really > > IRBuilder-

[PATCH] D63423: [Diagnostics] Diagnose misused xor as pow

2019-06-17 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-xor-as-pow.c:45 + // expected-note@-1 {{replace expression with '(2) ^ 32' to silence this warning}} + res = 2 ^ 64; // expected-warning {{result of '2 ^ 64' is 66; maybe you

[PATCH] D63423: [Diagnostics] Diagnose misused xor as pow

2019-06-17 Thread JF Bastien via Phabricator via cfe-commits
jfb added inline comments. Comment at: test/Sema/warn-xor-as-pow.c:45 + // expected-note@-1 {{replace expression with '(2) ^ 32' to silence this warning}} + res = 2 ^ 64; // expected-warning {{result of '2 ^ 64' is 66; maybe you mean '1<<64', but shift count >= width of type}

[PATCH] D63423: [Diagnostics] Diagnose misused xor as pow

2019-06-17 Thread Arthur O'Dwyer via Phabricator via cfe-commits
Quuxplusone added a comment. Seems low-value at first glance, but I guess I can't argue with those Twitter and codesearch results. Do you have codesearch results for `^2`? https://codesearch.isocpp.org/cgi-bin/cgi_ppsearch?q=%5E+2&search=Search Seems like a lot of false positives (and a lot o

[PATCH] D63369: [AST] Fixed extraneous warnings for binary conditional operator

2019-06-17 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers added inline comments. Comment at: clang/lib/AST/Expr.cpp:2348 // RHS are warnings. const ConditionalOperator *Exp = cast(this); +return Exp->getLHS()->isUnusedResultAWarning(WarnE, Loc, R1, R2, Ctx) && `const auto *Exp` ==

Re: r362856 - DebugInfo: Add support for 'nodebug' attribute on typedefs and alias templates

2019-06-17 Thread David Blaikie via cfe-commits
Oh, yeah - so the trick here is that you don't just drop the typedef, but you drop an context for that typedef (if it's not otherwise used) - like namespaces (probably otherwise used) and classes (in the class of C++ type traits these aren't generally referenced in ways other than the typedef they

[PATCH] D63369: [AST] Fixed extraneous warnings for binary conditional operator

2019-06-17 Thread Nathan Huckleberry via Phabricator via cfe-commits
Nathan-Huckleberry updated this revision to Diff 205129. Nathan-Huckleberry added a comment. - [AST] Formatting changes to ConditionalOperator unused detection Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63369/new/ https://reviews.llvm.org/D63369

[PATCH] D63369: [AST] Fixed extraneous warnings for binary conditional operator

2019-06-17 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers accepted this revision. nickdesaulniers added a comment. Thanks for the patch and following up on the review comments. Let's work on getting you commit access now. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63369/new/ https://r

[PATCH] D63451: P0840R2: support for [[no_unique_address]] attribute

2019-06-17 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith created this revision. rsmith added a reviewer: rjmccall. Herald added subscribers: aheejin, dschuff. Herald added a project: clang. Add support for the C++2a [[no_unique_address]] attribute for targets using the Itanium C++ ABI. This depends on D63371 .

[PATCH] D63423: [Diagnostics] Diagnose misused xor as pow

2019-06-17 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 marked 2 inline comments as done. xbolva00 added inline comments. Comment at: lib/Sema/SemaExpr.cpp:10924 + + if (LeftSideValue == 2 || LeftSideValue == 10) { +llvm::APInt XorValue = LeftSideValue ^ RightSideValue; Quuxplusone wrote: > Do you have m

[PATCH] D58033: Add option for emitting dbg info for call site parameters

2019-06-17 Thread Paul Robinson via Phabricator via cfe-commits
probinson added inline comments. Comment at: lib/Frontend/CompilerInvocation.cpp:755 + (Arch == llvm::Triple::x86 || Arch == llvm::Triple::x86_64)) +Opts.EnableDebugEntryValues = Args.hasArg(OPT_femit_debug_entry_values); + You want to disable entry-valu

[PATCH] D63423: [Diagnostics] Diagnose misused xor as pow

2019-06-17 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 updated this revision to Diff 205136. xbolva00 added a comment. Updated. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63423/new/ https://reviews.llvm.org/D63423 Files: include/clang/Basic/DiagnosticGroups.td include/clang/Basic/DiagnosticSemaKinds.td lib/Sema/SemaExpr.c

[PATCH] D63371: Rewrite ConstStructBuilder with a mechanism that can cope with splitting and updating constants.

2019-06-17 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. In D63371#1546587 , @rsmith wrote: > In D63371#1546500 , @rjmccall wrote: > > > Isn't `[[no_unique_address]]` only significant for empty members? I'm not > > sure why they need significan

[PATCH] D63423: [Diagnostics] Diagnose misused xor as pow

2019-06-17 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 updated this revision to Diff 205140. xbolva00 added a comment. Removed useless else block with return. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63423/new/ https://reviews.llvm.org/D63423 Files: include/clang/Basic/DiagnosticGroups.td include/clang/Basic/DiagnosticSem

[PATCH] D63376: [clang] Small improvments after Adding APValue to ConstantExpr

2019-06-17 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith accepted this revision. rsmith added a comment. This revision is now accepted and ready to land. Nice cleanup! Comment at: clang/include/clang/Sema/Sema.h:10298 + bool AllowFold = true, +

[PATCH] D63423: [Diagnostics] Diagnose misused xor as pow

2019-06-17 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 marked an inline comment as done. xbolva00 added inline comments. Comment at: test/SemaCXX/warn-xor-as-pow.cpp:85 + res = XOR(10, 10); + res = 10^-7; +} What should we suggest here ? :) Nevative shift ? think we should diagnose it. I am not sure about

[PATCH] D63423: [Diagnostics] Diagnose misused xor as pow

2019-06-17 Thread John Regehr via Phabricator via cfe-commits
regehr added a comment. Just wanted to say that I think I agree with the design choices here! CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63423/new/ https://reviews.llvm.org/D63423 ___ cfe-commits mailing list cfe-commits@lists.llvm.org h

[PATCH] D62750: Show note for -Wmissing-prototypes for functions with parameters

2019-06-17 Thread Aaron Puchert via Phabricator via cfe-commits
aaronpuchert added inline comments. Comment at: lib/Sema/SemaDecl.cpp:13335 +? FixItHint::CreateInsertion(FTL.getRParenLoc(), "void") +: FixItHint{}); } aaron.ballman wrote: > In this case, we could probab

[PATCH] D62750: Show note for -Wmissing-prototypes for functions with parameters

2019-06-17 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: lib/Sema/SemaDecl.cpp:13335 +? FixItHint::CreateInsertion(FTL.getRParenLoc(), "void") +: FixItHint{}); } aaronpuchert wrote: > aaron.ballman wrote: > > In t

[PATCH] D63371: Rewrite ConstStructBuilder with a mechanism that can cope with splitting and updating constants.

2019-06-17 Thread John McCall via Phabricator via cfe-commits
rjmccall added inline comments. Comment at: lib/CodeGen/CGExprConstant.cpp:73 +/// Incremental builder for an llvm::Constant* holding a structure constant. +class ConstantBuilder : private ConstantBuilderUtils { + llvm::SmallVector Elems; This seems like a very

  1   2   >