[PATCH] D46398: [ASTImporterTest] Fix potential use-after-free

2018-05-14 Thread Aleksei Sidorin via Phabricator via cfe-commits
a.sidorin closed this revision. a.sidorin added a comment. Closed with https://reviews.llvm.org/rC332256. Repository: rC Clang https://reviews.llvm.org/D46398 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/m

[PATCH] D46863: [X86] Use __builtin_convertvector to implement some of the packed integer to packed flow conversion intrinsics.

2018-05-14 Thread Craig Topper via Phabricator via cfe-commits
craig.topper created this revision. craig.topper added reviewers: RKSimon, spatel. I believe this is safe assuming default rounding mode. The conversion might be inexact, but it can never overflow the FP type so this shouldn't be undefined behavior for the uitofp/sitofp instructions. We already

[PATCH] D41537: Optionally add code completion results for arrow instead of dot

2018-05-14 Thread Ivan Donchevskii via Phabricator via cfe-commits
yvvan added inline comments. Comment at: lib/Sema/SemaCodeComplete.cpp:4118 + : diag::err_typecheck_member_reference_suggestion; + Diag(OpLoc, DiagID) << ConvertedBaseType << IsArrow + << Base->getSourceRange() << FixIt;

[PATCH] D41537: Optionally add code completion results for arrow instead of dot

2018-05-14 Thread Ivan Donchevskii via Phabricator via cfe-commits
yvvan updated this revision to Diff 146749. yvvan marked 2 inline comments as done. yvvan added a comment. Only C++ part, libclang part has moved to https://reviews.llvm.org/D46862 https://reviews.llvm.org/D41537 Files: include/clang/Basic/DiagnosticSemaKinds.td include/clang/Sema/CodeCompl

[PATCH] D46862: Optionally add code completion results for arrow instead of dot (libclang)

2018-05-14 Thread Ivan Donchevskii via Phabricator via cfe-commits
yvvan created this revision. yvvan added reviewers: ilya-biryukov, klimek, bkramer, arphaman. Follow up for https://reviews.llvm.org/D41537 - libclang part is extracted into this review https://reviews.llvm.org/D46862 Files: include/clang-c/Index.h test/Index/complete-arrow-dot.cpp tools

[PATCH] D46421: [analyzer][CrossTU] Extend CTU to VarDecls with initializer

2018-05-14 Thread Gábor Horváth via Phabricator via cfe-commits
xazax.hun added inline comments. Comment at: include/clang/CrossTU/CrossTranslationUnit.h:117 - /// This function loads a function definition from an external AST - ///file. + /// \brief This function loads a definition from an external AST file. /// -

[PATCH] D46834: [Sema][Cxx17] Error message for C++17 static_assert(pred) without string literal

2018-05-14 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
dexonsmith requested changes to this revision. dexonsmith added a comment. This revision now requires changes to proceed. The code looks correct to me, although I have a few suggestions inline. When you resubmit, please include full context (e.g., `git diff -U99`). Jan and I discussed this

[libclc] r332324 - rootn: Use denormal path only

2018-05-14 Thread Jan Vesely via cfe-commits
Author: jvesely Date: Mon May 14 21:22:43 2018 New Revision: 332324 URL: http://llvm.org/viewvc/llvm-project?rev=332324&view=rev Log: rootn: Use denormal path only It's OK to either flush to 0 or return denormal result if the device does not support denormals. See sec 7.2 and 7.5.3 of OCL specs U

r332322 - [X86] Revert part of r332266: Use __builtin_convertvector to replace some of the avx512 truncate builtins.

2018-05-14 Thread Craig Topper via cfe-commits
Author: ctopper Date: Mon May 14 20:17:52 2018 New Revision: 332322 URL: http://llvm.org/viewvc/llvm-project?rev=332322&view=rev Log: [X86] Revert part of r332266: Use __builtin_convertvector to replace some of the avx512 truncate builtins. The masking doesn't work right in the backend for the o

[PATCH] D44888: [RISCV] Default enable linker relaxation and add -mrelax, -mno-relax flags

2018-05-14 Thread Shiva Chen via Phabricator via cfe-commits
shiva0217 added inline comments. Comment at: lib/Driver/ToolChains/Arch/RISCV.cpp:130 + // which may override the defaults. + handleTargetFeaturesGroup(Args, Features, options::OPT_m_riscv_Features_Group); } kito-cheng wrote: > This part should move to the b

[PATCH] D44888: [RISCV] Default enable linker relaxation and add -mrelax, -mno-relax flags

2018-05-14 Thread Shiva Chen via Phabricator via cfe-commits
shiva0217 updated this revision to Diff 146737. shiva0217 added a comment. Rebase patch to https://reviews.llvm.org/D45465 Repository: rL LLVM https://reviews.llvm.org/D44888 Files: include/clang/Driver/Options.td lib/Driver/ToolChains/Arch/RISCV.cpp test/Driver/riscv-features.c Inde

[PATCH] D45766: [Sema] Add -Wno-self-assign-overloaded

2018-05-14 Thread Arthur O'Dwyer via Phabricator via cfe-commits
Quuxplusone added a comment. In https://reviews.llvm.org/D45766#1097797, @ksu.shadura wrote: > Thank you for the test example! I got your point, but I wanted to ask if it > should be like this for commutative operations? > In our case it is actually matrix, and subtraction of matrices is not >

[PATCH] D10833: Retrieve BinaryOperator::getOpcode and BinaryOperator::getOpcodeStr via libclang and its python interface

2018-05-14 Thread Ian Sunamura via Phabricator via cfe-commits
kent08ian added a comment. In https://reviews.llvm.org/D10833#970906, @milianw wrote: > still looks good to me. can someone else please review and commit this? Any updates on this? This feature will be very helpful. :) Repository: rC Clang https://reviews.llvm.org/D10833 ___

[PATCH] D45465: [AST] Fix printing tag decl groups in decl contexts

2018-05-14 Thread Joel E. Denny via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL332314: [AST] Fix printing tag decl groups in decl contexts (authored by jdenny, committed by ). Herald added a subscriber: llvm-commits. Changed prior to commit: https://reviews.llvm.org/D45465?vs=1467

r332314 - [AST] Fix printing tag decl groups in decl contexts

2018-05-14 Thread Joel E. Denny via cfe-commits
Author: jdenny Date: Mon May 14 17:44:14 2018 New Revision: 332314 URL: http://llvm.org/viewvc/llvm-project?rev=332314&view=rev Log: [AST] Fix printing tag decl groups in decl contexts For example, given: struct T1 { struct T2 *p0; }; -ast-print produced: struct T1 { struct T2;

[PATCH] D46485: Add python tool to dump and construct header maps

2018-05-14 Thread Bruno Cardoso Lopes via Phabricator via cfe-commits
bruno added a comment. Ping Repository: rC Clang https://reviews.llvm.org/D46485 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D45465: [AST] Fix printing tag decl groups in decl contexts

2018-05-14 Thread Joel E. Denny via Phabricator via cfe-commits
jdenny added a comment. In https://reviews.llvm.org/D45465#1098710, @rsmith wrote: > Looks good, thanks. Thanks. > It strikes me that this will still lead to inconsistencies. For example, I > expect this: > > struct A { struct B *a, *b; struct B *c, *d; }; > > > ... to print as: > > s

[PATCH] D46822: [RISCV] Add driver for riscv32-unknown-elf baremetal target

2018-05-14 Thread Eli Friedman via Phabricator via cfe-commits
efriedma added a comment. Could you include some documentation for how to construct a baremetal environment like the one this code expects? It's not clear what exactly you expect to be installed where. Repository: rC Clang https://reviews.llvm.org/D46822

[PATCH] D46823: [analyzer] const init: handle non-explicit cases more accurately

2018-05-14 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added a comment. Yay thanks! I think some cornercases would need to be dealt with. Comment at: lib/StaticAnalyzer/Core/RegionStore.cpp:1650 + +// If there is a list, but no init, it must be zero. +if (i >= InitList->getNumInits()) N

r332310 - Enable control flow pruning of float overflow warnings.

2018-05-14 Thread Richard Trieu via cfe-commits
Author: rtrieu Date: Mon May 14 16:21:48 2018 New Revision: 332310 URL: http://llvm.org/viewvc/llvm-project?rev=332310&view=rev Log: Enable control flow pruning of float overflow warnings. Like other conversion warnings, allow float overflow warnings to be disabled in known dead paths of template

[PATCH] D46834: [Sema][Cxx17] Error message for C++17 static_assert(pred) without string literal

2018-05-14 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added a comment. This would violate our guidelines for diagnostic messages; see https://clang.llvm.org/docs/InternalsManual.html#the-format-string In particular: "Take advantage of location information. The user will be able to see the line and location of the caret, so you don’t need to

[PATCH] D46159: [clang-tidy] Add a flag to enable alpha checkers

2018-05-14 Thread Paul Fultz II via Phabricator via cfe-commits
pfultz2 updated this revision to Diff 146719. pfultz2 added a comment. Rebased https://reviews.llvm.org/D46159 Files: clang-tidy/ClangTidy.cpp clang-tidy/ClangTidy.h clang-tidy/ClangTidyDiagnosticConsumer.cpp clang-tidy/ClangTidyDiagnosticConsumer.h clang-tidy/tool/ClangTidyMain.cpp

[PATCH] D45465: [AST] Fix printing tag decl groups in decl contexts

2018-05-14 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. Looks good, thanks. It strikes me that this will still lead to inconsistencies. For example, I expect this: struct A { struct B *a, *b; struct B *c, *d; }; ... to print as: struct A {

[PATCH] D46446: [c++17] Fix assertion on synthesizing deduction guides after a fatal error.

2018-05-14 Thread Volodymyr Sapsai via Phabricator via cfe-commits
vsapsai added a comment. Thanks for the review. Repository: rL LLVM https://reviews.llvm.org/D46446 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D46446: [c++17] Fix assertion on synthesizing deduction guides after a fatal error.

2018-05-14 Thread Volodymyr Sapsai via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL332307: [c++17] Fix assertion on synthesizing deduction guides after a fatal error. (authored by vsapsai, committed by ). Herald added a subscriber: llvm-commits. Changed prior to commit: https://review

r332307 - [c++17] Fix assertion on synthesizing deduction guides after a fatal error.

2018-05-14 Thread Volodymyr Sapsai via cfe-commits
Author: vsapsai Date: Mon May 14 15:49:44 2018 New Revision: 332307 URL: http://llvm.org/viewvc/llvm-project?rev=332307&view=rev Log: [c++17] Fix assertion on synthesizing deduction guides after a fatal error. After a fatal error Sema::InstantiatingTemplate doesn't allow further instantiation and

[PATCH] D45465: [AST] Fix printing tag decl groups in decl contexts

2018-05-14 Thread Joel E. Denny via Phabricator via cfe-commits
jdenny updated this revision to Diff 146709. jdenny marked 2 inline comments as done. jdenny added a comment. Made the suggested change. Thanks! https://reviews.llvm.org/D45465 Files: lib/AST/DeclPrinter.cpp test/Misc/ast-print-enum-decl.c test/Misc/ast-print-record-decl.c test/Sema/as

[PATCH] D46845: [libcxx][c++17] P0083R5: Splicing Maps and Sets

2018-05-14 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added a comment. How do you deal with the fact that node handles for map-like types need to be able to mutate a const member of a `pair` in-place? Are you assuming/hoping the compiler won't do bad things to the program as a result, or is there some reason why it would be unlikely to do s

[PATCH] D45177: CStringChecker, check strlcpy/strlcat

2018-05-14 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC332303: [analyzer] Re-apply r331096 "CStringChecker: Add support for BSD strlcpy()...". (authored by dergachev, committed by ). Repository: rC Clang https://reviews.llvm.org/D45177 Files: lib/Static

r332303 - [analyzer] Re-apply r331096 "CStringChecker: Add support for BSD strlcpy()...".

2018-05-14 Thread Artem Dergachev via cfe-commits
Author: dergachev Date: Mon May 14 15:32:24 2018 New Revision: 332303 URL: http://llvm.org/viewvc/llvm-project?rev=332303&view=rev Log: [analyzer] Re-apply r331096 "CStringChecker: Add support for BSD strlcpy()...". Fixed after revert in r331401. Patch by David Carlier! Differential Revision: h

[PATCH] D45177: CStringChecker, check strlcpy/strlcat

2018-05-14 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ accepted this revision. NoQ added a comment. This revision is now accepted and ready to land. Thanks! I'll commit again. https://reviews.llvm.org/D45177 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailma

[PATCH] D44934: [analyzer] Improve the modeling of `memset()`.

2018-05-14 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added a comment. Thank you! Looks good overall. Comment at: lib/StaticAnalyzer/Checkers/CStringChecker.cpp:1013-1014 + + // Get the offset and the base region to figure out whether the offset of + // buffer is 0. + RegionOffset Offset = MR->getAsOffset(); ---

[PATCH] D44788: Add an option to support debug fission on implicit ThinLTO.

2018-05-14 Thread Yunlian Jiang via Phabricator via cfe-commits
yunlian updated this revision to Diff 146698. yunlian edited the summary of this revision. yunlian added a comment. Herald added subscribers: JDevlieghere, aprantl. Use the option -gsplit-dwarf to make it more consistent. https://reviews.llvm.org/D44788 Files: include/clang/Driver/Options.td

[PATCH] D46187: [Analyzer] getRegisteredCheckers(): handle debug checkers too.

2018-05-14 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added a comment. In https://reviews.llvm.org/D46187#1089087, @lebedev.ri wrote: > > I believe we could also benefit from a method of extracting the analyzer's > > `clang -cc1` run-line from clang-tidy. This would allow arbitrary debugging > > over a single analyzer invocation. > > I'm not r

[PATCH] D46772: [analyzer] Extend the ObjCAutoreleaseWriteChecker to warn on captures as well

2018-05-14 Thread George Karpenkov via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC332300: [analyzer] Extend the ObjCAutoreleaseWriteChecker to warn on captures as well (authored by george.karpenkov, committed by ). Herald added a subscriber: cfe-commits. Repository: rC Clang https:/

[PATCH] D46446: [c++17] Fix assertion on synthesizing deduction guides after a fatal error.

2018-05-14 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. LGTM, thanks! https://reviews.llvm.org/D46446 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listi

r332300 - [analyzer] Extend the ObjCAutoreleaseWriteChecker to warn on captures as well

2018-05-14 Thread George Karpenkov via cfe-commits
Author: george.karpenkov Date: Mon May 14 14:39:54 2018 New Revision: 332300 URL: http://llvm.org/viewvc/llvm-project?rev=332300&view=rev Log: [analyzer] Extend the ObjCAutoreleaseWriteChecker to warn on captures as well A common pattern is that the code in the block does not write into the varia

[PATCH] D45465: [AST] Fix printing tag decl groups in decl contexts

2018-05-14 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added inline comments. Comment at: lib/AST/DeclPrinter.cpp:393-397 if (!BaseType.isNull() && isa(BaseType)) BaseType = cast(BaseType)->getNamedType(); if (!BaseType.isNull() && isa(BaseType) && - cast(BaseType)->getDecl() == Decls[0]) { +

[PATCH] D46846: [Attr] Fix printing attrs for enum forward decl at file scope

2018-05-14 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added a comment. Clang's current behavior is observably wrong in MS compatibility mode. For example: namespace N { enum E *p; exterm E e; // ok, finds E injected into scope by previous declaration } N::E e; // error, no E in N! namespace N { extern E e; // error, no E

[PATCH] D46446: [c++17] Fix assertion on synthesizing deduction guides after a fatal error.

2018-05-14 Thread Volodymyr Sapsai via Phabricator via cfe-commits
vsapsai added a comment. Ping. https://reviews.llvm.org/D46446 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

r332294 - Fix test fail on some buildbots, caused by r332281.

2018-05-14 Thread Joel E. Denny via cfe-commits
Author: jdenny Date: Mon May 14 14:06:04 2018 New Revision: 332294 URL: http://llvm.org/viewvc/llvm-project?rev=332294&view=rev Log: Fix test fail on some buildbots, caused by r332281. Modified: cfe/trunk/test/Misc/ast-print-record-decl.c Modified: cfe/trunk/test/Misc/ast-print-record-decl.c

r332291 - Fix regression in r332076.

2018-05-14 Thread Richard Smith via cfe-commits
Author: rsmith Date: Mon May 14 13:52:48 2018 New Revision: 332291 URL: http://llvm.org/viewvc/llvm-project?rev=332291&view=rev Log: Fix regression in r332076. If the name after 'template' is an unresolved using declaration (not containing 'typename'), then we don't yet know if it's a valid templ

[PATCH] D45927: [clang-tidy] [modernize-use-auto] Correct way to calculate a type name length for multi-token types

2018-05-14 Thread Zinovy Nis via Phabricator via cfe-commits
zinovy.nis updated this revision to Diff 146677. zinovy.nis added a comment. - Fix for templated type names. Thanks AlexanderK for pointing. https://reviews.llvm.org/D45927 Files: clang-tidy/modernize/UseAutoCheck.cpp docs/clang-tidy/checks/modernize-use-auto.rst test/clang-tidy/modernize

[PATCH] D46497: [clangd] Populate #include insertions as additional edits in completion items.

2018-05-14 Thread Eric Liu via Phabricator via cfe-commits
ioeric updated this revision to Diff 146675. ioeric marked 7 inline comments as done. ioeric added a comment. - Addressed review comments. - Merged with origin/master Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D46497 Files: clangd/ClangdServer.cpp clangd/CodeComplete.cpp

[PATCH] D46846: [Attr] Fix printing attrs for enum forward decl at file scope

2018-05-14 Thread Joel E. Denny via Phabricator via cfe-commits
jdenny created this revision. jdenny added reviewers: aaron.ballman, rsmith, hfinkel. For example, given: enum __attribute__((deprecated)) T *p; -ast-print produced: enum T *p; The trouble was that the EnumDecl node was suppressed, as revealed by -ast-dump. The suppression of the EnumDecl

r332288 - Remove the fixit for the diagnostics regarding capturing autoreleasing variables in a block

2018-05-14 Thread George Karpenkov via cfe-commits
Author: george.karpenkov Date: Mon May 14 13:29:16 2018 New Revision: 332288 URL: http://llvm.org/viewvc/llvm-project?rev=332288&view=rev Log: Remove the fixit for the diagnostics regarding capturing autoreleasing variables in a block The fixit is actively harmful, as it encourages developers to

r332287 - [Tooling] Pull #include manipulation code from clangFormat into libToolingCore.

2018-05-14 Thread Eric Liu via cfe-commits
Author: ioeric Date: Mon May 14 13:17:53 2018 New Revision: 332287 URL: http://llvm.org/viewvc/llvm-project?rev=332287&view=rev Log: [Tooling] Pull #include manipulation code from clangFormat into libToolingCore. Summary: Also pull #include related style out of FormatStyle as tooling::IncludeSty

[PATCH] D46496: [Tooling] Pull #include manipulation code from clangFormat into libToolingCore.

2018-05-14 Thread Eric Liu via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL332287: [Tooling] Pull #include manipulation code from clangFormat into libToolingCore. (authored by ioeric, committed by ). Herald added a subscriber: llvm-commits. Repository: rL LLVM https://reviews

r332286 - PR37450: Fix bug that disabled some type checks for variables with deduced types.

2018-05-14 Thread Richard Smith via cfe-commits
Author: rsmith Date: Mon May 14 13:15:04 2018 New Revision: 332286 URL: http://llvm.org/viewvc/llvm-project?rev=332286&view=rev Log: PR37450: Fix bug that disabled some type checks for variables with deduced types. Also improve diagnostic for the case where a type is non-literal because it's a

[PATCH] D45465: [AST] Fix printing tag decl groups in decl contexts

2018-05-14 Thread Joel E. Denny via Phabricator via cfe-commits
jdenny updated this revision to Diff 146668. jdenny added a comment. Rebased. Ping. https://reviews.llvm.org/D45465 Files: lib/AST/DeclPrinter.cpp test/Misc/ast-print-enum-decl.c test/Misc/ast-print-record-decl.c test/Sema/ast-print.c test/SemaCXX/ast-print.cpp Index: test/SemaCXX/a

[PATCH] D46496: [Tooling] Pull #include manipulation code from clangFormat into libToolingCore.

2018-05-14 Thread Eric Liu via Phabricator via cfe-commits
ioeric updated this revision to Diff 14. ioeric added a comment. - Merged with origin/master - Make copy instead of taking references to ensure lifetime. Repository: rC Clang https://reviews.llvm.org/D46496 Files: include/clang/Format/Format.h include/clang/Tooling/Core/HeaderInclude

[PATCH] D46758: [clang-format] Move #include related style to libToolingCore

2018-05-14 Thread Eric Liu via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL332284: [clang-format] Move #include related style to libToolingCore (authored by ioeric, committed by ). Herald added a subscriber: llvm-commits. Repository: rL LLVM https://reviews.llvm.org/D46758 F

r332284 - [clang-format] Move #include related style to libToolingCore

2018-05-14 Thread Eric Liu via cfe-commits
Author: ioeric Date: Mon May 14 12:51:33 2018 New Revision: 332284 URL: http://llvm.org/viewvc/llvm-project?rev=332284&view=rev Log: [clang-format] Move #include related style to libToolingCore Summary: This will be shared by include insertion/deletion library. Reviewers: ilya-biryukov Reviewed

[PATCH] D46050: [Frontend] Avoid running plugins during code completion parse

2018-05-14 Thread Nico Weber via Phabricator via cfe-commits
thakis accepted this revision. thakis added inline comments. This revision is now accepted and ready to land. Comment at: test/Index/complete-and-plugins.c:3 + +// RUN: c-index-test -code-completion-at=%s:6:1 -load %llvmshlibdir/PrintFunctionNames%pluginext -add-plugin print-fns

[libcxx] r332282 - Update XFAIL so apple-clang-9.0 is the last version not implementing Core 2094.

2018-05-14 Thread Volodymyr Sapsai via cfe-commits
Author: vsapsai Date: Mon May 14 12:45:24 2018 New Revision: 332282 URL: http://llvm.org/viewvc/llvm-project?rev=332282&view=rev Log: Update XFAIL so apple-clang-9.0 is the last version not implementing Core 2094. The test is passing with apple-clang-9.1. rdar://problem/40222003 Modified: l

[PATCH] D45463: [AST] Print correct tag decl for tag specifier

2018-05-14 Thread Joel E. Denny via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. jdenny marked an inline comment as done. Closed by commit rL332281: [AST] Print correct tag decl for tag specifier (authored by jdenny, committed by ). Herald added a subscriber: llvm-commits. Changed prior to commit: htt

[PATCH] D45463: [AST] Print correct tag decl for tag specifier

2018-05-14 Thread Joel E. Denny via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC332281: [AST] Print correct tag decl for tag specifier (authored by jdenny, committed by ). Changed prior to commit: https://reviews.llvm.org/D45463?vs=146351&id=146658#toc Repository: rL LLVM https

r332281 - [AST] Print correct tag decl for tag specifier

2018-05-14 Thread Joel E. Denny via cfe-commits
Author: jdenny Date: Mon May 14 12:36:45 2018 New Revision: 332281 URL: http://llvm.org/viewvc/llvm-project?rev=332281&view=rev Log: [AST] Print correct tag decl for tag specifier For example, given: void fn() { struct T *p0; struct T { int i; } *p1; } -ast-print produced: void f

[PATCH] D40218: [Clang] Add __builtin_launder

2018-05-14 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added a comment. Also we probably want to hold off on landing this until PR37458 is fixed, otherwise `std::launder` will start miscompiling code. https://reviews.llvm.org/D40218 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://

[PATCH] D46643: CodeGen: Emit string literal in constant address space

2018-05-14 Thread Yaxun Liu via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC332279: CodeGen: Emit string literal in constant address space (authored by yaxunl, committed by ). Repository: rC Clang https://reviews.llvm.org/D46643 Files: lib/CodeGen/CGDecl.cpp lib/CodeGen/C

r332279 - CodeGen: Emit string literal in constant address space

2018-05-14 Thread Yaxun Liu via cfe-commits
Author: yaxunl Date: Mon May 14 12:20:12 2018 New Revision: 332279 URL: http://llvm.org/viewvc/llvm-project?rev=332279&view=rev Log: CodeGen: Emit string literal in constant address space Some targets have constant address space (e.g. amdgcn). For them string literal should be emitted in constan

[clang-tools-extra] r332277 - [Documentation] Alphabetical order of new checks in Release Notes.

2018-05-14 Thread Eugene Zelenko via cfe-commits
Author: eugenezelenko Date: Mon May 14 12:12:40 2018 New Revision: 332277 URL: http://llvm.org/viewvc/llvm-project?rev=332277&view=rev Log: [Documentation] Alphabetical order of new checks in Release Notes. Modified: clang-tools-extra/trunk/docs/ReleaseNotes.rst Modified: clang-tools-extra/t

[PATCH] D46112: Allow _Atomic to be specified on incomplete types

2018-05-14 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added a comment. In https://reviews.llvm.org/D46112#1096893, @aaron.ballman wrote: > In https://reviews.llvm.org/D46112#1091981, @efriedma wrote: > > > Also needs some test coverage for atomic operations which aren't calls, > > like "typedef struct S S; void f(_Atomic S *s, _Atomic S *s2)

[PATCH] D45093: [AST] Fix -ast-print for _Bool when have diagnostics

2018-05-14 Thread Joel E. Denny via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC332275: [AST] Fix -ast-print for _Bool when have diagnostics (authored by jdenny, committed by ). Changed prior to commit: https://reviews.llvm.org/D45093?vs=145711&id=146650#toc Repository: rC Clang

[PATCH] D46643: CodeGen: Emit string literal in constant address space

2018-05-14 Thread John McCall via Phabricator via cfe-commits
rjmccall accepted this revision. rjmccall added a comment. This revision is now accepted and ready to land. Thanks, LGTM. https://reviews.llvm.org/D46643 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/l

r332275 - [AST] Fix -ast-print for _Bool when have diagnostics

2018-05-14 Thread Joel E. Denny via cfe-commits
Author: jdenny Date: Mon May 14 11:41:44 2018 New Revision: 332275 URL: http://llvm.org/viewvc/llvm-project?rev=332275&view=rev Log: [AST] Fix -ast-print for _Bool when have diagnostics For example, given: #define bool _Bool _Bool i; void fn() { 1; } -ast-print produced: tmp.c:3:13: wa

[PATCH] D40218: [Clang] Add __builtin_launder

2018-05-14 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. LGTM with a fix (and test) for pointer-to-array-of-dynamic-class-type handling. Comment at: lib/CodeGen/CGBuiltin.cpp:936-938 + const auto *Record = Ty->getAsCXXRecordDecl()

[PATCH] D46694: [diagtool] Install diagtool

2018-05-14 Thread Vedant Kumar via Phabricator via cfe-commits
vsk added a comment. Sgtm. I think it would be worthwhile to release-note this. Repository: rC Clang https://reviews.llvm.org/D46694 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commit

[PATCH] D46643: CodeGen: Emit string literal in constant address space

2018-05-14 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl updated this revision to Diff 146647. yaxunl marked 2 inline comments as done. yaxunl added a comment. Revised by John's comments. https://reviews.llvm.org/D46643 Files: lib/CodeGen/CGDecl.cpp lib/CodeGen/CodeGenModule.cpp lib/CodeGen/CodeGenModule.h test/CodeGenCXX/amdgcn-string

[PATCH] D46767: Force the PS4 clang ABI version to 6, and add a warning if this is attempted to be overridden

2018-05-14 Thread Paul Robinson via Phabricator via cfe-commits
probinson added a comment. In https://reviews.llvm.org/D46767#1096746, @rsmith wrote: > Everything old is new again. If only that were true about my brain. :-P > This was discussed when `-fclang-abi-compat` was introduced; see > https://reviews.llvm.org/D36501 for the argument why this patch

[PATCH] D46602: [clang-tidy] Store checks profiling info as YAML files

2018-05-14 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added a project: clang-tools-extra. lebedev.ri added a comment. In https://reviews.llvm.org/D46602#1098092, @alexfh wrote: > In https://reviews.llvm.org/D46602#1097954, @lebedev.ri wrote: > > > How do i reflect that in tests? The output name will basically be random. > > > Why random?

[PATCH] D46742: [X86] Use __builtin_convertvector to replace some of the avx512 truncate builtins.

2018-05-14 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC332266: [X86] Use __builtin_convertvector to replace some of the avx512 truncate… (authored by ctopper, committed by ). Changed prior to commit: https://reviews.llvm.org/D46742?vs=146286&id=146645#toc

r332266 - [X86] Use __builtin_convertvector to replace some of the avx512 truncate builtins.

2018-05-14 Thread Craig Topper via cfe-commits
Author: ctopper Date: Mon May 14 10:50:40 2018 New Revision: 332266 URL: http://llvm.org/viewvc/llvm-project?rev=332266&view=rev Log: [X86] Use __builtin_convertvector to replace some of the avx512 truncate builtins. As long as the destination type is a 256 or 128 bit vector with the same number

[PATCH] D46602: [clang-tidy] Store checks profiling info as YAML files

2018-05-14 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri updated this revision to Diff 146644. lebedev.ri edited the summary of this revision. lebedev.ri added subscribers: aaron.ballman, JonasToth. lebedev.ri added a comment. - Get rid of 'prefix elision' - Don't use full source file name, only the filename - Prefix that filename with ISO860

[PATCH] D43576: Solution to fix PR27066 - Redefinition with same mangled name as another definition (dllexport and uuid)

2018-05-14 Thread Zahira Ammarguellat via Phabricator via cfe-commits
zahiraam updated this revision to Diff 146642. https://reviews.llvm.org/D43576 Files: include/clang/AST/Decl.h include/clang/AST/RecursiveASTVisitor.h include/clang/Basic/Attr.td include/clang/Basic/DeclNodes.td include/clang/Sema/AttributeList.h include/clang/Sema/Sema.h lib/AST/De

[PATCH] D46791: Make -gsplit-dwarf generally available

2018-05-14 Thread Jake Ehrlich via Phabricator via cfe-commits
jakehehrlich added a comment. I'm generally ok with this but I think some important checks need to occur first. Namely I think I'd like to check that Chromium still builds with this option since I'd imagine they'd be affected by this. Repository: rC Clang https://reviews.llvm.org/D46791

[PATCH] D46791: Make -gsplit-dwarf generally available

2018-05-14 Thread Jake Ehrlich via Phabricator via cfe-commits
jakehehrlich added inline comments. Comment at: lib/Driver/ToolChains/Clang.cpp:4818 // Handle the debug info splitting at object creation time if we're // creating an object. if (SplitDWARF && Output.getType() == types::TY_Object) Maybe re-add a TODO to

[PATCH] D43341: [clang-doc] Implement reducer portion of the frontend framework

2018-05-14 Thread Julie Hockett via Phabricator via cfe-commits
juliehockett added a comment. Pingany more thoughts? https://reviews.llvm.org/D43341 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D42966: Fix USR generation in the presence of #line directives or linemarkes

2018-05-14 Thread Mikhail Ramalho via Phabricator via cfe-commits
mikhail.ramalho added a comment. > Could you provide a minimal example where USRs are not generated? It might > be the case that there are other ways to fix it. Sure, I'll try to reduce our testcase, but basically we have an ASTFrontendAction [0] that adds a set of intrinsics [1] to the preproce

[PATCH] D46643: CodeGen: Emit string literal in constant address space

2018-05-14 Thread John McCall via Phabricator via cfe-commits
rjmccall added inline comments. Comment at: lib/CodeGen/CGDecl.cpp:1373 + llvm::Type *BP = llvm::Type::getInt8Ty(CGM.getLLVMContext()) + ->getPointerTo(Loc.getAddressSpace()); if (Loc.getType() != BP) `CGM.Int8Ty` exists. =

[PATCH] D46836: Fix some rtti-options tests

2018-05-14 Thread Sunil Srivastava via Phabricator via cfe-commits
Sunil_Srivastava created this revision. Herald added a subscriber: cfe-commits. Certain tests in rtti-options.cpp are not really testing anything because they are testing for the absence of -frtti option to the cc1 process. Since the cc1 process does not take -frtti option, these tests are passi

[PATCH] D46835: [ASTImporter] Do not try to remove invisible Decls from DeclContext

2018-05-14 Thread Gabor Marton via Phabricator via cfe-commits
martong created this revision. martong added reviewers: xazax.hun, a.sidorin. Herald added subscribers: cfe-commits, dkrupp, rnkovacs. `DeclContext` is essentially a list of `Decl`s and a lookup table (`LookupPtr`) but these are encapsulated. E.g. `LookupPtr` is private. `DeclContext::removeDecl`

[PATCH] D46602: [clang-tidy] Store checks profiling info as YAML files

2018-05-14 Thread Alexander Kornienko via Phabricator via cfe-commits
don't understand this at all. Why would we want to do that, > > > exactly? > > > Just so that we can avoid creating directory structure? Why do we want > > > to avoid that? > > > > > > If clang-tidy is invoked manually, a simpler naming scheme

r332256 - [ASTImporter] Turn StringRefs back to std::strings to avoid use-after-free

2018-05-14 Thread Aleksei Sidorin via cfe-commits
Author: a.sidorin Date: Mon May 14 09:12:31 2018 New Revision: 332256 URL: http://llvm.org/viewvc/llvm-project?rev=332256&view=rev Log: [ASTImporter] Turn StringRefs back to std::strings to avoid use-after-free This is a workaround for the issue in buildASTFromCodeWithArgs() where a local buffer

[PATCH] D46834: [Sema][Cxx17] Error message for C++17 static_assert(pred) without string literal

2018-05-14 Thread Jan Korous via Phabricator via cfe-commits
jkorous created this revision. jkorous added reviewers: arphaman, dexonsmith, rsmith, doug.gregor. jkorous added a project: clang. Herald added a subscriber: cfe-commits. C++17 adds form of static_assert without string literal. static_assert ( bool_constexpr ) Currently clang produces diagnost

[PATCH] D46421: [analyzer][CrossTU] Extend CTU to VarDecls with initializer

2018-05-14 Thread Gábor Horváth via Phabricator via cfe-commits
xazax.hun added a comment. The analyzer can only reason about const variables this way, right? Maybe we should only import the initializers for such variables to have better performance? What do you think? Also, I wonder what happens with user-defined classes. Will the analyzer evaluate the co

[PATCH] D46496: [Tooling] Pull #include manipulation code from clangFormat into libToolingCore.

2018-05-14 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov accepted this revision. ilya-biryukov added a comment. This revision is now accepted and ready to land. LGTM Comment at: lib/Format/Format.cpp:1702 // cases where the first #include is unlikely to be the main header. - IncludeCategoryManager Categories(Style,

[PATCH] D46159: [clang-tidy] Add a flag to enable alpha checkers

2018-05-14 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh added a comment. In https://reviews.llvm.org/D46159#1098018, @alexfh wrote: > In https://reviews.llvm.org/D46159#1098000, @pfultz2 wrote: > > > Is someone able to merge in my changes? > > > Will do. Please rebase the patch, it doesn't apply cleanly. https://reviews.llvm.org/D46159 _

[PATCH] D46159: [clang-tidy] Add a flag to enable alpha checkers

2018-05-14 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh added a comment. In https://reviews.llvm.org/D46159#1098000, @pfultz2 wrote: > Is someone able to merge in my changes? Will do. https://reviews.llvm.org/D46159 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/c

[PATCH] D46353: [ASTImporter] Extend lookup logic in class templates

2018-05-14 Thread Aleksei Sidorin via Phabricator via cfe-commits
a.sidorin accepted this revision. a.sidorin added a comment. This revision is now accepted and ready to land. In https://reviews.llvm.org/D46353#1086456, @martong wrote: > > should we add this new declaration to the redeclaration chain like we do it > > for RecordDecls? > > I think, on a long te

[PATCH] D46496: [Tooling] Pull #include manipulation code from clangFormat into libToolingCore.

2018-05-14 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added a comment. This LG, presuming there are no semantic changes here, just moving the code around. Also see the nits about `IncludeStyle` that seems to be in the wrong change... Comment at: include/clang/Tooling/Core/HeaderIncludes.h:112 +/// priorities for hea

[PATCH] D46758: [clang-format] Move #include related style to libToolingCore

2018-05-14 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov accepted this revision. ilya-biryukov added a comment. This revision is now accepted and ready to land. LGTM Repository: rC Clang https://reviews.llvm.org/D46758 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.l

[PATCH] D46747: [Sema] Use dotted form of macOS version for unguarded availability FixIts

2018-05-14 Thread Erik Pilkington via Phabricator via cfe-commits
erik.pilkington accepted this revision. erik.pilkington added a comment. This revision is now accepted and ready to land. Thanks for the explanation, LGTM. https://reviews.llvm.org/D46747 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http:

[PATCH] D46159: [clang-tidy] Add a flag to enable alpha checkers

2018-05-14 Thread Paul Fultz II via Phabricator via cfe-commits
pfultz2 added a comment. Is someone able to merge in my changes? https://reviews.llvm.org/D46159 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D43281: [AMDGPU] fixes for lds f32 builtins

2018-05-14 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. Thanks! Repository: rC Clang https://reviews.llvm.org/D43281 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.o

[PATCH] D46398: [ASTImporterTest] Fix potential use-after-free

2018-05-14 Thread Gabor Marton via Phabricator via cfe-commits
martong accepted this revision. martong added a comment. This revision is now accepted and ready to land. LGTM! Repository: rC Clang https://reviews.llvm.org/D46398 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi

[PATCH] D46805: If some platforms do not support an attribute, we should exclude the platform

2018-05-14 Thread Li Jia He via Phabricator via cfe-commits
HLJ2009 added inline comments. Comment at: include/clang/Basic/Attr.td:566-567 -def Alias : Attr { +// We do not support alias attribute on Apple platform, so we exclude the platform. +def Alias : Attr, TargetSpecificAttr { let Spellings = [GCC<"alias">]; r

[PATCH] D46685: [CodeGen] Disable structor optimizations at -O0

2018-05-14 Thread Pavel Labath via Phabricator via cfe-commits
labath added a comment. I've reverted the patch as it has caused miscompiles on non-trivial inputs. I'll update the patch when I gain a better understanding of what is going on. Repository: rC Clang https://reviews.llvm.org/D46685 ___ cfe-commit

[PATCH] D46602: [clang-tidy] Store checks profiling info as YAML files

2018-05-14 Thread Roman Lebedev via Phabricator via cfe-commits
gt; > > If clang-tidy is invoked manually, a simpler naming scheme with less > configuration options would be easier to use, in particular: > > 1. no the need to specify the `-store-check-profile-elide-prefix=` option; > 2. it's easier to see all results (no need to use `find`,

[PATCH] D46421: [analyzer][CrossTU] Extend CTU to VarDecls with initializer

2018-05-14 Thread Rafael Stahl via Phabricator via cfe-commits
r.stahl updated this revision to Diff 146609. r.stahl marked an inline comment as done. r.stahl added a comment. - added tests - updated doc and var naming - addressed review comment https://reviews.llvm.org/D46421 Files: include/clang/CrossTU/CrossTranslationUnit.h lib/CrossTU/CrossTransla

  1   2   >